diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 6c92972b222..8531fc188cd 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -30,10 +30,10 @@ jobs: language: ['javascript'] steps: - name: Checkout repository - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3 + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 - name: Setup CodeQL - uses: github/codeql-action/init@959cbb7472c4d4ad70cdfe6f4976053fe48ab394 # v2 + uses: github/codeql-action/init@a34ca99b4610d924e04c68db79e503e1f79f9f02 # v2 with: languages: ${{ matrix.language }} - name: Perform Analysis - uses: github/codeql-action/analyze@959cbb7472c4d4ad70cdfe6f4976053fe48ab394 # v2 + uses: github/codeql-action/analyze@a34ca99b4610d924e04c68db79e503e1f79f9f02 # v2 diff --git a/.github/workflows/crowdin-download.client-ui.yml b/.github/workflows/crowdin-download.client-ui.yml index d78018159b6..eb9348bb696 100644 --- a/.github/workflows/crowdin-download.client-ui.yml +++ b/.github/workflows/crowdin-download.client-ui.yml @@ -18,7 +18,7 @@ jobs: steps: - name: Checkout Source Files - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3 + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 with: token: ${{ secrets.CROWDIN_CAMPERBOT_PAT }} diff --git a/.github/workflows/crowdin-download.curriculum.yml b/.github/workflows/crowdin-download.curriculum.yml index 4ea86058734..c5281ff351d 100644 --- a/.github/workflows/crowdin-download.curriculum.yml +++ b/.github/workflows/crowdin-download.curriculum.yml @@ -22,7 +22,7 @@ jobs: steps: - name: Checkout Source Files - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3 + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 with: token: ${{ secrets.CROWDIN_CAMPERBOT_PAT }} @@ -278,7 +278,7 @@ jobs: # All languages should go ABOVE this. # - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3 + uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 with: node-version: ${{ matrix.node-version }} diff --git a/.github/workflows/crowdin-download.docs.yml b/.github/workflows/crowdin-download.docs.yml index 94896d1de3d..5008a30123d 100644 --- a/.github/workflows/crowdin-download.docs.yml +++ b/.github/workflows/crowdin-download.docs.yml @@ -18,7 +18,7 @@ jobs: steps: - name: Checkout Source Files - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3 + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 with: token: ${{ secrets.CROWDIN_CAMPERBOT_PAT }} diff --git a/.github/workflows/crowdin-upload.client-ui.yml b/.github/workflows/crowdin-upload.client-ui.yml index 716ecd5c87b..c1157d32433 100644 --- a/.github/workflows/crowdin-upload.client-ui.yml +++ b/.github/workflows/crowdin-upload.client-ui.yml @@ -18,7 +18,7 @@ jobs: steps: - name: Checkout Source Files - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3 + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 - name: Generate Crowdin Config uses: freecodecamp/crowdin-action@main diff --git a/.github/workflows/crowdin-upload.curriculum.yml b/.github/workflows/crowdin-upload.curriculum.yml index 2a04581adca..3f1cd1c3eab 100644 --- a/.github/workflows/crowdin-upload.curriculum.yml +++ b/.github/workflows/crowdin-upload.curriculum.yml @@ -18,7 +18,7 @@ jobs: steps: - name: Checkout Source Files - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3 + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 - name: Generate Crowdin Config uses: freecodecamp/crowdin-action@main diff --git a/.github/workflows/crowdin-upload.docs.yml b/.github/workflows/crowdin-upload.docs.yml index ec443ac4725..c7eaf0ff98b 100644 --- a/.github/workflows/crowdin-upload.docs.yml +++ b/.github/workflows/crowdin-upload.docs.yml @@ -18,7 +18,7 @@ jobs: steps: - name: Checkout Source Files - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3 + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 - name: Generate Crowdin Config uses: freecodecamp/crowdin-action@main diff --git a/.github/workflows/e2e-mobile.yml b/.github/workflows/e2e-mobile.yml index a1cd7ebd63c..0fac7e65a62 100644 --- a/.github/workflows/e2e-mobile.yml +++ b/.github/workflows/e2e-mobile.yml @@ -20,16 +20,16 @@ jobs: steps: - name: Checkout Source Files - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3 + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 - name: Checkout mobile - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3 + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 with: repository: freeCodeCamp/mobile path: mobile - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3 + uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 with: node-version: ${{ matrix.node-version }} diff --git a/.github/workflows/e2e-third-party.yml b/.github/workflows/e2e-third-party.yml index b6b35b5d86b..cad46e58e03 100644 --- a/.github/workflows/e2e-third-party.yml +++ b/.github/workflows/e2e-third-party.yml @@ -29,16 +29,16 @@ jobs: steps: - name: Checkout Source Files - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3 + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 - name: Checkout client-config - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3 + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 with: repository: freeCodeCamp/client-config path: client-config - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3 + uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 with: node-version: ${{ matrix.node-version }} diff --git a/.github/workflows/e2e-web.yml b/.github/workflows/e2e-web.yml index c20ece5c601..891c6ce59f3 100644 --- a/.github/workflows/e2e-web.yml +++ b/.github/workflows/e2e-web.yml @@ -22,16 +22,16 @@ jobs: steps: - name: Checkout Source Files - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3 + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 - name: Checkout client-config - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3 + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 with: repository: freeCodeCamp/client-config path: client-config - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3 + uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 with: node-version: ${{ matrix.node-version }} @@ -51,13 +51,13 @@ jobs: run: tar -cf client-artifact.tar client/public - name: Upload Client Artifact - uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # tag=v3 + uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3 with: name: client-artifact path: client-artifact.tar - name: Upload Webpack Stats - uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # tag=v3 + uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3 with: name: webpack-stats path: client/public/stats.json @@ -96,9 +96,9 @@ jobs: echo "GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV - name: Checkout Source Files - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3 + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 - - uses: actions/download-artifact@9782bd6a9848b53b110e712e20e42d89988822b7 # tag=v3 + - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3 with: name: client-artifact @@ -116,7 +116,7 @@ jobs: sudo ln -s /opt/firefox/firefox /usr/bin/firefox - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3 + uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 with: node-version: ${{ matrix.node-version }} diff --git a/.github/workflows/i18n-validate-builds.yml b/.github/workflows/i18n-validate-builds.yml index a5f56716080..f27e7dc4787 100644 --- a/.github/workflows/i18n-validate-builds.yml +++ b/.github/workflows/i18n-validate-builds.yml @@ -14,10 +14,10 @@ jobs: steps: - name: Checkout Source Files - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3 + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3 + uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 with: node-version: ${{ matrix.node-version }} cache: 'npm' diff --git a/.github/workflows/i18n-validate-prs.yml b/.github/workflows/i18n-validate-prs.yml index 92afb6ee388..bd438a2f0e9 100644 --- a/.github/workflows/i18n-validate-prs.yml +++ b/.github/workflows/i18n-validate-prs.yml @@ -16,10 +16,10 @@ jobs: steps: - name: Checkout Source Files - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3 + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3 + uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 with: node-version: ${{ matrix.node-version }} cache: 'npm' diff --git a/.github/workflows/node.js-find-unused.yml b/.github/workflows/node.js-find-unused.yml index a0bde535061..bf0d19978aa 100644 --- a/.github/workflows/node.js-find-unused.yml +++ b/.github/workflows/node.js-find-unused.yml @@ -21,10 +21,10 @@ jobs: steps: - name: Checkout Source Files - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3 + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3 + uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 with: node-version: ${{ matrix.node-version }} diff --git a/.github/workflows/node.js-tests-upcoming.yml b/.github/workflows/node.js-tests-upcoming.yml index 1fd303ad918..a12d2165b13 100644 --- a/.github/workflows/node.js-tests-upcoming.yml +++ b/.github/workflows/node.js-tests-upcoming.yml @@ -26,10 +26,10 @@ jobs: steps: - name: Checkout Source Files - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3 + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3 + uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 with: node-version: ${{ matrix.node-version }} @@ -61,10 +61,10 @@ jobs: steps: - name: Checkout Source Files - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3 + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3 + uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 with: node-version: ${{ matrix.node-version }} diff --git a/.github/workflows/node.js-tests.yml b/.github/workflows/node.js-tests.yml index d32a1ace337..c434960e7b4 100644 --- a/.github/workflows/node.js-tests.yml +++ b/.github/workflows/node.js-tests.yml @@ -24,7 +24,7 @@ jobs: steps: - name: Checkout Source Files - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3 + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 - name: Check number of lockfiles run: | @@ -35,7 +35,7 @@ jobs: fi - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3 + uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 with: node-version: ${{ matrix.node-version }} @@ -69,10 +69,10 @@ jobs: steps: - name: Checkout Source Files - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3 + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3 + uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 with: node-version: ${{ matrix.node-version }} @@ -103,10 +103,10 @@ jobs: steps: - name: Checkout Source Files - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3 + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3 + uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 with: node-version: ${{ matrix.node-version }} @@ -139,10 +139,10 @@ jobs: steps: - name: Checkout Source Files - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3 + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 # tag=v3 + uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3 with: node-version: ${{ matrix.node-version }} diff --git a/.gitignore b/.gitignore index d6cd819d4d8..ee0f7c63a7a 100644 --- a/.gitignore +++ b/.gitignore @@ -174,6 +174,10 @@ utils/block-nameify.test.js utils/slugs.js utils/slugs.test.js utils/index.js +utils/get-lines.js +utils/get-lines.test.js +utils/validate.js +utils/validate.test.js ### vim ### # Swap diff --git a/.prettierignore b/.prettierignore index 5270c577f42..1eaa453cf7a 100644 --- a/.prettierignore +++ b/.prettierignore @@ -16,6 +16,10 @@ utils/block-nameify.test.js utils/slugs.js utils/slugs.test.js utils/index.js +utils/get-lines.js +utils/get-lines.test.js +utils/validate.js +utils/validate.test.js **/package-lock.json web/.next curriculum-server/data/curriculum.json diff --git a/api-server/src/server/boot/settings.js b/api-server/src/server/boot/settings.js index d1a4b4006cf..e93f32dff83 100644 --- a/api-server/src/server/boot/settings.js +++ b/api-server/src/server/boot/settings.js @@ -281,12 +281,6 @@ function handleInvalidUpdate(res) { function updateUserFlag(req, res, next) { const { user, body: update } = req; const allowedKeys = [ - 'theme', - 'sound', - 'keyboardShortcuts', - 'isHonest', - 'portfolio', - 'sendQuincyEmail', 'isGithub', 'isLinkedIn', 'isTwitter', diff --git a/client/gatsby-node.js b/client/gatsby-node.js index 736fa2ff580..9e5b6d15772 100644 --- a/client/gatsby-node.js +++ b/client/gatsby-node.js @@ -270,6 +270,8 @@ exports.onCreatePage = async ({ page, actions }) => { } }; +// Take care to QA the challenges when modifying this. It has broken certain +// types of challenge in the past. exports.createSchemaCustomization = ({ actions }) => { const { createTypes } = actions; const typeDefs = ` @@ -280,6 +282,7 @@ exports.createSchemaCustomization = ({ actions }) => { challengeFiles: [FileContents] notes: String url: String + assignments: [String] } type FileContents { fileKey: String @@ -293,44 +296,3 @@ exports.createSchemaCustomization = ({ actions }) => { `; createTypes(typeDefs); }; - -// TODO: this broke the React challenges, not sure why, but I'll investigate -// further and reimplement if it's possible and necessary (Oliver) -// I'm still not sure why, but the above schema seems to work. -// Typically the schema can be inferred, but not when some challenges are -// skipped (at time of writing the Chinese only has responsive web design), so -// this makes the missing fields explicit. -// exports.createSchemaCustomization = ({ actions }) => { -// const { createTypes } = actions; -// const typeDefs = ` -// type ChallengeNode implements Node { -// question: Question -// videoId: String -// required: ExternalFile -// files: ChallengeFile -// } -// type Question { -// text: String -// answers: [String] -// solution: Int -// } -// type ChallengeFile { -// indexhtml: FileContents -// indexjs: FileContents -// indexjsx: FileContents -// } -// type ExternalFile { -// link: String -// src: String -// } -// type FileContents { -// key: String -// ext: String -// name: String -// contents: String -// head: String -// tail: String -// } -// `; -// createTypes(typeDefs); -// }; diff --git a/client/i18n/locales/arabic/intro.json b/client/i18n/locales/arabic/intro.json index ebab7f6ea65..8e7bce332bb 100644 --- a/client/i18n/locales/arabic/intro.json +++ b/client/i18n/locales/arabic/intro.json @@ -3,23 +3,23 @@ "title": "تراث تصميم مواقع الويب المتجاوبة", "intro": [ "في شهادة تصميم الويب المستجيب هذه، ستتعلم اللغات التي يستخدمها المطورين لبناء صفحات الويب: HTML (Hypertext Markup Language) للمحتوى، و CSS (Cascading Style Sheets) للتصميم.", - "أولاً، سوف تقوم ببناء تطبيق صورة القطة لتعلم أساسيات HTML و CSS. لاحقاً، سوف تتعلم التقنيات الحديثة مثل متغيرات CSS عن طريق بناء بطريق، وأفضل الممارسات في اتاحة الوصول (accessibility) عن طريق بناء نموذج ويب.", - "أخيراً، سوف تتعلم كيف تنشئ صفحات ويب تستجيب لأحجام الشاشات المختلفة من خلال بناء بطاقة تويتر باستخدام Flexbox، وتخطيط معقد لمدونة باستخدام CSS Grid." + "أولاً، سوف تبني تطبيق صورة قطة لتتعلم أساسيات HTML و CSS. لاحقاً، سوف تتعلم التقنيات الحديثة مثل متغيرات CSS عن طريق بناء بِطْرِيق، وأفضل الممارسات في إتاحة الوصول (accessibility) عن طريق بناء نموذج ويب.", + "أخيراً، سوف تتعلم كيف تنشئ صفحات ويب تستجيب لأحجام الشاشات المختلفة عندما تبني بطاقة تويتر باستخدام Flexbox، وتخطيط معقد لمدونة باستخدام CSS Grid." ], - "note": "ملاحظة: بعض إضافات المتصفح, مثل Ad-blockers وإضافات الوضع الليلي قد تتصادم مع نتائج الاختبارات, إذا واجهت مشاكل, ننصحك بتعطيل الإضافات التي قد تؤثر أو تعدل على مخطط الصفحات, أثناء حضورك للدورة.", + "note": "ملاحظة: بعض إضافات المتصفح, مثل Ad-blockers وإضافات الوضع الليلي قد تتصادم مع نتائج الاختبارات, إذا واجهت مشكلات, ننصحك بتعطيل الإضافات التي قد تؤثر أو تعدل على مخطط الصفحات في أثناء حضورك للدورة.", "blocks": { "basic-html-and-html5": { "title": "أساسيات HTML و HTML5", "intro": [ - "HTML هي لغة ترميز تستخدم سياق خاص أو رموز لوصف الهيكل الخاص بصفحة الويب للمتصفح، عناصر HTML عادة لديها وسم فتح واغلاق تحيط المحتوى وتضيف معنى له. على سبيل المثال، عناصر مختلفة بامكانها وصف النص كعنوان أو فقرة أو عنصر من قائمة.", - "في هذه الدورة، ستبني تطبيق صورة القطة لتعلم بعض من أكثر عناصر الـ HTML شيوعاً، كتل البناء لأي صفحة على الويب." + "HTML هي لغة ترميز تستخدم سياق خاص أو رموز لوصف الهيكل الخاص بصفحة الويب للمتصفح، عناصر HTML عادة لديها علامة فتح وإغلاق تحيط المحتوى وتضيف معنى له. على سبيل المثال، عناصر مختلفة بإمكانها وصف النص كعنوان أو فَقَرة أو عنصر من قائمة.", + "في هذه الدورة، ستبني تطبيق صورة القطة لتتعلم بعض من أكثر عناصر لغة HTML شيوعاً، وهي كتل البناء لأي صفحة على الويب." ] }, "basic-css": { "title": "أساسيات CSS", "intro": [ - "CSS أو Cascading Style Sheets تخبر المتصفح كيف يعرض النص والعناصر الأخرى التي قمت بكتابتها في ملف الـ HTML، مع CSS تستطيع التحكم باللون والخط والحجم والمسافة والكثير من الأوجه المختلفة لعناصر HTML.", - "الآن بعد أن وصفت بنية تطبيق صورة القطة الخاص بك، أضف له بعض التصاميم باستخدام CSS." + "CSS أو Cascading Style Sheets تخبر المتصفح كيف يعرض النص والعناصر الأخرى الذي قمت بكتابتها في مِلَفّ HTML. و بواسطة CSS تستطيع التحكم باللون والخط والحجم والمسافة والكثير من الأوجه المختلفة لعناصر HTML.", + "الآن بعد أن وصفت بنية تطبيق صورة القطة الخاصة بك، أضف له بعض التصاميم باستخدام CSS." ] }, "applied-visual-design": { @@ -32,7 +32,7 @@ "applied-accessibility": { "title": "امكانية الوصول المطبقة", "intro": [ - "في تطوير المواقع، اماكنية الوصول تشير إلى محتوى ويب وواجهة مستخدم يمكن فهمها والتنقل بها والتفاعل معها من قبل جمهور عريض. هذا يتضمن أشخاص مصابين بإعاقات بصرية أو سمعية أو حركية أو ادراكية.", + "في تطوير المواقع، إماكنية الوصول تشير إلى محتوى ويب وواجهة مستخدم (UI - User Interface) يمكن فهمها والتنقل بها والتفاعل معها من قبل جَمهور عريض. هذا يتضمن أشخاص مصابين بإعاقات بصرية أو سمعية أو حركية أو إدراكية.", "في هذه الدورة، ستتعلم أفضل الممارسات لبناء صفحات الويب التي يمكن للجميع الوصول إليها وفهمها." ] }, @@ -76,80 +76,80 @@ "note": "ملاحظة: بعض إضافات المتصفح, مثل Ad-blockers وإضافات الوضع الليلي قد تتصادم مع نتائج الاختبارات, إذا واجهت مشاكل, ننصحك بتعطيل الإضافات التي قد تؤثر أو تعدل على مخطط الصفحات, أثناء حضورك للدورة.", "blocks": { "build-a-tribute-page-project": { - "title": "صفحة الإشادة", + "title": "صفحة الثناء", "intro": [ "هذا هو أحد المشاريع المطلوبة للحصول على شهادتك.", - "في هذا المشروع، سوف تقوم ببناء صفحة ثناء لموضوع من اختيارك سواء كان الموضوع من وحي خيالك أو حقيقي." + "في هذا المشروع، سوف تنشئ صفحة إثناء لموضوع من اختيارك سواء كان الموضوع من وحي خيالك أو حقيقي." ] }, "build-a-personal-portfolio-webpage-project": { - "title": "صفحه الويب لعرض نموذجات الأعمال الشخصية", + "title": "معرضا لأعمالك الخاصة", "intro": [ - "هذا هو أحد المشاريع المطلوبة للحصول على شهادتك.", - "في هذا المشروع، سوف تقوم ببناء صفحة ويب لعرض نماذج الاعمال الشخصية الخاصة بك." + "هذا هو أحد المشروعات المطلوبة للحصول على شهادتك.", + "في هذا المشروع، سوف تتشئ صفحة ويب معرضا لأعمالك الخاصة." ] }, "build-a-product-landing-page-project": { - "title": "صفحة الهبوط للمنتج", + "title": "صفحة لعرض المنتج", "intro": [ - "هذا هو أحد المشاريع المطلوبة للحصول على شهادتك.", - "في هذا المشروع، سوف تقوم ببناء صفحة هبوط لمنتج من اختيارك للتسويق له." + "هذا هو أحد المشروعات المطلوبة للحصول على شهادتك.", + "في هذا المشروع، ستنشئ صفحة لعرض المنتج من اختيارك للتسويق له." ] }, "build-a-survey-form-project": { "title": "نموذج استطلاع رأي", "intro": [ - "هذا هو أحد المشاريع المطلوبة للحصول على شهادتك.", - "في هذا المشروع، سوف تقوم ببناء نموذج الدراسة الاستقصائية لجمع بيانات من المستخدمين." + "هذا هو أحد المشروعات المطلوبة للحصول على شهادتك.", + "في هذا المشروع، سوف تنشئ نموذج استطلاع رأي لجمع بيانات من مستخدميك." ] }, "build-a-technical-documentation-page-project": { - "title": "صفحة الوثائق التقنية", + "title": "صفحة التوثيق التقنية", "intro": [ - "هذا هو أحد المشاريع المطلوبة للحصول على شهادتك.", - "في هذا المشروع، ستنشئ صفحة التوثيق التقني لتكون بمثابة تعليمات أو مرجع لموضوع ما." + "هذا هو أحد المشروعات المطلوبة للحصول على شهادتك.", + "في هذا المشروع، ستنشئ صفحة نموذج استطلاع رأي لتقوم مقام التعليمات أو المرجع لموضوع ما." ] }, "learn-html-by-building-a-cat-photo-app": { "title": "تعلم HTML عن طريق بناء تطبيق صورة القطة", "intro": [ "تعطي وسوم HTML صفحة الويب هيكلها. يمكنك استخدام وسوم HTML لإضافة الصور والأزرار والعناصر الأخرى إلى صفحة الويب الخاصة بك.", - "في هذه الدورة، ستتعلم وسوم HTML الأكثر شيوعاً عن طريق بناء تطبيقك لصورة القطة." + "في هذه الدورة، ستتعلم وسوم HTML الأكثر شيوعاً عن طريق بناء تطبيقك صورة القطة." ] }, "learn-basic-css-by-building-a-cafe-menu": { "title": "تعلم اساسيات CSS عن طريق بناء قائمة مقهى", "intro": [ - "CSS يخبر المتصفح كيفية عرض صفحة الويب الخاصة بك. يمكنك استخدام CSS لتعيين اللون والخطوط والحجم والجوانب الأخرى لعناصر HTML.", - "في هذه الدورة، سوف تتعلم CSS عن طريق تصميم صفحة قائمة لصفحة ويب لمقهي." + "يخبر CSS المتصفح كيف تعرض صفحتك الويب. يمكنك استخدام CSS لتعيين اللون والخطوط والحجم والجوانب الأخرى لعناصر HTML.", + "في هذه الدورة، سوف تتعلم CSS عن طريق تصميم صفحة قائمة لصفحة ويب لمقهى." ] }, "learn-the-css-box-model-by-building-a-rothko-painting": { "title": "تعلم CSS Box Model عن طريق بناء رسم لـRothko", "intro": [ - "كل عنصر من عناصر HTML هو صندوق خاص به - مع مساحته الخاصة وحدوده. وهذا يسمى نموذج Box Model.", - "في هذه الدورة، ستستخدم CSS و Box Model لإنشاء قطع فنية مستطيلة على نمط Rothko-الخاص بك." + "كل عنصر من عناصر HTML هو صندوقه - مع مساحته الخاصة وحدوده. وهذا يسمى نموذج الصندوق Box Model.", + "في هذه الدورة، ستستخدم CSS و Box Model لإنشاء قطع فنية مستطيلة على تصممك لوحة روثكو." ] }, "learn-css-variables-by-building-a-city-skyline": { - "title": "تعلم متغيرات CSS عن طريق بناء خط افق المدينة", + "title": "تعلم متغيرات CSS عن طريق أنشئ ناطحة السحاب بالمدينة", "intro": [ - "تساعدك متغيرات CSS على تنظيم الأنماط الخاصة بك وإعادة استخدامها.", - "في هذه الدورة، ستبني خط افق المدينة. ستتعلم كيفية تهيئة متغيرات CSS حتى تتمكن من إعادة استخدامها كلما أردت." + "تساعدك متغيرات CSS على تنظيم تصميماتك وإعادة استخدامها.", + "في هذه الدورة، ستبني ناطحة سحب بالمدينة. ستتعلم كيفية إعداد متغيرات CSS حتى تتمكن من إعادة استخدامها كلما أردت." ] }, "learn-html-forms-by-building-a-registration-form": { - "title": "تعلم نماذج HTML عن طريق بناء نموذج تسجيل", + "title": "تعلم نموذجات HTML عن طريق بناء نموذج تسجيل", "intro": [ - "يمكنك استخدام نماذج HTML لجمع المعلومات من الأشخاص الذين يزورون صفحة الويب الخاصة بك.", + "يمكنك استخدام نموذجات HTML لجمع المعلومات من الأشخاص الذين يزورون صفحتك الويب.", "في هذه الدورة، ستتعلم نماذج HTML عن طريق بناء صفحة التسجيل. ستتعلم كيفية التحكم في أنواع البيانات التي يمكن للناس كتابتها في النموذج، وبعض أدوات CSS الجديدة لتصميم صفحتك." ] }, "learn-accessibility-by-building-a-quiz": { - "title": "تعلم إمكانية الوصول Accessibility عن طريق بناء اختبار", + "title": "تعلم تسهيل المنال Accessibility عن طريق بناء اختبار", "intro": [ - "إمكانية الوصول تجعل صفحة الويب الخاصة بك سهلة الاستخدام لجميع الناس - حتى الأشخاص ذوي الإعاقة.", - "في هذه الدورة، ستبني صفحة ويب لاختبار. ستتعلم أدوات الوصول مثل اختصارات لوحة المفاتيح، سمات ARIA وأفضل الممارسات في التصميم." + "الاهتمام بتسهيل المنال إلى صفحتك الويب سهلة الاستخدام لجميع الناس - حتى الأشخاص ذوي الإعاقة.", + "في هذه الدورة، ستبني صفحة ويب لاختبار. ستتعلم أدوات تسهل المنال مثل اختصارات لوحة المفاتيح، سمات ARIA وأفضل الممارسات في التصميم." ] }, "learn-intermediate-css-by-building-a-picasso-painting": { @@ -159,31 +159,31 @@ ] }, "learn-responsive-web-design-by-building-a-piano": { - "title": "تعلم تصميم الويب المتجاوب Responsive Web Design عن طريق بناء بيانو", + "title": "تعلم تصميم الويب المستجيب Responsive Web Design عن طريق بناء بيانو", "intro": [ - "التصميم المستجيب يخبر صفحة الويب الخاصة بك كيف ينبغي أن تبدو على شاشات مختلفة الحجم.", + "يخبر التصميم المستجيب صفحتك الويب كيف ينبغي أن تبدو على شاشات مختلفة الحجم.", "في هذه الدورة، ستستخدم CSS والتصميم المستجيب لبرمجة وبناء بيانو. كما ستتعلم المزيد عن media queries و pseudo selectors." ] }, "learn-css-flexbox-by-building-a-photo-gallery": { "title": "تعلم CSS Flexbox من خلال بناء معرض للصور", "intro": [ - "يساعدك Flexbox في تصميم صفحة الويب الخاصة بك بحيث تبدو جيدة على أي حجم شاشة.", + "يساعدك Flexbox في تصميم صفحتك الويب بحيث تبدو جيدة على أي حجم شاشة.", "في هذه الدورة، ستستخدم Flexbox لإنشاء موقع ويب مستجيب Responsive لمعرض صور." ] }, "learn-css-grid-by-building-a-magazine": { "title": "تعلم CSS Grid عن طريق بناء مجلة", "intro": [ - "تمنحك CSS Grid التحكم في صفوف وأعمدة تصميم صفحة الويب الخاصة بك.", + "تمنحك CSS Grid التحكم في صفوف وأعمدة تصميم صفحتك الويب.", "في هذه الدورة، ستقوم ببناء مقال في مجلة. ستتعلم كيفية استخدام CSS Grid، بما في ذلك مفاهيم مثل صفوف الشبكة Grid rows وأعمدة الشبكة Grid columns." ] }, "learn-typography-by-building-a-nutrition-label": { "title": "تعلم الطباعة Typography عن طريق بناء علامة التغذية", "intro": [ - "التيبوغرافي هو فن تصميم النص الخاص بك ليكون سهل القراءة ويناسب الغرض منه.", - "في هذه الدورة، ستستخدم typography لإنشاء صفحة ويب لتسمية التغذية. ستتعلم كيفية تغيير نمط النص، وتعديل ارتفاع الخط line-height، و تغيير وضع position نصك باستخدام CSS." + "إن تشكيل الخط فن لتصميم نصك ليسهل قراءة ويلائم غرضه.", + "في هذه الدورة، ستستخدم typography لإنشاء صفحة ويب لتسمية التغذية. ستتعلم كيفية تغيير تشكيل النص، وتعديل ارتفاع الخط line-height، و تغيير وضع position نصك باستخدام CSS." ] }, "learn-css-transforms-by-building-a-penguin": { @@ -204,7 +204,7 @@ "title": "تعلم المزيد عن Selectors Pseudo في CSS عن طريق بناء كشف ميزانية", "intro": [ "يمكنك استخدام CSS pseudo selectors لتغيير عناصر HTML محددة.", - "في هذه الدورة ، ستبني ميزانية عامة باستخدام pseudo selectors. سوف تتعلم كيفية تغيير نمط عنصر ما عندما تحوم فوقه بالماوس الخاص بك، وتفعيل أحداث أخرى على صفحة الويب الخاصة بك." + "في هذه الدورة، ستبني ميزانية عامة باستخدام المنتقات الزائفة pseudo selectors. سوف تتعلم كيفية تغيير تصميم عنصر ما عندما تحوم فوقه بماوسك، وتفعيل أحداث أخرى على صفحتك الويب." ] }, "learn-css-colors-by-building-a-set-of-colored-markers": { @@ -219,7 +219,7 @@ "javascript-algorithms-and-data-structures": { "title": "الخوارزميات وهياكل البيانات في JavaScript", "intro": [ - "في حين أن HTML و CSS يتحكمان في محتوى الصفحة وتصميم الصفحة، يستخدم Javascript لجعلها تفاعلية. في شهادة الخوارزميات وهياكل البيانات في JavaScript، ستتعلم أساسيات JavaScript بما في ذلك المتغيرات variables, والقوائم arrays, والكائنات Objects والحلقات Loops, والوظائف functions.", + "في حين أن HTML و CSS يتحكمان في محتوى الصفحة وتصميم الصفحة، يستخدم Javascript لجعلها تفاعلية. في شهادة الخوارزميات وهياكل البيانات في JavaScript، ستتعلم أساسيات JavaScript بما في ذلك المتغيرات variables, والقوائم arrays, والكائنات objects والحلقات loops, والوظائف functions.", "بمجرد أن يكون لديك الأساسيات، ستطبق تلك المعرفة عن طريق إنشاء خوارزميات للتلاعب بالسلاسل strings، تحديد الأعداد، بل وحساب مدار محطة الفضاء الدولية.", "في هذا المشوار ستتعلم أيضًا أسلوبين أو نموذجين مهمين للبرمجة: البرمجة كائنية التوجه (OOP) ، والبرمجة الوظيفية (FP)." ], @@ -229,7 +229,7 @@ "title": "أساسيات JavaScript", "intro": [ "إن JavaScript لغة برمجة يمكنك استخدامها لجعل صفحات الويب تفاعلية. إنها إحدى التكنولوجيات الأساسية للويب، إلى جانب HTML و CSS، وهي مدعومة بجميع المتصفحات الحديثة.", - "في هذه الدورة، ستتعلم مفاهيم البرمجة الأساسية في Javascript. ستبدأ بهياكل البيانات الأساسية مثل الأرقام والنصوص. ثم سوف تتعلم العمل مع الكائنات والقائمات والوظائف والحلقات والشروط وتعبيرات if/else وأكثر من ذلك." + "في هذه الدورة، ستتعلم مفاهيم البرمجة الأساسية في Javascript. ستبدأ بهياكل البيانات الأساسية مثل الأرقام والنصوص. ثم سوف تتعلم العمل مع الكائنات والقوائم والوظائف والحلقات والشروط وتعبيرات if/else وأكثر من ذلك." ] }, "es6": { @@ -241,9 +241,9 @@ ] }, "regular-expressions": { - "title": "التعبيرات العادية Regular Expressions", + "title": "العبارات العادية Regular Expressions", "intro": [ - "التعبيرات العادية Regular expressions، غالباً ما تسمي \"regex\" أو \"regexp\"، هي أنماط تساعد المبرمجين على المطابقة والبحث واستبدال النص. التعابير العادية قوية جداً، ولكن يمكن أن يكون من الصعب قراءتها لأنها تستخدم رموز خاصة لعمل مطابقات أكثر تعقيداً ومرونة.", + "العبارات العادية Regular expressions، غالباً ما تسمي \"regex\" أو \"regexp\"، هي أنماط تساعد المبرمجين على المطابقة والبحث واستبدال النص. التعابير العادية قوية جداً، ولكن يمكن أن يكون من الصعب قراءتها لأنها تستخدم رموز خاصة لعمل مطابقات أكثر تعقيداً ومرونة.", "في هذه الدورة، ستتعلم كيفية استخدام الرموز الخاصة، التقاط المجموعات، النظرات الإيجابية والسلبية، وتقنيات أخرى لمطابقة أي نص تريده." ] }, @@ -258,8 +258,8 @@ "basic-data-structures": { "title": "هياكل البيانات الأساسية", "intro": [ - "يمكن تخزين البيانات والوصول إليها بعدة طرق. أنت تعرف بالفعل بعض هياكل بيانات javascript الشائعة - المصفوفات والكائنات.", - "في هذه الدورة لهياكل البيانات الأساسية، ستتعلم المزيد عن الاختلافات بين المصفوفات والكائنات، وعن كيفية استخدامها في أوضاع مختلفة. سوف تتعلم أيضاً كيفية استخدام أساليب Javascript المفيدة مثل splice() و Object.keys() للوصول إلى البيانات والتلاعب بها." + "يمكن تخزين البيانات والوصول إليها بعدة طرق. أنت تعرف بالفعل بعض هياكل بيانات javascript الشائعة - القوائم والكائنات.", + "في هذه الدورة لهياكل البيانات الأساسية، ستتعلم المزيد عن الاختلافات بين القوائم والكائنات، وعن كيفية استخدامها في أوضاع مختلفة. سوف تتعلم أيضاً كيفية استخدام أساليب Javascript المفيدة مثل splice() و Object.keys() للوصول إلى البيانات والتلاعب بها." ] }, "basic-algorithm-scripting": { @@ -267,7 +267,7 @@ "intro": [ "الخوارزمية هي سلسلة من التعليمات خطوة بخطوة تصف كيفية القيام بشيء ما.", "يساعدك تفكيك المشكلة إلى أجزاء أصغر والتفكير بعناية حول كيفية حل كل جزء علي حدي بواسطة الكود البرمجي على كتابة خوارزميات اكثر فاعلية.", - "في هذه الدورة، ستتعلم أساسيات التفكير الخوارزمي عن طريق كتابة الخوارزميات التي تفعل كل شيء من تحويل درجات الحرارة إلى التعامل مع المصفوفات ثنائية الأبعاد 2D arrays المعقدة." + "في هذه الدورة، ستتعلم أساسيات التفكير الخوارزمي عن طريق كتابة خوارزميات تفعل كل شيء من تحويل درجات الحرارة إلى التعامل مع القوائم ثنائية الأبعاد 2D arrays المعقدة." ] }, "object-oriented-programming": { @@ -280,7 +280,7 @@ "functional-programming": { "title": "البرمجة الوظيفية Functional Programming", "intro": [ - "البرمجة الوظيفية هي نهج شائع آخر لتطوير البرمجيات. في البرمجة الوظيفية، يتم تنظيم الكود في وظائف أصغر وأساسية يمكن الجمع بينها لبناء برامج معقدة.", + "إن البرمجة الوظيفية نهج شائع آخر لتطوير البرمجيات. في البرمجة الوظيفية، ينظم الكود في وظائف أصغر وأساسية يمكن الجمع بينها لبناء برامج معقدة.", "في هذه الدورة، ستتعلم المفاهيم الأساسية للبرمجة الوظيفية بما في تلك الوظيفة العادية، كيفية تجنب الطفرات وكيفية كتابة كود أنظف مع أساليب مثل .map() و .filter()." ] }, @@ -305,23 +305,23 @@ "note": "", "blocks": { "build-a-caesars-cipher-project": { - "title": "بناء مشروع Caesars Cipher", + "title": "بناء مشروع شفرة قيصر", "intro": ["", ""] }, "build-a-cash-register-project": { - "title": "بناء مشروع Cash Register", + "title": "بناء مشروع مكنة لتسجيل النقود", "intro": ["", ""] }, "build-a-palindrome-checker-project": { - "title": "بناء مشروع Palindrome Checker", + "title": "أنشئ مشروع مدقق لمعاكس المقطع النصي", "intro": ["", ""] }, "build-a-roman-numeral-converter-project": { - "title": "بناء مشروع Roman Numeral Converter", + "title": "أنشئ مشروع محول للأرقام الرومانية", "intro": ["", ""] }, "build-a-telephone-number-validator-project": { - "title": "بناء مشروع Telephone Number Validator", + "title": "بناء مشروع مدقق الأرقام الهواتف", "intro": ["", ""] }, "learn-basic-javascript-by-building-a-role-playing-game": { @@ -372,7 +372,7 @@ "react": { "title": "React", "intro": [ - "React هي مكتبة شائعة من مكتبات JavaScript لبناء واجهة مستخدم قابلة لإعادة البناء اعتماداً على المكون لصفحات الويب أو التطبيقات.", + "إن React مكتبة شائعة من مكتبات JavaScript لبناء واجهة مستخدم قابلة لإعادة البناء اعتماداً على المكون لصفحات الويب أو التطبيقات.", "يجمع React بين الـ HTML ووظائف الـ JavaScript في لغة ترميز خاصة به تدعى JSX. كما أن React يجعل من السهل إدارة تدفق البيانات في التطبيق.", "في هذه الدورة ، ستتعلم كيفية إنشاء مكونات مختلفة من React وإدارة البيانات في شكل State و Props و استخدام أساليب دورة الحياة المختلفة مثل componentDidMount، وأكثر من ذلك بكثير." ] @@ -389,13 +389,13 @@ "title": "React and Redux", "intro": [ "كثيرا ما يُشار إلى React و Redux معاً، ولسبب وجيه. المطور الذي أنشأ Redux كان مطور لـ React و اراد أن يسهل مشاركة البيانات عبر المكونات المختلفة.", - "الآن بعد أن عرفت كيفية إدارة تدفق البيانات المشتركة مع Redux، حان الوقت للجمع بين تلك المعرفة و React. في دورات React و Redux، ستبني مكون React وتتعلم كيفية إدارة الحالة state محلياً على مستوى المكون. وعبر التطبيق باكمله مع Redux." + "الآن بعد أن عرفت كيفية إدارة تدفق البيانات المشتركة مع Redux، حان الوقت للجمع بين تلك المعرفة و React. في دورات React و Redux، ستبني مكون React وتتعلم كيفية إدارة الحالة state محلياً على مستوى المكون. وعبر التطبيق برمته مع Redux." ] }, "front-end-development-libraries-projects": { "title": "مشاريع مكتبات تطوير واجهة المستخدم", "intro": [ - "حان الوقت لوضع مهاراتك في مكتبات تطوير واجهات المستخدم للاختبار، استخدم Bootstrap, jQuery, Sass, React و Redux لبناء 5 مشاريع لتختبر كل ما تعلمته حتى هذه النقطة.", + "حان الوقت لوضع مهاراتك في مكتبات تطوير واجهات المستخدم للاختبار. استخدم Bootstrap, و jQuery, و Sass, و React, و Redux لبناء 5 مشروعات لتختبر ما تعلمته حتى هذه النقطة.", "أكمل جميع المشاريع الخمسة، وستحصل على شهادة في مكتبات تطوير واجهة المستخدم." ] } @@ -551,9 +551,9 @@ "back-end-development-and-apis": { "title": "تطوير الواجهات الخلفية للمواقع و واجهات برمجة التطبيقات - Back End Development and APIs", "intro": [ - "حتى هذه النقطة، لقد استخدمت JavaScript فقط في الواجهة الأمامية لإضافة تفاعل إلى صفحة، أو حل تحديات الخوارزميات، أو بناء SPA. ولكن يمكن أيضاً استخدام JavaScript في الواجهة الخلفية back end، أو الخادم، لبناء تطبيقات ويب بأكملها.", + "حتى هذه النقطة، لقد استخدمت JavaScript فقط في الواجهة الأمامية لإضافة تفاعل إلى صفحة، أو حل تحديات الخوارزميات، أو بناء SPA. ولكن يمكن أيضاً استخدام JavaScript في الواجهة الخلفية back end، أو السيرفر، لبناء تطبيقات ويب برمتها.", "واليوم، فإن إحدى الطرق الشائعة لبناء التطبيقات هي من خلال الخدمات المصّغرة microservices، وهي تطبيقات صغيرة ومحددة تعمل معاً لتشًكل وحدة اكبر.", - "في شهادة واجهة برمجة التطبيقات والـAPIs، ستتعلم كيفية انشاء تطبيقات back end جاهزة باستخدام Node.js و npm. سوف تقوم أيضا ببناء تطبيقات ويب باستخدام إطار Express وبناء microservice لـ People Finder باستخدام MongoDB ومكتبة Mongoose." + "في شهادة تطوير واجهات الBack End و الAPIs، سوف تتعلم كيف تنشئ تطبيقات back end باستخدام Node.js و npm. سوف تقوم أيضا ببناء تطبيقات الويب باستخدام إطار العمل Express، و بناء microservice لإيجاد الأفراد باستخدام MongoDB ومكتبة Mongoose." ], "note": "", "blocks": { @@ -584,7 +584,7 @@ "back-end-development-and-apis-projects": { "title": "مشاريع تطوير الواجهات الخلفية للمواقع و واجهات برمجة التطبيقات APIs", "intro": [ - "لقد عملت مع واجهة برمجة التطبيقات APIs من قبل، ولكن الآن بعد أن عرفت npm، وNode, Express، وMongoDB وMongoose، حان الوقت لبناء API بنفسك، بالاعتماد على كل ما تعلمته حتى هذه النقطة لإنشاء 5 خدمات مصغّرة microservices مختلفة، وهي تطبيقات أصغر محدودة النطاق.", + "لقد عملت مع واجهة برمجة التطبيقات APIs من قبل، ولكن الآن بعد أن عرفت npm، و Node, و Express، و MongoDB، و Mongoose، حان الوقت لبناء API بنفسك، بالاعتماد على ما تعلمته حتى هذه النقطة لإنشاء 5 خدمات مصغّرة microservices مختلفة، وهي تطبيقات أصغر محدودة النطاق.", "بعد إنشاء هذه البرمجيات، سيكون لديك 5 APIs رائعة للخدمات الصغرى يمكنك عرضها للأصدقاء والعائلة وأصحاب العمل المحتملين، وستحصل أيضًا على شهادة تطوير الواجهة الخلفية وواجهات برمجة التطبيقات." ] } @@ -778,6 +778,10 @@ "أسناد: Rosetta Code" ] }, + "the-odin-project": { + "title": "The Odin Project", + "intro": ["A description is to be determined"] + }, "project-euler": { "title": "مشروع Euler", "intro": [ diff --git a/client/i18n/locales/arabic/translations.json b/client/i18n/locales/arabic/translations.json index ca702a9f893..f2a89f3cd4f 100644 --- a/client/i18n/locales/arabic/translations.json +++ b/client/i18n/locales/arabic/translations.json @@ -11,6 +11,7 @@ "view": "عرض", "view-code": "أظهار الكود", "view-project": "إظهار المشروع", + "view-cert-title": "عرض {{certTitle}}", "show-cert": "عرض الشهادة", "claim-cert": "المطالبة بالشهادة", "save-progress": "حفظ التقدم", @@ -52,7 +53,7 @@ "check-code": "تيقن من كودك (Ctrl + Enter)", "check-code-2": "تيقن من كودك", "reset": "إعادة ضبط", - "reset-code": "أعد جميع الكود ألى حالتهم الأولية", + "reset-step": "إعادة الخطوة إلى حالتها الأولية", "help": "مساعدة", "get-help": "الحصول على المساعدة", "watch-video": "شاهد الفيديو", @@ -157,7 +158,8 @@ "honesty": "سياسة الصدق الأكاديمي", "internet": "حضورك على الإنترنت", "portfolio": "إعدادات المحفظة", - "privacy": "إعدادات الخصوصية" + "privacy": "إعدادات الخصوصية", + "personal-info": "Personal Information" }, "danger": { "heading": "منطقة الخطر", @@ -272,6 +274,7 @@ "add-subtitles": "المساعدة في تحسين أو إضافة ترجمات", "wrong-answer": "عذراً، هذه ليست الإجابة الصحيحة. قم بالمحاولة مرة أخرى؟", "check-answer": "انقر على الزر أدناه للتحقق من إجابتك.", + "assignment-not-complete": "Please finish the assignments", "solution-link": "رابط الحل", "github-link": "رابط Github", "submit-and-go": "أرسل وانتقل إلى التحدي التالي", @@ -339,6 +342,7 @@ "title": "ادعم مؤسستنا الخيرية", "processing": "نحن نقوم بمعالجة تبرعك.", "redirecting": "جارٍ إعادة توجيهك...", + "thanks": "شكرا على التبرع", "thank-you": "شكراً لكونك داعماً.", "additional": "يمكنك تقديم تبرع إضافي لمرة واحدة بأي مبلغ باستخدام هذا الرابط: <0>{{url}}", "help-more": "ساعدنا على القيام بالمزيد", @@ -462,7 +466,8 @@ "iframe-preview": "معاينة {{title}}", "iframe-alert": "عادة هذا الرابط من شأنه أن يجلبك إلى موقع آخر! إنه يعمل. هذا رابط: {{externalLink}}", "iframe-form-submit-alert": "عادة سيتم تقديم هذا النموذج! إنه يعمل. سيتم إرسال هذا إلى: {{externalLink}}", - "document-notfound": "لم يوجد المستند" + "document-notfound": "لم يوجد المستند", + "slow-load-msg": "يبدو أن هذا يستغرق وقتاً أطول من المعتاد، الرجاء محاولة تحديث الصفحة." }, "icons": { "gold-cup": "كأس الذهب", @@ -507,7 +512,8 @@ "step": "الخطوة", "steps": "الخطوات", "steps-for": "خطوات {{blockTitle}}", - "code-example": "{{codeName}} مثال على الكود" + "code-example": "{{codeName}} مثال على الكود", + "opens-new-window": "فتح في نافذة جديدة" }, "flash": { "honest-first": "للمطالبة بشهادة ، يجب عليك أولاً قبول سياسة الصدق الأكاديمي الخاصة بنا", @@ -604,10 +610,10 @@ "source": "المصدر", "footnote": "إذا كنت تشك في أن أيا من هذه المشاريع ينتهك <2>سياسة الأمانة الأكاديمية، يرجى <5>إبلاغ فريقنا بهذا .", "title": { - "Build a Personal Portfolio Webpage": "قم ببناء مشروع صفحة ويب لعرض نماذج الاعمال الشخصية", + "Build a Personal Portfolio Webpage": "أنشئ معرضا لأعمالك الخاصة", "Build a Random Quote Machine": "بناء آلة عرض اقتباسات عشوائية", "Build a 25 + 5 Clock": "بناء ساعة 25 + 5", - "Build a JavaScript Calculator": "بناء حاسبة بإستخدام JavaScript", + "Build a JavaScript Calculator": "بناء آلة حاسبة باستخدام JavaScript", "Show the Local Weather": "إظهار الطقس المحلي", "Use the TwitchTV JSON API": "استخدام TwitchTV JSON API", "Stylize Stories on Camper News": "نسق قصص على أخبار Camper", @@ -641,14 +647,14 @@ "Anonymous Message Board": "لوحة الرسائل المجهولة", "Build a Tribute Page": "بناء مشروع صفحة الثناء", "Build a Survey Form": "بناء مشروع نموذج الدراسة الاستقصائية", - "Build a Product Landing Page": "بناء صفحة هبوط لمنتج", + "Build a Product Landing Page": "أنشئ صفحة لعرض المنتج", "Build a Technical Documentation Page": "بناء مشروع صفحة التوثيق التقني", "Palindrome Checker": "مدقق باليندروم", "Roman Numeral Converter": "تحويل الأرقام الرومانية", "Caesars Cipher": "Caesars Cipher", "Telephone Number Validator": "مدقق رقم الهاتف", "Cash Register": "سجل النقدية", - "Build a Drum Machine": "بناء آلة الدرامز", + "Build a Drum Machine": "أنشئ آلة الطبول", "Visualize Data with a Choropleth Map": "التصوير المرئي للبيانات باستخدام خريطة التمثيل اللوني", "Visualize Data with a Treemap Diagram": "التصوير المرئي للبيانات باستخدام الخريطة الشجرية", "Exercise Tracker": "متعقب التمارين", @@ -701,19 +707,19 @@ "data-analysis-with-python-v7": "شهادة تحليل البيانات باستخدام Python", "Information Security": "أمن المعلومات", "information-security-v7": "شهادة امن المعلومات", - "Machine Learning with Python": "Machine Learning with Python", - "machine-learning-with-python-v7": "Machine Learning with Python Certification", - "Legacy Front End": "Legacy Front End", - "legacy-front-end": "Front End Certification", - "Legacy Back End": "Legacy Back End", - "legacy-back-end": "Back End Certification", - "Legacy Data Visualization": "Legacy Data Visualization", - "legacy-data-visualization": "Data Visualization Certification", + "Machine Learning with Python": "تعلم الآلة باستخدام Python", + "machine-learning-with-python-v7": "مشاريع تعلم الآله باستخدام Python", + "Legacy Front End": "الواجهة الأمامية التراثية", + "legacy-front-end": "شهادة الواجهة الأمامية التراثية", + "Legacy Back End": "الواجهة الخلفية التراثية", + "legacy-back-end": "شهادة الواجهة الخلفية التراثية", + "Legacy Data Visualization": "التصوير المرئي للبيانات التراثي", + "legacy-data-visualization": "شهادة التصوير المرئي للبيانات", "Legacy Information Security and Quality Assurance": "أمن المعلومات وشهادة ضمان الجودة التراثية", "information-security-and-quality-assurance": "شهادة أمن المعلومات وشهادة ضمان الجودة", - "Legacy Full Stack Certification": "Legacy Full Stack Certification", - "Legacy Full Stack": "Legacy Full Stack", - "full-stack": "Full Stack Certification" + "Legacy Full Stack Certification": "شهادة الشامل الخلفية التراثية", + "Legacy Full Stack": "الشامل الخلفية التراثية", + "full-stack": "شهادة الشامل الخلفية" } }, "certification-card": { diff --git a/client/i18n/locales/chinese-traditional/intro.json b/client/i18n/locales/chinese-traditional/intro.json index cf1d7d84510..8cc8822a4e6 100644 --- a/client/i18n/locales/chinese-traditional/intro.json +++ b/client/i18n/locales/chinese-traditional/intro.json @@ -553,7 +553,7 @@ "intro": [ "在這之前,你只是在前端使用 JavaScript 來給頁面添加交互、解決算法挑戰,或構建一個 SPA(單頁應用程序)。但 JavaScript 也可以用於後端或者服務器來構建整個 web 應用程序。", "今天,構建應用軟件的廣受歡迎的方法之一是微服務,這些微服務是一種小型模塊化的應用,能夠共同形成一個更大的整體。", - "在後端開發和 APIs 認證中,你將學習如何使用 Node.js 和 npm(Node 包管理工具)來寫後端。你還將使用 Express 框架構建 web 應用程序,並使用 MongoDB 和 Mongoose 庫構建一個 People Finder 微服務。" + "In the Back End Development and APIs Certification, you'll learn how to write back end apps with Node.js and npm. You'll also build web applications with the Express framework, and build a People Finder microservice with MongoDB and the Mongoose library." ], "note": "", "blocks": { @@ -778,6 +778,10 @@ "屬性:Rosetta 代碼" ] }, + "the-odin-project": { + "title": "The Odin Project", + "intro": ["A description is to be determined"] + }, "project-euler": { "title": "歐拉計劃", "intro": [ diff --git a/client/i18n/locales/chinese-traditional/motivation.json b/client/i18n/locales/chinese-traditional/motivation.json index d65a69bb268..12eb62efeed 100644 --- a/client/i18n/locales/chinese-traditional/motivation.json +++ b/client/i18n/locales/chinese-traditional/motivation.json @@ -1,819 +1,856 @@ { "compliments": [ - "Over the top!", - "Down the rabbit hole we go!", - "Bring that rain!", - "Target acquired.", - "Feel that need for speed!", - "You've got guts!", - "We have liftoff!", - "To infinity and beyond!", - "Encore!", - "Onward!", - "Challenge destroyed!", - "It's on like Donkey Kong!", - "Power level? It's over 9000!", - "Coding spree!", - "Code long and prosper.", - "The crowd goes wild!", - "One for the Guinness book!", - "Flawless victory!", - "Most efficient!", - "You've got the touch!", - "You're on fire!", - "The town is now red!", - "To the nines!", - "To the Batmobile!", - "Pull out all the stops!", - "You're a wizard, Harry!", - "You're an all-star!", - "Way to go!", - "Outta sight!", - "You're crushing it!", - "What sorcery is this?", - "The world rejoices!", - "That's the way it's done!", - "You rock!", - "Woo-hoo!", - "We knew you could do it!", - "Hyper Combo Finish!", - "Nothing but net!", - "Boom-shakalaka!", - "You're a shooting star!", - "You're unstoppable!", - "Way cool!", - "Walk on that sunshine!", - "Keep on trucking!", - "Off the charts!", - "There is no spoon!", - "Cranked it up to 11!", - "Escape velocity reached!", - "You make this look easy!", - "Passed with flying colors!", - "You've got this!", - "Happy, happy, joy, joy!", - "Tomorrow, the world!", - "Your powers combined!", - "It's alive. It's alive!", - "Sonic Boom!", - "Here's looking at you, Code!", - "Ride like the wind!", - "Legen - wait for it - dary!", - "Ludicrous Speed! Go!", - "Most triumphant!", - "One loop to rule them all!", - "By the power of Grayskull!", - "You did it!", - "Storm that castle!", - "Face-melting guitar solo!", - "Checkmate!", - "Bodacious!", - "Tubular!", - "You're outta sight!", - "Keep calm and code on!", - "Even sad panda smiles!", - "Even grumpy cat approves!", - "Kool Aid Man says oh yeah!", - "Bullseye!", - "Far out!", - "You're heating up!", - "Standing ovation!", - "Nice one!", - "All right!", - "Hasta la vista, challenge!", - "Terminated.", - "Off the hook!", - "Thundercats, Hooo!", - "Shiver me timbers!", - "Raise the roof!", - "Bingo!", - "Even Honey Badger cares!", - "Helm, Warp Nine. Engage!", - "Gotta code 'em all!", - "Spool up the FTL drive!", - "Cool beans!", - "They're in another castle.", - "Power UP!", - "Pikachu chooses you!", - "I gotta have more cowbell.", - "Gotta go fast!", - "Yippee!", - "Cowabunga!", - "Moon Prism Power!", - "Plus Ultra!" + "太棒了!", + "我們跳進兔子洞!", + "雨下吧!", + "獲取目標。", + "體驗極速快感!", + "你有膽量!", + "我們升空了!", + "飛向無限!", + "再來一次!", + "向前進!", + "挑戰被摧毀!", + "重磅如同大金剛!", + "戰鬥力?超過 9000!", + "編碼狂潮!", + "編碼不息,繁榮昌盛。", + "人羣變得瘋狂!", + "一個吉尼斯世界紀錄!", + "完勝!", + "最高效率!", + "你有手感了!", + "你正在燃燒!", + "滿城春色!", + "完美!", + "上蝙蝠車!", + "全力以赴!", + "你是個巫師,哈利!", + "你是全明星隊員!", + "幹得好!", + "棒極了!", + "你太出色了!", + "這是什麼魔法?", + "世界歡欣鼓舞!", + "難題就是這樣搞定的!", + "你真棒!", + "嗚呼!", + "我們就知道你能行!", + "超級組合終結!", + "空心球!", + "炸彈-沙卡拉卡!", + "你是一顆流星!", + "你勢不可擋!", + "太酷了!", + "走在那陽光下!", + "堅持下去!", + "水平爆表!", + "勺子並不存在!", + "調到最大音量!", + "達到逃逸速度!", + "你讓這看起來很簡單!", + "以優異的成績通過!", + "你能行!", + "開心,開心,快樂,快樂!", + "明天,征服世界!", + "你的全部力量!", + "它活了。它活了!", + "索尼克音爆!", + "看着你呢,代碼!", + "疾馳如風!", + "傳——奇!", + "離譜的速度!出發!", + "高奏凱歌!", + "用一個循環來統治它們!", + "憑藉灰殼堡的神力!", + "你做到了!", + "衝進城堡!", + "蕩人心魄的吉他獨奏!", + "完全擊敗!", + "大有膽識!", + "厲害!", + "你真強啊!", + "保持冷靜,繼續編碼!", + "即使是悲傷的熊貓也會微笑!", + "即使脾氣暴躁的貓也同意!", + "如此感覺無以倫比。", + "正中靶心!", + "前衛!", + "燃燒吧,小宇宙!", + "起立鼓掌!", + "不錯!", + "好啊!", + "回見,挑戰!", + "終結了。", + "脫身!", + "霹靂貓顯神威!", + "讓我五體投地!", + "大顯身手!", + "答對了!", + "連蜜獾都在乎!", + "掌舵,第九曲速。啓動!", + "必須全部編碼!", + "發動超光速引擎!", + "酷豆子!", + "她們在另一個城堡裏。", + "加電!", + "皮卡丘選擇了你!", + "我要再多點牛鈴。", + "得快點!", + "了不起!", + "卡瓦邦嘎!", + "月亮棱鏡能量!", + "超越極致!", + "米爾豪斯一切都會好起來的!" ], "motivationalQuotes": [ { - "quote": "Whatever you are, be a good one.", - "author": "Abraham Lincoln" + "quote": "不管你是誰,做個好人。", + "author": "亞伯拉罕·林肯" }, { - "quote": "A change in perspective is worth 80 IQ points.", - "author": "Alan Kay" + "quote": "換一個角度看問題值80點智商。", + "author": "艾倫·凱" }, { - "quote": "The best way to predict the future is to invent it.", - "author": "Alan Kay" + "quote": "預測未來的最好方法是創造未來。", + "author": "艾倫·凱" }, { - "quote": "The future is not laid out on a track. It is something that we can decide, and to the extent that we do not violate any known laws of the universe, we can probably make it work the way that we want to.", - "author": "Alan Kay" + "quote": "未來不是在軌道上規劃的。這是我們可以決定的事情,只要我們不違反任何已知的宇宙法則,我們就可以讓它按我們想要的方式運行。", + "author": "艾倫·凱" }, { - "quote": "We can only see a short distance ahead, but we can see plenty there that needs to be done.", - "author": "Alan Turing" + "quote": "我們只能看到前面很短的距離,但我們可以看到有很多事情需要做。", + "author": "艾倫·圖靈" }, { - "quote": "In the depth of winter, I finally learned that within me there lay an invincible summer.", - "author": "Albert Camus" + "quote": "隆冬時節,我終於明白,我的內心深處有一個不可戰勝的夏天。", + "author": "阿爾伯特·加繆" }, { - "quote": "A person who never made a mistake never tried anything new.", - "author": "Albert Einstein" + "quote": "從不犯錯的人從不嘗試新事物。", + "author": "阿爾伯特·愛因斯坦" }, { - "quote": "Creativity is intelligence having fun.", - "author": "Albert Einstein" + "quote": "創造力是智力的樂趣。", + "author": "阿爾伯特·愛因斯坦" }, { - "quote": "I have no special talents. I am only passionately curious.", - "author": "Albert Einstein" + "quote": "我沒有什麼特別的才能。我只是非常好奇。", + "author": "阿爾伯特·愛因斯坦" }, { - "quote": "Life is like riding a bicycle. To keep your balance, you must keep moving.", - "author": "Albert Einstein" + "quote": "生活就像騎自行車。爲了保持平衡,你必須繼續前進。", + "author": "阿爾伯特·愛因斯坦" }, { - "quote": "Make everything as simple as possible, but not simpler.", - "author": "Albert Einstein" + "quote": "事情應該力求簡單,但不能過於簡單。", + "author": "阿爾伯特·愛因斯坦" }, { - "quote": "Never memorize something that you can look up.", - "author": "Albert Einstein" + "quote": "絕不要去記那些你能夠查得到的東西。", + "author": "阿爾伯特·愛因斯坦" }, { - "quote": "Once we accept our limits, we go beyond them.", - "author": "Albert Einstein" + "quote": "一旦我們接受了自己的極限,我們就超越了它們。", + "author": "阿爾伯特·愛因斯坦" }, { - "quote": "Play is the highest form of research.", - "author": "Albert Einstein" + "quote": "玩耍是研究的最高形式。", + "author": "阿爾伯特·愛因斯坦" }, { - "quote": "We cannot solve our problems with the same thinking we used when we created them.", - "author": "Albert Einstein" + "quote": "我們不能用我們創造問題時的思維來解決問題。", + "author": "阿爾伯特·愛因斯坦" }, { - "quote": "Wisdom is not a product of schooling but of the lifelong attempt to acquire it.", - "author": "Albert Einstein" + "quote": "智慧不是學校教育的產物,而是終身學習的產物。", + "author": "阿爾伯特·愛因斯坦" }, { - "quote": "Your imagination is your preview of life's coming attractions.", - "author": "Albert Einstein" + "quote": "你的想像是你人生的預覽。", + "author": "阿爾伯特·愛因斯坦" }, { - "quote": "There is only one corner of the universe you can be certain of improving, and that's your own self.", - "author": "Aldous Huxley" + "quote": "宇宙中只有一個角落是你可以切實改進的,那就是你自己。", + "author": "奧爾德斯·赫胥黎" }, { - "quote": "The most common way people give up their power is by thinking they don't have any.", - "author": "Alice Walker" + "quote": "我感謝我的奮鬥,因爲沒有它,我就不會偶然發現自己的力量。", + "author": "亞歷克斯·艾爾" }, { - "quote": "Follow your inner moonlight. Don't hide the madness.", - "author": "Allen Ginsberg" + "quote": "人們放棄權力最常見的方式是認爲自己沒有權力。", + "author": "艾麗絲·沃克" }, { - "quote": "The most difficult thing is the decision to act. The rest is merely tenacity.", - "author": "Amelia Earhart" + "quote": "跟隨你內心的月光。別掩飾自己的瘋狂。", + "author": "艾倫·金斯伯格" }, { - "quote": "Life shrinks or expands in proportion with one's courage.", - "author": "Anaïs Nin" + "quote": "最困難的是決定採取行動。剩下的只是堅韌。", + "author": "阿梅莉亞·埃爾哈特" }, { - "quote": "Weeks of programming can save you hours of planning.", - "author": "Unknown" + "quote": "生命的縮小或擴大與一個人的勇氣成正比。", + "author": "阿奈斯·寧" }, { - "quote": "Quality is not an act, it is a habit.", - "author": "Aristotle" + "quote": "數週的編程可以節省你數小時的計劃。", + "author": "佚名" }, { - "quote": "Start where you are. Use what you have. Do what you can.", - "author": "Arthur Ashe" + "quote": "質量不是一種行爲,而是一種習慣。", + "author": "亞里士多德" }, { - "quote": "Nothing is impossible, the word itself says \"I'm possible\"!", - "author": "Audrey Hepburn" + "quote": "從現在開始。利用你所擁有的。盡你所能。", + "author": "亞瑟·阿什" }, { - "quote": "Every strike brings me closer to the next home run.", - "author": "Babe Ruth" + "quote": "沒有什麼是不可能的,連這個詞本身都說“不,可能”!", + "author": "奧黛麗·赫本" }, { - "quote": "By failing to prepare, you are preparing to fail.", - "author": "Benjamin Franklin" + "quote": "每一擊都讓我離下一個本壘打越來越近。", + "author": "貝比·魯斯" }, { - "quote": "Tell me and I forget. Teach me and I remember. Involve me and I learn.", - "author": "Benjamin Franklin" + "quote": "如果你沒有做好準備,你就是在準備失敗。", + "author": "本傑明·富蘭克林" }, { - "quote": "Well done is better than well said.", - "author": "Benjamin Franklin" + "quote": "告訴我,我會忘記。教我,我會記住。讓我參與,我會學習。", + "author": "本傑明·富蘭克林" }, { - "quote": "There are no short cuts to any place worth going.", - "author": "Beverly Sills" + "quote": "說得好不如做得好。", + "author": "本傑明·富蘭克林" }, { - "quote": "Controlling complexity is the essence of computer programming.", - "author": "Brian Kernighan" + "quote": "任何值得去的地方都沒有捷徑。", + "author": "貝弗利·希爾斯" }, { - "quote": "I fear not the man who has practiced 10,000 kicks once, but I fear the man who has practiced one kick 10,000 times.", - "author": "Bruce Lee" + "quote": "控制複雜性是計算機編程的本質。", + "author": "布萊恩·科尼漢" }, { - "quote": "There are far, far better things ahead than any we leave behind.", - "author": "C.S. Lewis" + "quote": "我不怕遇到練習過一萬種腿法的對手,但害怕遇到只將一種腿法練習一萬次的強敵。", + "author": "李小龍" }, { - "quote": "We are what we believe we are.", - "author": "C.S. Lewis" + "quote": "比起遺落在過去的,未來還有更加美好的在等待着我們。", + "author": "C.S. 路易斯" }, { - "quote": "With the possible exception of the equator, everything begins somewhere.", - "author": "C.S. Lewis" + "quote": "我們就是我們所相信的自己。", + "author": "C.S. 路易斯" }, { - "quote": "You are never too old to set another goal, or to dream a new dream.", - "author": "C.S. Lewis" + "quote": "可能除了赤道以外,一切都從某處開始。", + "author": "C.S. 路易斯" }, { - "quote": "Somewhere, something incredible is waiting to be known.", - "author": "Carl Sagan" + "quote": "無論年紀多大,你都可以設立新目標或擁有新夢想。", + "author": "C.S. 路易斯" }, { - "quote": "If you're not making mistakes, then you're not making decisions.", - "author": "Catherine Cook" + "quote": "在某個地方,一些不可思議的事物正在等你去發現。", + "author": "卡爾·薩根" }, { - "quote": "Find what you love and let it kill you.", - "author": "Charles Bukowski" + "quote": "當你有夢想時,你必須抓住它,永不放棄。", + "author": "卡羅爾·伯內特" }, { - "quote": "What matters most is how well you walk through the fire.", - "author": "Charles Bukowski" + "quote": "如果你沒有犯錯誤,那麼你就沒有做決定。", + "author": "凱瑟琳·庫克" }, { - "quote": "It is not the strongest of the species that survive, nor the most intelligent, but the one most responsive to change.", - "author": "Charles Darwin" + "quote": "愛我所愛,至死方休。", + "author": "查爾斯·布考斯基" }, { - "quote": "Life is 10% what happens to you and 90% how you react to it.", - "author": "Charles R. Swindoll" + "quote": "最重要的是你能否赴湯蹈火。", + "author": "查爾斯·布考斯基" }, { - "quote": "You will do foolish things, but do them with enthusiasm.", - "author": "Colette" + "quote": "生存下來的不是最強壯的物種,也不是最聰明的物種,而是最能適應變化的物種。", + "author": "查爾斯·達爾文" }, { - "quote": "It does not matter how slowly you go as long as you do not stop.", - "author": "Confucius" + "quote": "細節不僅是細節,而且決定了設計。", + "author": "查爾斯·伊姆斯" }, { - "quote": "Real knowledge is to know the extent of one's ignorance.", - "author": "Confucius" + "quote": "創造力不僅僅是與衆不同。任何人都可以做到怪誕不經,這很簡單。難的是像巴赫那樣簡單。使簡單的,非常簡單,這就是創造力。", + "author": "查爾斯·明格斯" }, { - "quote": "The past cannot be changed. The future is yet in your power.", - "author": "Confucius" + "quote": "生活的 10% 是發生在你身上的事,90% 是你對它的反應。", + "author": "查爾斯·R·斯溫多爾" }, { - "quote": "Looking at code you wrote more than two weeks ago is like looking at code you are seeing for the first time.", - "author": "Dan Hurvitz" + "quote": "你不免會做傻事,但熱烈地、衷心地投入做吧。", + "author": "科萊特" }, { - "quote": "Someday is not a day of the week.", - "author": "Denise Brennan-Nelson" + "quote": "譬如爲山,未成一簣,止,吾止也。譬如平地,雖覆一簣,進,吾往也。", + "author": "孔子" }, { - "quote": "UNIX is simple. It just takes a genius to understand its simplicity.", - "author": "Dennis Ritchie" + "quote": "知之爲知之,不知爲不知,是知也。", + "author": "孔子" }, { - "quote": "Computers are good at following instructions, but not at reading your mind.", - "author": "Donald Knuth" + "quote": "往昔不可諫,來者猶可追。", + "author": "孔子" }, { - "quote": "A good programmer is someone who always looks both ways before crossing a one-way street.", - "author": "Doug Linder" + "quote": "看着自己兩個多星期前編寫的代碼就像第一次看到這代碼一樣。", + "author": "丹·赫維茨" }, { - "quote": "Tough times never last, but tough people do.", - "author": "Dr. Robert Schuller" + "quote": "“總有一天”不是一週中的一天。", + "author": "丹尼斯·布倫南-納爾遜" }, { - "quote": "If things start happening, don't worry, don't stew, just go right along and you'll start happening too.", - "author": "Dr. Seuss" + "quote": "UNIX很簡單。不過只有天才才能理解它的簡單性。", + "author": "丹尼斯·裏奇" }, { - "quote": "Do not go gentle into that good night. Rage, rage against the dying of the light.", - "author": "Dylan Thomas" + "quote": "在我看來,要想見彩虹,就得忍受風雨!", + "author": "多莉·帕頓" }, { - "quote": "The question of whether computers can think is like the question of whether submarines can swim.", - "author": "E.W. Dijkstra" + "quote": "計算機善於遵循指令,但不善於理解你的思維。", + "author": "唐納德·克努特" }, { - "quote": "Any code of your own that you haven't looked at for six or more months might as well have been written by someone else.", - "author": "Eagleson's Law" + "quote": "優秀的程序員總是在過單行道之前兩邊都看一下。", + "author": "道格·林德" }, { - "quote": "Do one thing every day that scares you.", - "author": "Eleanor Roosevelt" + "quote": "創造力是狂野的頭腦和訓練有素的眼睛。", + "author": "多蘿西·帕克" }, { - "quote": "With the new day comes new strength and new thoughts.", - "author": "Eleanor Roosevelt" + "quote": "艱苦的時光終將過去,堅強的人們必將苦盡甘來。", + "author": "羅伯特·舒勒博士" }, { - "quote": "You must do the things you think you cannot do.", - "author": "Eleanor Roosevelt" + "quote": "如果事情開始發生,不要發愁,不要擔憂,只要一直走下去,你也會開始發生的。", + "author": "蘇斯博士" }, { - "quote": "Light tomorrow with today.", - "author": "Elizabeth Barrett Browning" + "quote": "不要溫和地走進那良夜。怒斥,怒斥光明的消逝。", + "author": "狄蘭·托馬斯" }, { - "quote": "Forever is composed of nows.", - "author": "Emily Dickinson" + "quote": "計算機能否思考的問題就像潛艇能否游泳的問題一樣。", + "author": "E·W·迪科斯徹" }, { - "quote": "Computer science education cannot make anybody an expert programmer any more than studying brushes and pigment can make somebody an expert painter.", - "author": "Eric Raymond" + "quote": "自己寫的代碼,只要有六個月沒有看過,就像是別人寫的一樣。", + "author": "伊格爾森定律" }, { - "quote": "If you don't risk anything, you risk even more.", - "author": "Erica Jong" + "quote": "每天做一件讓你害怕的事。", + "author": "埃莉諾·羅斯福" }, { - "quote": "The world breaks everyone, and afterward, many are strong at the broken places.", - "author": "Ernest Hemingway" + "quote": "新的一天帶來了新的力量和新的思想。", + "author": "埃莉諾·羅斯福" }, { - "quote": "There is nothing noble in being superior to your fellow man; true nobility is being superior to your former self.", - "author": "Ernest Hemingway" + "quote": "你必須做你自己認爲做不到的事。", + "author": "埃莉諾·羅斯福" }, { - "quote": "Never confuse a single defeat with a final defeat.", - "author": "F. Scott Fitzgerald" + "quote": "用今天照亮明天。", + "author": "伊麗莎白·巴雷特·布朗寧" }, { - "quote": "I attribute my success to this - I never gave or took any excuse.", - "author": "Florence Nightingale" + "quote": "如果你的夢想沒有嚇到你,那是因爲你夢想得還不夠大。", + "author": "愛倫·約翰森·希爾麗夫" }, { - "quote": "The best revenge is massive success.", - "author": "Frank Sinatra" + "quote": "永遠是由現在組成的。", + "author": "艾米莉·狄金森" }, { - "quote": "The only limit to our realization of tomorrow, will be our doubts of today.", - "author": "Franklin D. Roosevelt" + "quote": "計算機科學教育不能使任何人成爲專家程序員,正如學習畫筆和顏料無法讓人成爲繪畫專家一樣。", + "author": "埃裏克·雷蒙德" }, { - "quote": "Right or wrong, it's very pleasant to break something from time to time.", - "author": "Fyodor Dostoevsky" + "quote": "如果你不冒任何風險,你的風險就更大。", + "author": "艾瑞卡·瓊" }, { - "quote": "The harder I work, the luckier I get.", - "author": "Gary Player" + "quote": "生活總是讓我們遍體鱗傷,但到後來,那些受傷的地方會變得更堅強。", + "author": "厄內斯特·海明威" }, { - "quote": "Giving up is the only sure way to fail.", - "author": "Gena Showalter" + "quote": "優於別人,並不高貴,真正的高貴應該是優於過去的自己。", + "author": "厄內斯特·海明威" }, { - "quote": "The only truly secure system is one that is powered off, cast in a block of concrete and sealed in a lead-lined room with armed guards.", - "author": "Gene Spafford" + "quote": "永遠不要將一次失敗與最終失敗混淆。", + "author": "F. 斯科特·菲茨傑拉德" }, { - "quote": "A life spent making mistakes is not only more honorable, but more useful than a life spent doing nothing.", - "author": "George Bernard Shaw" + "quote": "我將我的成功歸功於此——我從不找,也不接受任何藉口。", + "author": "弗洛倫斯·南丁格爾" }, { - "quote": "First learn computer science and all the theory. Next develop a programming style. Then forget all that and just hack.", - "author": "George Carrette" + "quote": "最好的報復是巨大的成功。", + "author": "弗蘭克·西納特拉" }, { - "quote": "Discovering the unexpected is more important than confirming the known.", - "author": "George Box" + "quote": "我們實現明天的唯一限制是我們對今天的懷疑。", + "author": "富蘭克林·羅斯福" }, { - "quote": "We only see what we know.", - "author": "Goethe" + "quote": "不管是對是錯,時不時弄壞點東西是一件非常愉快的事情。", + "author": "陀思妥耶夫斯基" }, { - "quote": "Without hard work, nothing grows but weeds.", - "author": "Gordon B. Hinckley" + "quote": "我越努力,就越幸運。", + "author": "蓋瑞·普萊爾" }, { - "quote": "The function of good software is to make the complex appear to be simple.", - "author": "Grady Booch" + "quote": "放棄是失敗的唯一可靠途徑。", + "author": "吉娜·肖沃爾特" }, { - "quote": "When you know that you're capable of dealing with whatever comes, you have the only security the world has to offer.", - "author": "Harry Browne" + "quote": "唯一真正安全的系統是斷了電、澆鑄在混凝土塊中、並密封在有武裝警衛的鉛襯房間內的系統。", + "author": "金·斯帕福德" }, { - "quote": "Pain is inevitable. Suffering is optional.", - "author": "Haruki Murakami" + "quote": "一生犯錯誤不僅比一生無所事事更光榮,而且更有用。", + "author": "蕭伯納" }, { - "quote": "Optimism is the faith that leads to achievement. Nothing can be done without hope and confidence.", - "author": "Helen Keller" + "quote": "首先學會計算機科學和所有的理論。 然後發展出一個編程風格。之後便要忘掉所有這些,自由地編碼。", + "author": "喬治·卡雷特" }, { - "quote": "The price of anything is the amount of life you exchange for it.", - "author": "Henry David Thoreau" + "quote": "發現意想不到的比確認已知的更重要。", + "author": "喬治·博克斯" }, { - "quote": "Whether you think you can or think you can't, you're right.", - "author": "Henry Ford" + "quote": "我們只能看到自己所知的。", + "author": "歌德" }, { - "quote": "The most exciting phrase to hear in science, the one that heralds discoveries, is not 'Eureka!' but 'Now that's funny…'", - "author": "Isaac Asimov" + "quote": "不努力耕耘,只會長出雜草。", + "author": "戈登·B·欣克利" }, { - "quote": "We are all failures. At least the best of us are.", - "author": "J.M. Barrie" + "quote": "好的軟件的功能就是化繁爲簡。", + "author": "格雷迪·布奇" }, { - "quote": "You can't wait for inspiration. You have to go after it with a club.", - "author": "Jack London" + "quote": "當你知道自己有能力應對任何事情時,你就擁有了世界所能提供的唯一安全感。", + "author": "哈利·布朗" }, { - "quote": "Don't wish it were easier, wish you were better.", - "author": "Jim Rohn" + "quote": "痛苦不可避免,但可以選擇是否受苦。", + "author": "村上春樹" }, { - "quote": "By seeking and blundering we learn.", - "author": "Johann Wolfgang von Goethe" + "quote": "樂觀是導致成就的信念。沒有希望和信心,就什麼都做不了。", + "author": "海倫·凱勒" }, { - "quote": "Knowing is not enough; we must apply. Wishing is not enough; we must do.", - "author": "Johann Wolfgang von Goethe" + "quote": "任何東西的價格都等於你用多少生命去換取它。", + "author": "亨利·大衛·梭羅" }, { - "quote": "We first make our habits, then our habits make us.", - "author": "John Dryden" + "quote": "不管你認爲你能還是不能,你都是對的。", + "author": "亨利·福特" }, { - "quote": "The power of imagination makes us infinite.", - "author": "John Muir" + "quote": "在科學中聽到的最令人興奮的短語,即預示着發現的短語,不是“找到了!” 而是“這很有趣……”", + "author": "艾薩克·阿西莫夫" }, { - "quote": "May you live every day of your life.", - "author": "Jonathan Swift" + "quote": "你所做的會有影響。你必須決定你想要做出什麼樣的改變。", + "author": "簡·古道爾" }, { - "quote": "Perseverance is failing 19 times and succeeding the 20th.", - "author": "Julie Andrews" + "quote": "我們都是失敗者。至少我們中最好的人是。", + "author": "J.M.巴里" }, { - "quote": "The work of today is the history of tomorrow, and we are its makers.", - "author": "Juliette Gordon Low" + "quote": "你不能等待靈感。你必須提着木棒去追求它。", + "author": "傑克·倫敦" }, { - "quote": "If you reveal your secrets to the wind, you should not blame the wind for revealing them to the trees.", - "author": "Kahlil Gibran" + "quote": "不要希望事情更容易,希望你更有能力。", + "author": "吉姆·羅恩" }, { - "quote": "Optimism is an occupational hazard of programming; feedback is the treatment.", - "author": "Kent Beck" + "quote": "我們通過尋找和犯錯誤來學習。", + "author": "約翰·沃爾夫岡·馮·歌德" }, { - "quote": "Opportunity does not knock, it presents itself when you beat down the door.", - "author": "Kyle Chandler" + "quote": "知道是不夠的;我們必須應用。希望是不夠的;我們必須行動。", + "author": "約翰·沃爾夫岡·馮·歌德" }, { - "quote": "To iterate is human, to recurse divine.", - "author": "Peter Deutsch" + "quote": "我們先養成習慣,然後習慣造就我們。", + "author": "約翰·德萊登" }, { - "quote": "A good traveler has no fixed plans and is not intent on arriving.", - "author": "Lao Tzu" + "quote": "想象力使我們無限。", + "author": "約翰·繆爾" }, { - "quote": "An ant on the move does more than a dozing ox.", - "author": "Lao Tzu" + "quote": "願你過好每一天。", + "author": "喬納森·斯威夫特" }, { - "quote": "Do the difficult things while they are easy and do the great things while they are small. A journey of a thousand miles must begin with a single step.", - "author": "Lao Tzu" + "quote": "堅持就是前 19 次失敗,第 20 次成功。", + "author": "朱莉·安德魯斯" }, { - "quote": "That's the thing about people who think they hate computers. What they really hate is lousy programmers.", - "author": "Larry Niven" + "quote": "今天的工作就是明天的歷史,我們是它的創造者。", + "author": "朱麗葉·戈登·洛" }, { - "quote": "It had long since come to my attention that people of accomplishment rarely sat back and let things happen to them. They went out and happened to things.", - "author": "Leonardo da Vinci" + "quote": "如果你向風泄露了你的祕密,你不應該責怪風將它們泄露給樹木。", + "author": "紀伯倫" }, { - "quote": "If you're any good at all, you know you can be better.", - "author": "Lindsay Buckingham" + "quote": "樂觀是編程的職業病;反饋就是治療。", + "author": "肯特·貝克" }, { - "quote": "If people never did silly things, nothing intelligent would ever get done.", - "author": "Ludwig Wittgenstein" + "quote": "機會不會敲門,它會在你敲門的時候出現。", + "author": "凱爾·錢德勒" }, { - "quote": "You only live once, but if you do it right, once is enough.", - "author": "Mae West" + "quote": "迭代的是人,遞歸的是神。", + "author": "彼得·多伊奇" }, { - "quote": "Live as if you were to die tomorrow. Learn as if you were to live forever.", - "author": "Mahatma Gandhi" + "quote": "善行無轍跡,善言無瑕謫。", + "author": "老子" }, { - "quote": "Strength does not come from physical capacity. It comes from an indomitable will.", - "author": "Mahatma Gandhi" + "quote": "合抱之木,生於毫末;九層之臺,起於累土;千里之行,始於足下。", + "author": "老子" }, { - "quote": "One person's 'paranoia' is another person's 'engineering redundancy'.", - "author": "Marcus J. Ranum" + "quote": "那些認爲自己討厭電腦的人就是這樣。他們真正討厭的是糟糕的程序員。", + "author": "拉里·尼文" }, { - "quote": "Nothing in life is to be feared, it is only to be understood. Now is the time to understand more, so that we may fear less.", - "author": "Marie Curie" + "quote": "我早就發現,成功的人很少坐以待斃,讓事情發生在他們身上。他們出去主動去做事。", + "author": "達芬奇" }, { - "quote": "If you have everything under control, you're not moving fast enough.", - "author": "Mario Andretti" + "quote": "如果你有一點才能,你就會知道你還可以做得更好。", + "author": "林賽·白金漢" }, { - "quote": "Education: the path from cocky ignorance to miserable uncertainty.", - "author": "Mark Twain" + "quote": "如果人們從不做傻事,就什麼都不會做得聰明。", + "author": "路德維希·維特根斯坦" }, { - "quote": "It ain't what you don't know that gets you into trouble. It's what you know for sure that just ain't so.", - "author": "Mark Twain" + "quote": "人只活一次,但若活得其所一次已足夠。", + "author": "梅·韋斯特" }, { - "quote": "The secret of getting ahead is getting started.", - "author": "Mark Twain" + "quote": "像明天就要死一樣生活,像永遠活着一樣學習。", + "author": "聖雄甘地" }, { - "quote": "The two most important days in your life are the day you are born and the day you find out why.", - "author": "Mark Twain" + "quote": "力量不是來自身體能力。它來自不屈不撓的意志。", + "author": "聖雄甘地" }, { - "quote": "Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did do. So throw off the bowlines. Sail away from the safe harbor. Catch the trade winds in your sails.", - "author": "Mark Twain" + "quote": "一個人的“偏執狂”是另一個人的“工程冗餘”。", + "author": "馬庫斯·拉納姆" }, { - "quote": "Any fool can write code that a computer can understand. Good programmers write code that humans can understand.", - "author": "Martin Fowler" + "quote": "生活中沒有什麼可怕的,只有需要理解的。現在是時候多去理解,這樣我們就會少一些恐懼。", + "author": "瑪麗·居里" }, { - "quote": "I know, somehow, that only when it is dark enough can you see the stars.", - "author": "Martin Luther King Jr." + "quote": "如果一切都在你的掌控之中,那麼你的行動還不夠快。", + "author": "馬里奧·安德雷蒂" }, { - "quote": "It is never too late to be what you might have been.", - "author": "Mary Anne Evans" + "quote": "教育:從自大的無知到悲慘的不確定性的道路。", + "author": "馬克·吐溫" }, { - "quote": "Nothing will work unless you do.", - "author": "Maya Angelou" + "quote": "讓你陷入麻煩的不是你不知道的東西,而是你確信的、其實並不是真的東西。", + "author": "馬克·吐溫" }, { - "quote": "We delight in the beauty of the butterfly, but rarely admit the changes it has gone through to achieve that beauty.", - "author": "Maya Angelou" + "quote": "取得成功的祕訣就是開始。", + "author": "馬克·吐溫" }, { - "quote": "We may encounter many defeats, but we must not be defeated.", - "author": "Maya Angelou" + "quote": "你生命中最重要的兩天是你出生的那一天和你找到意義的那一天。", + "author": "馬克·吐溫" }, { - "quote": "Everybody has talent, but ability takes hard work.", - "author": "Michael Jordan" + "quote": "二十年後,你會因自己沒做的事情而更加失望,而不是做過的事情。所以,請解開繩索,駛離安全的港灣,揚帆起航吧。", + "author": "馬克·吐溫" }, { - "quote": "I've missed more than 9,000 shots during my career. I've lost almost 300 games. 26 times, I've been trusted to take the game winning shot and missed. I've failed over and over and over again in my life. And that is why I succeed.", - "author": "Michael Jordan" + "quote": "任何傻瓜都可以編寫計算機可以理解的代碼。優秀的程序員編寫人類可以理解的代碼。", + "author": "馬丁·福勒" }, { - "quote": "Impossible is just a big word thrown around by small men who find it easier to live in the world they've been given than to explore the power they have to change it. Impossible is not a fact. It's an opinion. Impossible is not a declaration. It's a dare. Impossible is potential. Impossible is temporary. Impossible is nothing.", - "author": "Muhammad Ali" + "quote": "我知道,不知何故,只有當天足夠黑時,你才能看到星星。", + "author": "馬丁·路德·金" }, { - "quote": "A winner is a dreamer who never gives up.", - "author": "Nelson Mandela" + "quote": "永遠不會太晚去成爲你可能成爲的人。", + "author": "瑪麗·安妮·埃文斯" }, { - "quote": "It always seems impossible until it's done.", - "author": "Nelson Mandela" + "quote": "除非你行動起來,否則什麼都不會改變。", + "author": "瑪雅·安傑洛" }, { - "quote": "Failure will never overtake me if my determination to succeed is strong enough.", - "author": "Og Mandino" + "quote": "你無法用盡創造力。使用得越多,就會有越多。", + "author": "瑪雅·安傑洛" }, { - "quote": "I am not young enough to know everything.", - "author": "Oscar Wilde" + "quote": "我們喜歡蝴蝶的美麗,但很少承認它爲實現這種美麗所經歷的變化。", + "author": "瑪雅·安傑洛" }, { - "quote": "There is only one thing that makes a dream impossible to achieve: the fear of failure.", - "author": "Paulo Coelho" + "quote": "我們可能會遇到很多失敗,但我們絕不能被擊敗。", + "author": "瑪雅·安傑洛" }, { - "quote": "Never go to bed mad. Stay up and fight.", - "author": "Phyllis Diller" + "quote": "每個人都有天賦,但能力需要努力。", + "author": "邁克爾·喬丹" }, { - "quote": "You can't cross the sea merely by standing and staring at the water.", - "author": "Rabindranath Tagore" + "quote": "在我的職業生涯中,我錯過了 9000 多次投籃。我輸掉了近 300 場比賽。26 次,我被信任去投決勝一投,但都沒有命中。我一次又一次地失敗。但正因如此,我才獲得了成功。", + "author": "邁克爾·喬丹" }, { - "quote": "The only person you are destined to become is the person you decide to be.", - "author": "Ralph Waldo Emerson" + "quote": "“不可能”只是小人物們輕易拋出的大詞,他們寧願留在自己被賦予的世界裏,也不願探索自己改變它的力量。“不可能”不是事實,而是意見。“不可能”不是宣言,而是挑戰。“不可能”是潛力。“不可能”是暫時的。“不可能”什麼也不是。", + "author": "穆罕默德·阿里" }, { - "quote": "What you do speaks so loudly that I cannot hear what you say.", - "author": "Ralph Waldo Emerson" + "quote": "勝利者是永不放棄的夢想家。", + "author": "納爾遜·曼德拉" }, { - "quote": "People who are crazy enough to think they can change the world, are the ones who do.", - "author": "Rob Siltanen" + "quote": "看起來總是不可能,直到它被做到。", + "author": "納爾遜·曼德拉" }, { - "quote": "The best way out is always through.", - "author": "Robert Frost" + "quote": "如果我成功的決心足夠堅定,失敗永遠不會壓倒我。", + "author": "奧格·曼狄諾" }, { - "quote": "Today's accomplishments were yesterday's impossibilities.", - "author": "Robert H. Schuller" + "quote": "我還不夠年輕,不可能瞭解所有的事情。", + "author": "奧斯卡·王爾德" }, { - "quote": "Don't be satisfied with stories, how things have gone with others. Unfold your own myth.", - "author": "Rumi" + "quote": "只有一件事使夢想無法實現:對失敗的恐懼。", + "author": "保羅·柯艾略" }, { - "quote": "Forget safety. Live where you fear to live. Destroy your reputation. Be notorious.", - "author": "Rumi" + "quote": "光是站着看水是無法渡海的。", + "author": "羅賓德拉納特·泰戈爾" }, { - "quote": "Sell your cleverness and buy bewilderment.", - "author": "Rumi" + "quote": "你註定要成爲的唯一的人,就是你決定成爲的人。", + "author": "拉爾夫·沃爾多·愛默生" }, { - "quote": "The cure for pain is in the pain.", - "author": "Rumi" + "quote": "你的所作所爲聲音很大,我聽不見你在說什麼。", + "author": "拉爾夫·沃爾多·愛默生" }, { - "quote": "Have no fear of perfection - you'll never reach it.", - "author": "Salvador Dalí" + "quote": "那些足夠瘋狂以爲自己可以改變世界的人,纔是真正改變世界的人。", + "author": "羅伯·西塔寧" }, { - "quote": "Don't watch the clock. Do what it does. Keep going.", - "author": "Sam Levenson" + "quote": "最好的出路是有始有終。", + "author": "羅伯特·弗羅斯特" }, { - "quote": "Ever Tried. Ever failed. No matter. Try again. Fail again. Fail better.", - "author": "Samuel Beckett" + "quote": "今天的成就是昨天的不可能。", + "author": "羅伯特·舒樂" }, { - "quote": "The more you know, the more you realize you know nothing.", - "author": "Socrates" + "quote": "不要滿足於故事,不要滿足於別人的經歷。揭開你自己的神話。", + "author": "魯米" }, { - "quote": "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge.", - "author": "Stephen Hawking" + "quote": "忘掉安全感,到你所害怕的地方去生活。摧毀你的名聲,做一個聲名狼藉的人。", + "author": "魯米" }, { - "quote": "The universe doesn't allow perfection.", - "author": "Stephen Hawking" + "quote": "賣掉你的聰明,買下困惑。", + "author": "魯米" }, { - "quote": "Whether you want to uncover the secrets of the universe, or you want to pursue a career in the 21st century, basic computer programming is an essential skill to learn.", - "author": "Stephen Hawking" + "quote": "治療疼痛的方法是在疼痛中。", + "author": "魯米" }, { - "quote": "The scariest moment is always just before you start.", - "author": "Stephen King" + "quote": "不要害怕完美——你永遠達不到完美。", + "author": "薩爾瓦多·達利" }, { - "quote": "You can, you should, and if you're brave enough to start, you will.", - "author": "Stephen King" + "quote": "不要看時鐘。做它做的事情。繼續前進。", + "author": "山姆·李文生" }, { - "quote": "Arise, Awake and Stop not until the goal is reached.", - "author": "Swami Vivekananda" + "quote": "曾經嘗試過。曾經失敗過。沒關係。再嘗試一次。再失敗一次。做得更好。", + "author": "塞繆爾·貝克特" }, { - "quote": "It is said that your life flashes before your eyes just before you die. That is true, it's called Life.", - "author": "Terry Pratchett" + "quote": "你知道的越多,你就越發現你什麼都不知道。", + "author": "蘇格拉底" }, { - "quote": "Believe you can and you're halfway there.", - "author": "Theodore Roosevelt" + "quote": "知識最大的敵人不是無知,而是知識的幻覺。", + "author": "史蒂芬·霍金" }, { - "quote": "I have not failed. I've just found 10,000 ways that won't work.", - "author": "Thomas A. Edison" + "quote": "宇宙不允許完美。", + "author": "史蒂芬·霍金" }, { - "quote": "Our greatest weakness lies in giving up. The most certain way to succeed is always to try just one more time.", - "author": "Thomas A. Edison" + "quote": "無論你是想揭開宇宙的祕密,還是想在 21 世紀謀求職業,基礎計算機編程是必學的技能。", + "author": "史蒂芬·霍金" }, { - "quote": "The harder the conflict, the more glorious the triumph.", - "author": "Thomas Paine" + "quote": "最可怕的時刻總是在你開始之前。", + "author": "史蒂芬.金" }, { - "quote": "The Web as I envisaged it, we have not seen it yet. The future is still so much bigger than the past.", - "author": "Tim Berners-Lee" + "quote": "你可以,你應該,如果你有足夠的勇氣開始,你會的。", + "author": "史蒂芬.金" }, { - "quote": "Failure is the condiment that gives success its flavor.", - "author": "Truman Capote" + "quote": "起牀,醒來,直到達到目標才停下來。", + "author": "斯瓦米·維韋卡南達" }, { - "quote": "Those who says it cannot be done should not interrupt the person doing it.", - "author": "Unknown" + "quote": "據說,就在你死之前,你的生命在你眼前閃過。沒錯,這就是所謂的生活。", + "author": "泰瑞·普萊契" }, { - "quote": "Even if you fall on your face, you're still moving forward.", - "author": "Victor Kiam" + "quote": "相信你可以,你就成功了一半。", + "author": "西奧多·羅斯福" }, { - "quote": "It's not whether you get knocked down, it's whether you get up.", - "author": "Vince Lombardi" + "quote": "我沒有失敗。我只是找到了一萬種行不通的方法。", + "author": "愛迪生" }, { - "quote": "I dream my painting and I paint my dream.", - "author": "Vincent van Gogh" + "quote": "我們最大的弱點在於放棄。最確定的成功方法永遠是再試一次。", + "author": "愛迪生" }, { - "quote": "Let us cultivate our garden.", - "author": "Voltaire" + "quote": "衝突越激烈,勝利就越光榮。", + "author": "托馬斯·潘恩" }, { - "quote": "Aim for the moon. If you miss, you may hit a star.", - "author": "W. Clement Stone" + "quote": "我所設想的網絡,我們還沒有看到。未來仍然比過去要大得多。", + "author": "蒂姆·伯納斯-李" }, { - "quote": "The way to get started is to quit talking and begin doing.", - "author": "Walt Disney" + "quote": "失敗是給成功增添風味的調味品。", + "author": "杜魯門·卡波特" }, { - "quote": "You miss 100% of the shots you don't take.", - "author": "Wayne Gretzky" + "quote": "那些說這是不可能的人,不應該打斷正在做這件事的人。", + "author": "佚名" }, { - "quote": "Don't let yesterday take up too much of today.", - "author": "Will Rogers" + "quote": "用不同的眼光看待平常的事物。", + "author": "維科·馬吉斯泰蒂" }, { - "quote": "Even if you're on the right track, you'll get run over if you just sit there.", - "author": "Will Rogers" + "quote": "即使你摔倒在地,你仍然在前進。", + "author": "維克托·基亞姆" }, { - "quote": "Do not wait to strike till the iron is hot; but make it hot by striking.", - "author": "William Butler Yeats" + "quote": "重要的不是你是否被擊倒,而是你是否爬起來。", + "author": "文斯·隆巴迪" }, { - "quote": "You cannot swim for new horizons until you have courage to lose sight of the shore.", - "author": "William Faulkner" + "quote": "我夢想我的畫,我畫我的夢。", + "author": "文森特·梵高" }, { - "quote": "Be not afraid of greatness. Some are born great, some achieve greatness, and others have greatness thrust upon them.", - "author": "William Shakespeare" + "quote": "偉大的事情是由一系列小事情匯聚而成的。", + "author": "文森特·梵高" }, { - "quote": "We know what we are, but not what we may be.", - "author": "William Shakespeare" + "quote": "讓我們耕種我們的花園。", + "author": "伏爾泰" }, { - "quote": "In theory there is no difference between theory and practice. In practice there is.", - "author": "Yogi Berra" + "quote": "瞄準月亮。如果你錯失目標,你可能會擊中一顆恆星。", + "author": "克萊門特·斯通" }, { - "quote": "You can see a lot by just looking.", - "author": "Yogi Berra" + "quote": "開始的方法是停止說話,開始行動。", + "author": "沃爾特·迪斯尼" }, { - "quote": "There is no elevator to success, you have to take the stairs.", - "author": "Zig Ziglar" + "quote": "你不嘗試的話,就有 100% 的機會失敗。", + "author": "韋恩·格雷茨基" }, { - "quote": "You don't have to be great to start, but you have to start to be great.", - "author": "Zig Ziglar" + "quote": "不要讓昨天佔據太多的今天。", + "author": "威爾·羅傑斯" + }, + { + "quote": "即使你是在正確的路上,如果你只是坐在那裏,你也會被撞倒。", + "author": "威爾·羅傑斯" + }, + { + "quote": "不要等鐵熱了再打;要用敲打使它變熱。", + "author": "威廉·巴特勒·葉芝" + }, + { + "quote": "除非你有勇氣離開海岸,否則你無法遊向新的地平線。", + "author": "威廉·福克納" + }, + { + "quote": "不要害怕偉大。 有些人天生偉大,有些人成就偉大,而另一些人則被推向偉大。", + "author": "威廉·莎士比亞" + }, + { + "quote": "我們知道我們是什麼,但不知道我們可能成爲什麼。", + "author": "威廉·莎士比亞" + }, + { + "quote": "從理論上講,理論和實踐之間沒有區別。在實踐中是有的。", + "author": "約吉·貝拉" + }, + { + "quote": "通過看,你就可以覺察到很多東西。", + "author": "約吉·貝拉" + }, + { + "quote": "成功沒有電梯,你必須走樓梯。", + "author": "齊格·齊格勒" + }, + { + "quote": "你不一定要很偉大才能開始,但你必須開始才能變得偉大。", + "author": "齊格·齊格勒" } ] } diff --git a/client/i18n/locales/chinese-traditional/translations.json b/client/i18n/locales/chinese-traditional/translations.json index 68a3d3706e5..643c5b0bc15 100644 --- a/client/i18n/locales/chinese-traditional/translations.json +++ b/client/i18n/locales/chinese-traditional/translations.json @@ -11,6 +11,7 @@ "view": "查看", "view-code": "查看代碼", "view-project": "查看項目", + "view-cert-title": "View {{certTitle}}", "show-cert": "顯示認證", "claim-cert": "申請認證", "save-progress": "保存進度", @@ -52,7 +53,7 @@ "check-code": "檢查您的代碼 (Ctrl + Enter)", "check-code-2": "檢查你的代碼", "reset": "重置", - "reset-code": "重置所有代碼", + "reset-step": "Reset This Step", "help": "幫助", "get-help": "獲得幫助", "watch-video": "觀看視頻", @@ -157,7 +158,8 @@ "honesty": "學術誠信條例", "internet": "你在各平臺的賬號", "portfolio": "作品集設置", - "privacy": "隱私設置" + "privacy": "隱私設置", + "personal-info": "Personal Information" }, "danger": { "heading": "危險區域", @@ -272,6 +274,7 @@ "add-subtitles": "幫助我們完善或添加字幕", "wrong-answer": "抱歉,這個答案不正確。再試一次?", "check-answer": "點擊下方按鈕,查看你的答案。", + "assignment-not-complete": "Please finish the assignments", "solution-link": "解決方案鏈接", "github-link": "GitHub 鏈接", "submit-and-go": "提交併訪問下一個挑戰", @@ -339,6 +342,7 @@ "title": "支持我們的慈善組織", "processing": "我們正在處理你的捐款。", "redirecting": "重新引導中...", + "thanks": "Thanks for donating", "thank-you": "謝謝你成爲我們的支持者。", "additional": "你可以使用這個鏈接 <0>{{url}} 額外進行一次性捐款:", "help-more": "幫助我們做更多", @@ -462,7 +466,8 @@ "iframe-preview": "{{title}} 預覽", "iframe-alert": "通常,此鏈接會將你帶到另一個網站!一切正常,這個鏈接指向:{{externalLink}}。", "iframe-form-submit-alert": "通常這個表單將被提交!工作正常,這將被提交到:{{externalLink}}", - "document-notfound": "找不到文件" + "document-notfound": "找不到文件", + "slow-load-msg": "Looks like this is taking longer than usual, please try refreshing the page." }, "icons": { "gold-cup": "金獎盃", @@ -507,7 +512,8 @@ "step": "步驟", "steps": "步驟", "steps-for": "{{blockTitle}} 的步驟", - "code-example": "{{codeName}} 代碼示例" + "code-example": "{{codeName}} 代碼示例", + "opens-new-window": "Opens in new window" }, "flash": { "honest-first": "申請認證之前,你必須先接受我們的《學術誠信條例》", diff --git a/client/i18n/locales/chinese/intro.json b/client/i18n/locales/chinese/intro.json index bf8b57ea863..a6d7caaafa7 100644 --- a/client/i18n/locales/chinese/intro.json +++ b/client/i18n/locales/chinese/intro.json @@ -553,7 +553,7 @@ "intro": [ "在这之前,你只是在前端使用 JavaScript 来给页面添加交互、解决算法挑战,或构建一个 SPA(单页应用程序)。但 JavaScript 也可以用于后端或者服务器来构建整个 web 应用程序。", "今天,构建应用软件的广受欢迎的方法之一是微服务,这些微服务是一种小型模块化的应用,能够共同形成一个更大的整体。", - "在后端开发和 APIs 认证中,你将学习如何使用 Node.js 和 npm(Node 包管理工具)来写后端。你还将使用 Express 框架构建 web 应用程序,并使用 MongoDB 和 Mongoose 库构建一个 People Finder 微服务。" + "In the Back End Development and APIs Certification, you'll learn how to write back end apps with Node.js and npm. You'll also build web applications with the Express framework, and build a People Finder microservice with MongoDB and the Mongoose library." ], "note": "", "blocks": { @@ -778,6 +778,10 @@ "属性:Rosetta 代码" ] }, + "the-odin-project": { + "title": "The Odin Project", + "intro": ["A description is to be determined"] + }, "project-euler": { "title": "欧拉计划", "intro": [ diff --git a/client/i18n/locales/chinese/motivation.json b/client/i18n/locales/chinese/motivation.json index d65a69bb268..43aba58e9b9 100644 --- a/client/i18n/locales/chinese/motivation.json +++ b/client/i18n/locales/chinese/motivation.json @@ -1,819 +1,856 @@ { "compliments": [ - "Over the top!", - "Down the rabbit hole we go!", - "Bring that rain!", - "Target acquired.", - "Feel that need for speed!", - "You've got guts!", - "We have liftoff!", - "To infinity and beyond!", - "Encore!", - "Onward!", - "Challenge destroyed!", - "It's on like Donkey Kong!", - "Power level? It's over 9000!", - "Coding spree!", - "Code long and prosper.", - "The crowd goes wild!", - "One for the Guinness book!", - "Flawless victory!", - "Most efficient!", - "You've got the touch!", - "You're on fire!", - "The town is now red!", - "To the nines!", - "To the Batmobile!", - "Pull out all the stops!", - "You're a wizard, Harry!", - "You're an all-star!", - "Way to go!", - "Outta sight!", - "You're crushing it!", - "What sorcery is this?", - "The world rejoices!", - "That's the way it's done!", - "You rock!", - "Woo-hoo!", - "We knew you could do it!", - "Hyper Combo Finish!", - "Nothing but net!", - "Boom-shakalaka!", - "You're a shooting star!", - "You're unstoppable!", - "Way cool!", - "Walk on that sunshine!", - "Keep on trucking!", - "Off the charts!", - "There is no spoon!", - "Cranked it up to 11!", - "Escape velocity reached!", - "You make this look easy!", - "Passed with flying colors!", - "You've got this!", - "Happy, happy, joy, joy!", - "Tomorrow, the world!", - "Your powers combined!", - "It's alive. It's alive!", - "Sonic Boom!", - "Here's looking at you, Code!", - "Ride like the wind!", - "Legen - wait for it - dary!", - "Ludicrous Speed! Go!", - "Most triumphant!", - "One loop to rule them all!", - "By the power of Grayskull!", - "You did it!", - "Storm that castle!", - "Face-melting guitar solo!", - "Checkmate!", - "Bodacious!", - "Tubular!", - "You're outta sight!", - "Keep calm and code on!", - "Even sad panda smiles!", - "Even grumpy cat approves!", - "Kool Aid Man says oh yeah!", - "Bullseye!", - "Far out!", - "You're heating up!", - "Standing ovation!", - "Nice one!", - "All right!", - "Hasta la vista, challenge!", - "Terminated.", - "Off the hook!", - "Thundercats, Hooo!", - "Shiver me timbers!", - "Raise the roof!", - "Bingo!", - "Even Honey Badger cares!", - "Helm, Warp Nine. Engage!", - "Gotta code 'em all!", - "Spool up the FTL drive!", - "Cool beans!", - "They're in another castle.", - "Power UP!", - "Pikachu chooses you!", - "I gotta have more cowbell.", - "Gotta go fast!", - "Yippee!", - "Cowabunga!", - "Moon Prism Power!", - "Plus Ultra!" + "太棒了!", + "我们跳进兔子洞!", + "雨下吧!", + "获取目标。", + "体验极速快感!", + "你有胆量!", + "我们升空了!", + "飞向无限!", + "再来一次!", + "向前进!", + "挑战被摧毁!", + "重磅如同大金刚!", + "战斗力?超过 9000!", + "编码狂潮!", + "编码不息,繁荣昌盛。", + "人群变得疯狂!", + "一个吉尼斯世界纪录!", + "完胜!", + "最高效率!", + "你有手感了!", + "你正在燃烧!", + "满城春色!", + "完美!", + "上蝙蝠车!", + "全力以赴!", + "你是个巫师,哈利!", + "你是全明星队员!", + "干得好!", + "棒极了!", + "你太出色了!", + "这是什么魔法?", + "世界欢欣鼓舞!", + "难题就是这样搞定的!", + "你真棒!", + "呜呼!", + "我们就知道你能行!", + "超级组合终结!", + "空心球!", + "炸弹-沙卡拉卡!", + "你是一颗流星!", + "你势不可挡!", + "太酷了!", + "走在那阳光下!", + "坚持下去!", + "水平爆表!", + "勺子并不存在!", + "调到最大音量!", + "达到逃逸速度!", + "你让这看起来很简单!", + "以优异的成绩通过!", + "你能行!", + "开心,开心,快乐,快乐!", + "明天,征服世界!", + "你的全部力量!", + "它活了。它活了!", + "索尼克音爆!", + "看着你呢,代码!", + "疾驰如风!", + "传——奇!", + "离谱的速度!出发!", + "高奏凯歌!", + "用一个循环来统治它们!", + "凭借灰壳堡的神力!", + "你做到了!", + "冲进城堡!", + "荡人心魄的吉他独奏!", + "完全击败!", + "大有胆识!", + "厉害!", + "你真强啊!", + "保持冷静,继续编码!", + "即使是悲伤的熊猫也会微笑!", + "即使脾气暴躁的猫也同意!", + "如此感觉无以伦比。", + "正中靶心!", + "前卫!", + "燃烧吧,小宇宙!", + "起立鼓掌!", + "不错!", + "好啊!", + "回见,挑战!", + "终结了。", + "脱身!", + "霹雳猫显神威!", + "让我五体投地!", + "大显身手!", + "答对了!", + "连蜜獾都在乎!", + "掌舵,第九曲速。启动!", + "必须全部编码!", + "发动超光速引擎!", + "酷豆子!", + "她们在另一个城堡里。", + "加电!", + "皮卡丘选择了你!", + "我要再多点牛铃。", + "得快点!", + "了不起!", + "卡瓦邦嘎!", + "月亮棱镜能量!", + "超越极致!", + "米尔豪斯一切都会好起来的!" ], "motivationalQuotes": [ { - "quote": "Whatever you are, be a good one.", - "author": "Abraham Lincoln" + "quote": "不管你是谁,做个好人。", + "author": "亚伯拉罕·林肯" }, { - "quote": "A change in perspective is worth 80 IQ points.", - "author": "Alan Kay" + "quote": "换一个角度看问题值80点智商。", + "author": "艾伦·凯" }, { - "quote": "The best way to predict the future is to invent it.", - "author": "Alan Kay" + "quote": "预测未来的最好方法是创造未来。", + "author": "艾伦·凯" }, { - "quote": "The future is not laid out on a track. It is something that we can decide, and to the extent that we do not violate any known laws of the universe, we can probably make it work the way that we want to.", - "author": "Alan Kay" + "quote": "未来不是在轨道上规划的。这是我们可以决定的事情,只要我们不违反任何已知的宇宙法则,我们就可以让它按我们想要的方式运行。", + "author": "艾伦·凯" }, { - "quote": "We can only see a short distance ahead, but we can see plenty there that needs to be done.", - "author": "Alan Turing" + "quote": "我们只能看到前面很短的距离,但我们可以看到有很多事情需要做。", + "author": "艾伦·图灵" }, { - "quote": "In the depth of winter, I finally learned that within me there lay an invincible summer.", - "author": "Albert Camus" + "quote": "隆冬时节,我终于明白,我的内心深处有一个不可战胜的夏天。", + "author": "阿尔伯特·加缪" }, { - "quote": "A person who never made a mistake never tried anything new.", - "author": "Albert Einstein" + "quote": "从不犯错的人从不尝试新事物。", + "author": "阿尔伯特·爱因斯坦" }, { - "quote": "Creativity is intelligence having fun.", - "author": "Albert Einstein" + "quote": "创造力是智力的乐趣。", + "author": "阿尔伯特·爱因斯坦" }, { - "quote": "I have no special talents. I am only passionately curious.", - "author": "Albert Einstein" + "quote": "我没有什么特别的才能。我只是非常好奇。", + "author": "阿尔伯特·爱因斯坦" }, { - "quote": "Life is like riding a bicycle. To keep your balance, you must keep moving.", - "author": "Albert Einstein" + "quote": "生活就像骑自行车。为了保持平衡,你必须继续前进。", + "author": "阿尔伯特·爱因斯坦" }, { - "quote": "Make everything as simple as possible, but not simpler.", - "author": "Albert Einstein" + "quote": "事情应该力求简单,但不能过于简单。", + "author": "阿尔伯特·爱因斯坦" }, { - "quote": "Never memorize something that you can look up.", - "author": "Albert Einstein" + "quote": "绝不要去记那些你能够查得到的东西。", + "author": "阿尔伯特·爱因斯坦" }, { - "quote": "Once we accept our limits, we go beyond them.", - "author": "Albert Einstein" + "quote": "一旦我们接受了自己的极限,我们就超越了它们。", + "author": "阿尔伯特·爱因斯坦" }, { - "quote": "Play is the highest form of research.", - "author": "Albert Einstein" + "quote": "玩耍是研究的最高形式。", + "author": "阿尔伯特·爱因斯坦" }, { - "quote": "We cannot solve our problems with the same thinking we used when we created them.", - "author": "Albert Einstein" + "quote": "我们不能用我们创造问题时的思维来解决问题。", + "author": "阿尔伯特·爱因斯坦" }, { - "quote": "Wisdom is not a product of schooling but of the lifelong attempt to acquire it.", - "author": "Albert Einstein" + "quote": "智慧不是学校教育的产物,而是终身学习的产物。", + "author": "阿尔伯特·爱因斯坦" }, { - "quote": "Your imagination is your preview of life's coming attractions.", - "author": "Albert Einstein" + "quote": "你的想像是你人生的预览。", + "author": "阿尔伯特·爱因斯坦" }, { - "quote": "There is only one corner of the universe you can be certain of improving, and that's your own self.", - "author": "Aldous Huxley" + "quote": "宇宙中只有一个角落是你可以切实改进的,那就是你自己。", + "author": "奥尔德斯·赫胥黎" }, { - "quote": "The most common way people give up their power is by thinking they don't have any.", - "author": "Alice Walker" + "quote": "我感谢我的奋斗,因为没有它,我就不会偶然发现自己的力量。", + "author": "亚历克斯·艾尔" }, { - "quote": "Follow your inner moonlight. Don't hide the madness.", - "author": "Allen Ginsberg" + "quote": "人们放弃权力最常见的方式是认为自己没有权力。", + "author": "艾丽丝·沃克" }, { - "quote": "The most difficult thing is the decision to act. The rest is merely tenacity.", - "author": "Amelia Earhart" + "quote": "跟随你内心的月光。别掩饰自己的疯狂。", + "author": "艾伦·金斯伯格" }, { - "quote": "Life shrinks or expands in proportion with one's courage.", - "author": "Anaïs Nin" + "quote": "最困难的是决定采取行动。剩下的只是坚韧。", + "author": "阿梅莉亚·埃尔哈特" }, { - "quote": "Weeks of programming can save you hours of planning.", - "author": "Unknown" + "quote": "生命的缩小或扩大与一个人的勇气成正比。", + "author": "阿奈斯·宁" }, { - "quote": "Quality is not an act, it is a habit.", - "author": "Aristotle" + "quote": "数周的编程可以节省你数小时的计划。", + "author": "佚名" }, { - "quote": "Start where you are. Use what you have. Do what you can.", - "author": "Arthur Ashe" + "quote": "质量不是一种行为,而是一种习惯。", + "author": "亚里士多德" }, { - "quote": "Nothing is impossible, the word itself says \"I'm possible\"!", - "author": "Audrey Hepburn" + "quote": "从现在开始。利用你所拥有的。尽你所能。", + "author": "亚瑟·阿什" }, { - "quote": "Every strike brings me closer to the next home run.", - "author": "Babe Ruth" + "quote": "没有什么是不可能的,连这个词本身都说“不,可能”!", + "author": "奥黛丽·赫本" }, { - "quote": "By failing to prepare, you are preparing to fail.", - "author": "Benjamin Franklin" + "quote": "每一击都让我离下一个本垒打越来越近。", + "author": "贝比·鲁斯" }, { - "quote": "Tell me and I forget. Teach me and I remember. Involve me and I learn.", - "author": "Benjamin Franklin" + "quote": "如果你没有做好准备,你就是在准备失败。", + "author": "本杰明·富兰克林" }, { - "quote": "Well done is better than well said.", - "author": "Benjamin Franklin" + "quote": "告诉我,我会忘记。教我,我会记住。让我参与,我会学习。", + "author": "本杰明·富兰克林" }, { - "quote": "There are no short cuts to any place worth going.", - "author": "Beverly Sills" + "quote": "说得好不如做得好。", + "author": "本杰明·富兰克林" }, { - "quote": "Controlling complexity is the essence of computer programming.", - "author": "Brian Kernighan" + "quote": "任何值得去的地方都没有捷径。", + "author": "贝弗利·希尔斯" }, { - "quote": "I fear not the man who has practiced 10,000 kicks once, but I fear the man who has practiced one kick 10,000 times.", - "author": "Bruce Lee" + "quote": "控制复杂性是计算机编程的本质。", + "author": "布莱恩·科尼汉" }, { - "quote": "There are far, far better things ahead than any we leave behind.", - "author": "C.S. Lewis" + "quote": "我不怕遇到练习过一万种腿法的对手,但害怕遇到只将一种腿法练习一万次的强敌。", + "author": "李小龙" }, { - "quote": "We are what we believe we are.", - "author": "C.S. Lewis" + "quote": "比起遗落在过去的,未来还有更加美好的在等待着我们。", + "author": "C.S. 路易斯" }, { - "quote": "With the possible exception of the equator, everything begins somewhere.", - "author": "C.S. Lewis" + "quote": "我们就是我们所相信的自己。", + "author": "C.S. 路易斯" }, { - "quote": "You are never too old to set another goal, or to dream a new dream.", - "author": "C.S. Lewis" + "quote": "可能除了赤道以外,一切都从某处开始。", + "author": "C.S. 路易斯" }, { - "quote": "Somewhere, something incredible is waiting to be known.", - "author": "Carl Sagan" + "quote": "无论年纪多大,你都可以设立新目标或拥有新梦想。", + "author": "C.S. 路易斯" }, { - "quote": "If you're not making mistakes, then you're not making decisions.", - "author": "Catherine Cook" + "quote": "在某个地方,一些不可思议的事物正在等你去发现。", + "author": "卡尔·萨根" }, { - "quote": "Find what you love and let it kill you.", - "author": "Charles Bukowski" + "quote": "当你有梦想时,你必须抓住它,永不放弃。", + "author": "卡罗尔·伯内特" }, { - "quote": "What matters most is how well you walk through the fire.", - "author": "Charles Bukowski" + "quote": "如果你没有犯错误,那么你就没有做决定。", + "author": "凯瑟琳·库克" }, { - "quote": "It is not the strongest of the species that survive, nor the most intelligent, but the one most responsive to change.", - "author": "Charles Darwin" + "quote": "爱我所爱,至死方休。", + "author": "查尔斯·布考斯基" }, { - "quote": "Life is 10% what happens to you and 90% how you react to it.", - "author": "Charles R. Swindoll" + "quote": "最重要的是你能否赴汤蹈火。", + "author": "查尔斯·布考斯基" }, { - "quote": "You will do foolish things, but do them with enthusiasm.", - "author": "Colette" + "quote": "生存下来的不是最强壮的物种,也不是最聪明的物种,而是最能适应变化的物种。", + "author": "查尔斯·达尔文" }, { - "quote": "It does not matter how slowly you go as long as you do not stop.", - "author": "Confucius" + "quote": "细节不仅是细节,而且决定了设计。", + "author": "查尔斯·伊姆斯" }, { - "quote": "Real knowledge is to know the extent of one's ignorance.", - "author": "Confucius" + "quote": "创造力不仅仅是与众不同。任何人都可以做到怪诞不经,这很简单。难的是像巴赫那样简单。使简单的,非常简单,这就是创造力。", + "author": "查尔斯·明格斯" }, { - "quote": "The past cannot be changed. The future is yet in your power.", - "author": "Confucius" + "quote": "生活的 10% 是发生在你身上的事,90% 是你对它的反应。", + "author": "查尔斯·R·斯温多尔" }, { - "quote": "Looking at code you wrote more than two weeks ago is like looking at code you are seeing for the first time.", - "author": "Dan Hurvitz" + "quote": "你不免会做傻事,但热烈地、衷心地投入做吧。", + "author": "科莱特" }, { - "quote": "Someday is not a day of the week.", - "author": "Denise Brennan-Nelson" + "quote": "譬如为山,未成一篑,止,吾止也。譬如平地,虽覆一篑,进,吾往也。", + "author": "孔子" }, { - "quote": "UNIX is simple. It just takes a genius to understand its simplicity.", - "author": "Dennis Ritchie" + "quote": "知之为知之,不知为不知,是知也。", + "author": "孔子" }, { - "quote": "Computers are good at following instructions, but not at reading your mind.", - "author": "Donald Knuth" + "quote": "往昔不可谏,来者犹可追。", + "author": "孔子" }, { - "quote": "A good programmer is someone who always looks both ways before crossing a one-way street.", - "author": "Doug Linder" + "quote": "看着自己两个多星期前编写的代码就像第一次看到这代码一样。", + "author": "丹·赫维茨" }, { - "quote": "Tough times never last, but tough people do.", - "author": "Dr. Robert Schuller" + "quote": "“总有一天”不是一周中的一天。", + "author": "丹尼斯·布伦南-纳尔逊" }, { - "quote": "If things start happening, don't worry, don't stew, just go right along and you'll start happening too.", - "author": "Dr. Seuss" + "quote": "UNIX很简单。不过只有天才才能理解它的简单性。", + "author": "丹尼斯·里奇" }, { - "quote": "Do not go gentle into that good night. Rage, rage against the dying of the light.", - "author": "Dylan Thomas" + "quote": "在我看来,要想见彩虹,就得忍受风雨!", + "author": "多莉·帕顿" }, { - "quote": "The question of whether computers can think is like the question of whether submarines can swim.", - "author": "E.W. Dijkstra" + "quote": "计算机善于遵循指令,但不善于理解你的思维。", + "author": "唐纳德·克努特" }, { - "quote": "Any code of your own that you haven't looked at for six or more months might as well have been written by someone else.", - "author": "Eagleson's Law" + "quote": "优秀的程序员总是在过单行道之前两边都看一下。", + "author": "道格·林德" }, { - "quote": "Do one thing every day that scares you.", - "author": "Eleanor Roosevelt" + "quote": "创造力是狂野的头脑和训练有素的眼睛。", + "author": "多萝西·帕克" }, { - "quote": "With the new day comes new strength and new thoughts.", - "author": "Eleanor Roosevelt" + "quote": "艰苦的时光终将过去,坚强的人们必将苦尽甘来。", + "author": "罗伯特·舒勒博士" }, { - "quote": "You must do the things you think you cannot do.", - "author": "Eleanor Roosevelt" + "quote": "如果事情开始发生,不要发愁,不要担忧,只要一直走下去,你也会开始发生的。", + "author": "苏斯博士" }, { - "quote": "Light tomorrow with today.", - "author": "Elizabeth Barrett Browning" + "quote": "不要温和地走进那良夜。怒斥,怒斥光明的消逝。", + "author": "狄兰·托马斯" }, { - "quote": "Forever is composed of nows.", - "author": "Emily Dickinson" + "quote": "计算机能否思考的问题就像潜艇能否游泳的问题一样。", + "author": "E·W·迪科斯彻" }, { - "quote": "Computer science education cannot make anybody an expert programmer any more than studying brushes and pigment can make somebody an expert painter.", - "author": "Eric Raymond" + "quote": "自己写的代码,只要有六个月没有看过,就像是别人写的一样。", + "author": "伊格尔森定律" }, { - "quote": "If you don't risk anything, you risk even more.", - "author": "Erica Jong" + "quote": "每天做一件让你害怕的事。", + "author": "埃莉诺·罗斯福" }, { - "quote": "The world breaks everyone, and afterward, many are strong at the broken places.", - "author": "Ernest Hemingway" + "quote": "新的一天带来了新的力量和新的思想。", + "author": "埃莉诺·罗斯福" }, { - "quote": "There is nothing noble in being superior to your fellow man; true nobility is being superior to your former self.", - "author": "Ernest Hemingway" + "quote": "你必须做你自己认为做不到的事。", + "author": "埃莉诺·罗斯福" }, { - "quote": "Never confuse a single defeat with a final defeat.", - "author": "F. Scott Fitzgerald" + "quote": "用今天照亮明天。", + "author": "伊丽莎白·巴雷特·布朗宁" }, { - "quote": "I attribute my success to this - I never gave or took any excuse.", - "author": "Florence Nightingale" + "quote": "如果你的梦想没有吓到你,那是因为你梦想得还不够大。", + "author": "爱伦·约翰森·希尔丽夫" }, { - "quote": "The best revenge is massive success.", - "author": "Frank Sinatra" + "quote": "永远是由现在组成的。", + "author": "艾米莉·狄金森" }, { - "quote": "The only limit to our realization of tomorrow, will be our doubts of today.", - "author": "Franklin D. Roosevelt" + "quote": "计算机科学教育不能使任何人成为专家程序员,正如学习画笔和颜料无法让人成为绘画专家一样。", + "author": "埃里克·雷蒙德" }, { - "quote": "Right or wrong, it's very pleasant to break something from time to time.", - "author": "Fyodor Dostoevsky" + "quote": "如果你不冒任何风险,你的风险就更大。", + "author": "艾瑞卡·琼" }, { - "quote": "The harder I work, the luckier I get.", - "author": "Gary Player" + "quote": "生活总是让我们遍体鳞伤,但到后来,那些受伤的地方会变得更坚强。", + "author": "厄内斯特·海明威" }, { - "quote": "Giving up is the only sure way to fail.", - "author": "Gena Showalter" + "quote": "优于别人,并不高贵,真正的高贵应该是优于过去的自己。", + "author": "厄内斯特·海明威" }, { - "quote": "The only truly secure system is one that is powered off, cast in a block of concrete and sealed in a lead-lined room with armed guards.", - "author": "Gene Spafford" + "quote": "永远不要将一次失败与最终失败混淆。", + "author": "F. 斯科特·菲茨杰拉德" }, { - "quote": "A life spent making mistakes is not only more honorable, but more useful than a life spent doing nothing.", - "author": "George Bernard Shaw" + "quote": "我将我的成功归功于此——我从不找,也不接受任何借口。", + "author": "弗洛伦斯·南丁格尔" }, { - "quote": "First learn computer science and all the theory. Next develop a programming style. Then forget all that and just hack.", - "author": "George Carrette" + "quote": "最好的报复是巨大的成功。", + "author": "弗兰克·西纳特拉" }, { - "quote": "Discovering the unexpected is more important than confirming the known.", - "author": "George Box" + "quote": "我们实现明天的唯一限制是我们对今天的怀疑。", + "author": "富兰克林·罗斯福" }, { - "quote": "We only see what we know.", - "author": "Goethe" + "quote": "不管是对是错,时不时弄坏点东西是一件非常愉快的事情。", + "author": "陀思妥耶夫斯基" }, { - "quote": "Without hard work, nothing grows but weeds.", - "author": "Gordon B. Hinckley" + "quote": "我越努力,就越幸运。", + "author": "盖瑞·普莱尔" }, { - "quote": "The function of good software is to make the complex appear to be simple.", - "author": "Grady Booch" + "quote": "放弃是失败的唯一可靠途径。", + "author": "吉娜·肖沃尔特" }, { - "quote": "When you know that you're capable of dealing with whatever comes, you have the only security the world has to offer.", - "author": "Harry Browne" + "quote": "唯一真正安全的系统是断了电、浇铸在混凝土块中、并密封在有武装警卫的铅衬房间内的系统。", + "author": "金·斯帕福德" }, { - "quote": "Pain is inevitable. Suffering is optional.", - "author": "Haruki Murakami" + "quote": "一生犯错误不仅比一生无所事事更光荣,而且更有用。", + "author": "萧伯纳" }, { - "quote": "Optimism is the faith that leads to achievement. Nothing can be done without hope and confidence.", - "author": "Helen Keller" + "quote": "首先学会计算机科学和所有的理论。 然后发展出一个编程风格。之后便要忘掉所有这些,自由地编码。", + "author": "乔治·卡雷特" }, { - "quote": "The price of anything is the amount of life you exchange for it.", - "author": "Henry David Thoreau" + "quote": "发现意想不到的比确认已知的更重要。", + "author": "乔治·博克斯" }, { - "quote": "Whether you think you can or think you can't, you're right.", - "author": "Henry Ford" + "quote": "我们只能看到自己所知的。", + "author": "歌德" }, { - "quote": "The most exciting phrase to hear in science, the one that heralds discoveries, is not 'Eureka!' but 'Now that's funny…'", - "author": "Isaac Asimov" + "quote": "不努力耕耘,只会长出杂草。", + "author": "戈登·B·欣克利" }, { - "quote": "We are all failures. At least the best of us are.", - "author": "J.M. Barrie" + "quote": "好的软件的功能就是化繁为简。", + "author": "格雷迪·布奇" }, { - "quote": "You can't wait for inspiration. You have to go after it with a club.", - "author": "Jack London" + "quote": "当你知道自己有能力应对任何事情时,你就拥有了世界所能提供的唯一安全感。", + "author": "哈利·布朗" }, { - "quote": "Don't wish it were easier, wish you were better.", - "author": "Jim Rohn" + "quote": "痛苦不可避免,但可以选择是否受苦。", + "author": "村上春树" }, { - "quote": "By seeking and blundering we learn.", - "author": "Johann Wolfgang von Goethe" + "quote": "乐观是导致成就的信念。没有希望和信心,就什么都做不了。", + "author": "海伦·凯勒" }, { - "quote": "Knowing is not enough; we must apply. Wishing is not enough; we must do.", - "author": "Johann Wolfgang von Goethe" + "quote": "任何东西的价格都等于你用多少生命去换取它。", + "author": "亨利·大卫·梭罗" }, { - "quote": "We first make our habits, then our habits make us.", - "author": "John Dryden" + "quote": "不管你认为你能还是不能,你都是对的。", + "author": "亨利·福特" }, { - "quote": "The power of imagination makes us infinite.", - "author": "John Muir" + "quote": "在科学中听到的最令人兴奋的短语,即预示着发现的短语,不是“找到了!” 而是“这很有趣……”", + "author": "艾萨克·阿西莫夫" }, { - "quote": "May you live every day of your life.", - "author": "Jonathan Swift" + "quote": "你所做的会有影响。你必须决定你想要做出什么样的改变。", + "author": "简·古道尔" }, { - "quote": "Perseverance is failing 19 times and succeeding the 20th.", - "author": "Julie Andrews" + "quote": "我们都是失败者。至少我们中最好的人是。", + "author": "J.M.巴里" }, { - "quote": "The work of today is the history of tomorrow, and we are its makers.", - "author": "Juliette Gordon Low" + "quote": "你不能等待灵感。你必须提着木棒去追求它。", + "author": "杰克·伦敦" }, { - "quote": "If you reveal your secrets to the wind, you should not blame the wind for revealing them to the trees.", - "author": "Kahlil Gibran" + "quote": "不要希望事情更容易,希望你更有能力。", + "author": "吉姆·罗恩" }, { - "quote": "Optimism is an occupational hazard of programming; feedback is the treatment.", - "author": "Kent Beck" + "quote": "我们通过寻找和犯错误来学习。", + "author": "约翰·沃尔夫冈·冯·歌德" }, { - "quote": "Opportunity does not knock, it presents itself when you beat down the door.", - "author": "Kyle Chandler" + "quote": "知道是不够的;我们必须应用。希望是不够的;我们必须行动。", + "author": "约翰·沃尔夫冈·冯·歌德" }, { - "quote": "To iterate is human, to recurse divine.", - "author": "Peter Deutsch" + "quote": "我们先养成习惯,然后习惯造就我们。", + "author": "约翰·德莱登" }, { - "quote": "A good traveler has no fixed plans and is not intent on arriving.", - "author": "Lao Tzu" + "quote": "想象力使我们无限。", + "author": "约翰·缪尔" }, { - "quote": "An ant on the move does more than a dozing ox.", - "author": "Lao Tzu" + "quote": "愿你过好每一天。", + "author": "乔纳森·斯威夫特" }, { - "quote": "Do the difficult things while they are easy and do the great things while they are small. A journey of a thousand miles must begin with a single step.", - "author": "Lao Tzu" + "quote": "坚持就是前 19 次失败,第 20 次成功。", + "author": "朱莉·安德鲁斯" }, { - "quote": "That's the thing about people who think they hate computers. What they really hate is lousy programmers.", - "author": "Larry Niven" + "quote": "今天的工作就是明天的历史,我们是它的创造者。", + "author": "朱丽叶·戈登·洛" }, { - "quote": "It had long since come to my attention that people of accomplishment rarely sat back and let things happen to them. They went out and happened to things.", - "author": "Leonardo da Vinci" + "quote": "如果你向风泄露了你的秘密,你不应该责怪风将它们泄露给树木。", + "author": "纪伯伦" }, { - "quote": "If you're any good at all, you know you can be better.", - "author": "Lindsay Buckingham" + "quote": "乐观是编程的职业病;反馈就是治疗。", + "author": "肯特·贝克" }, { - "quote": "If people never did silly things, nothing intelligent would ever get done.", - "author": "Ludwig Wittgenstein" + "quote": "机会不会敲门,它会在你敲门的时候出现。", + "author": "凯尔·钱德勒" }, { - "quote": "You only live once, but if you do it right, once is enough.", - "author": "Mae West" + "quote": "迭代的是人,递归的是神。", + "author": "彼得·多伊奇" }, { - "quote": "Live as if you were to die tomorrow. Learn as if you were to live forever.", - "author": "Mahatma Gandhi" + "quote": "善行无辙迹,善言无瑕谪。", + "author": "老子" }, { - "quote": "Strength does not come from physical capacity. It comes from an indomitable will.", - "author": "Mahatma Gandhi" + "quote": "合抱之木,生于毫末;九层之台,起于累土;千里之行,始于足下。", + "author": "老子" }, { - "quote": "One person's 'paranoia' is another person's 'engineering redundancy'.", - "author": "Marcus J. Ranum" + "quote": "那些认为自己讨厌电脑的人就是这样。他们真正讨厌的是糟糕的程序员。", + "author": "拉里·尼文" }, { - "quote": "Nothing in life is to be feared, it is only to be understood. Now is the time to understand more, so that we may fear less.", - "author": "Marie Curie" + "quote": "我早就发现,成功的人很少坐以待毙,让事情发生在他们身上。他们出去主动去做事。", + "author": "达芬奇" }, { - "quote": "If you have everything under control, you're not moving fast enough.", - "author": "Mario Andretti" + "quote": "如果你有一点才能,你就会知道你还可以做得更好。", + "author": "林赛·白金汉" }, { - "quote": "Education: the path from cocky ignorance to miserable uncertainty.", - "author": "Mark Twain" + "quote": "如果人们从不做傻事,就什么都不会做得聪明。", + "author": "路德维希·维特根斯坦" }, { - "quote": "It ain't what you don't know that gets you into trouble. It's what you know for sure that just ain't so.", - "author": "Mark Twain" + "quote": "人只活一次,但若活得其所一次已足够。", + "author": "梅·韦斯特" }, { - "quote": "The secret of getting ahead is getting started.", - "author": "Mark Twain" + "quote": "像明天就要死一样生活,像永远活着一样学习。", + "author": "圣雄甘地" }, { - "quote": "The two most important days in your life are the day you are born and the day you find out why.", - "author": "Mark Twain" + "quote": "力量不是来自身体能力。它来自不屈不挠的意志。", + "author": "圣雄甘地" }, { - "quote": "Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did do. So throw off the bowlines. Sail away from the safe harbor. Catch the trade winds in your sails.", - "author": "Mark Twain" + "quote": "一个人的“偏执狂”是另一个人的“工程冗余”。", + "author": "马库斯·拉纳姆" }, { - "quote": "Any fool can write code that a computer can understand. Good programmers write code that humans can understand.", - "author": "Martin Fowler" + "quote": "生活中没有什么可怕的,只有需要理解的。现在是时候多去理解,这样我们就会少一些恐惧。", + "author": "玛丽·居里" }, { - "quote": "I know, somehow, that only when it is dark enough can you see the stars.", - "author": "Martin Luther King Jr." + "quote": "如果一切都在你的掌控之中,那么你的行动还不够快。", + "author": "马里奥·安德雷蒂" }, { - "quote": "It is never too late to be what you might have been.", - "author": "Mary Anne Evans" + "quote": "教育:从自大的无知到悲惨的不确定性的道路。", + "author": "马克·吐温" }, { - "quote": "Nothing will work unless you do.", - "author": "Maya Angelou" + "quote": "让你陷入麻烦的不是你不知道的东西,而是你确信的、其实并不是真的东西。", + "author": "马克·吐温" }, { - "quote": "We delight in the beauty of the butterfly, but rarely admit the changes it has gone through to achieve that beauty.", - "author": "Maya Angelou" + "quote": "取得成功的秘诀就是开始。", + "author": "马克·吐温" }, { - "quote": "We may encounter many defeats, but we must not be defeated.", - "author": "Maya Angelou" + "quote": "你生命中最重要的两天是你出生的那一天和你找到意义的那一天。", + "author": "马克·吐温" }, { - "quote": "Everybody has talent, but ability takes hard work.", - "author": "Michael Jordan" + "quote": "二十年后,你会因自己没做的事情而更加失望,而不是做过的事情。所以,请解开绳索,驶离安全的港湾,扬帆起航吧。", + "author": "马克·吐温" }, { - "quote": "I've missed more than 9,000 shots during my career. I've lost almost 300 games. 26 times, I've been trusted to take the game winning shot and missed. I've failed over and over and over again in my life. And that is why I succeed.", - "author": "Michael Jordan" + "quote": "任何傻瓜都可以编写计算机可以理解的代码。优秀的程序员编写人类可以理解的代码。", + "author": "马丁·福勒" }, { - "quote": "Impossible is just a big word thrown around by small men who find it easier to live in the world they've been given than to explore the power they have to change it. Impossible is not a fact. It's an opinion. Impossible is not a declaration. It's a dare. Impossible is potential. Impossible is temporary. Impossible is nothing.", - "author": "Muhammad Ali" + "quote": "我知道,不知何故,只有当天足够黑时,你才能看到星星。", + "author": "马丁·路德·金" }, { - "quote": "A winner is a dreamer who never gives up.", - "author": "Nelson Mandela" + "quote": "永远不会太晚去成为你可能成为的人。", + "author": "玛丽·安妮·埃文斯" }, { - "quote": "It always seems impossible until it's done.", - "author": "Nelson Mandela" + "quote": "除非你行动起来,否则什么都不会改变。", + "author": "玛雅·安杰洛" }, { - "quote": "Failure will never overtake me if my determination to succeed is strong enough.", - "author": "Og Mandino" + "quote": "你无法用尽创造力。使用得越多,就会有越多。", + "author": "玛雅·安杰洛" }, { - "quote": "I am not young enough to know everything.", - "author": "Oscar Wilde" + "quote": "我们喜欢蝴蝶的美丽,但很少承认它为实现这种美丽所经历的变化。", + "author": "玛雅·安杰洛" }, { - "quote": "There is only one thing that makes a dream impossible to achieve: the fear of failure.", - "author": "Paulo Coelho" + "quote": "我们可能会遇到很多失败,但我们绝不能被击败。", + "author": "玛雅·安杰洛" }, { - "quote": "Never go to bed mad. Stay up and fight.", - "author": "Phyllis Diller" + "quote": "每个人都有天赋,但能力需要努力。", + "author": "迈克尔·乔丹" }, { - "quote": "You can't cross the sea merely by standing and staring at the water.", - "author": "Rabindranath Tagore" + "quote": "在我的职业生涯中,我错过了 9000 多次投篮。我输掉了近 300 场比赛。26 次,我被信任去投决胜一投,但都没有命中。我一次又一次地失败。但正因如此,我才获得了成功。", + "author": "迈克尔·乔丹" }, { - "quote": "The only person you are destined to become is the person you decide to be.", - "author": "Ralph Waldo Emerson" + "quote": "“不可能”只是小人物们轻易抛出的大词,他们宁愿留在自己被赋予的世界里,也不愿探索自己改变它的力量。“不可能”不是事实,而是意见。“不可能”不是宣言,而是挑战。“不可能”是潜力。“不可能”是暂时的。“不可能”什么也不是。", + "author": "穆罕默德·阿里" }, { - "quote": "What you do speaks so loudly that I cannot hear what you say.", - "author": "Ralph Waldo Emerson" + "quote": "胜利者是永不放弃的梦想家。", + "author": "纳尔逊·曼德拉" }, { - "quote": "People who are crazy enough to think they can change the world, are the ones who do.", - "author": "Rob Siltanen" + "quote": "看起来总是不可能,直到它被做到。", + "author": "纳尔逊·曼德拉" }, { - "quote": "The best way out is always through.", - "author": "Robert Frost" + "quote": "如果我成功的决心足够坚定,失败永远不会压倒我。", + "author": "奥格·曼狄诺" }, { - "quote": "Today's accomplishments were yesterday's impossibilities.", - "author": "Robert H. Schuller" + "quote": "我还不够年轻,不可能了解所有的事情。", + "author": "奥斯卡·王尔德" }, { - "quote": "Don't be satisfied with stories, how things have gone with others. Unfold your own myth.", - "author": "Rumi" + "quote": "只有一件事使梦想无法实现:对失败的恐惧。", + "author": "保罗·柯艾略" }, { - "quote": "Forget safety. Live where you fear to live. Destroy your reputation. Be notorious.", - "author": "Rumi" + "quote": "光是站着看水是无法渡海的。", + "author": "罗宾德拉纳特·泰戈尔" }, { - "quote": "Sell your cleverness and buy bewilderment.", - "author": "Rumi" + "quote": "你注定要成为的唯一的人,就是你决定成为的人。", + "author": "拉尔夫·沃尔多·爱默生" }, { - "quote": "The cure for pain is in the pain.", - "author": "Rumi" + "quote": "你的所作所为声音很大,我听不见你在说什么。", + "author": "拉尔夫·沃尔多·爱默生" }, { - "quote": "Have no fear of perfection - you'll never reach it.", - "author": "Salvador Dalí" + "quote": "那些足够疯狂以为自己可以改变世界的人,才是真正改变世界的人。", + "author": "罗伯·西塔宁" }, { - "quote": "Don't watch the clock. Do what it does. Keep going.", - "author": "Sam Levenson" + "quote": "最好的出路是有始有终。", + "author": "罗伯特·弗罗斯特" }, { - "quote": "Ever Tried. Ever failed. No matter. Try again. Fail again. Fail better.", - "author": "Samuel Beckett" + "quote": "今天的成就是昨天的不可能。", + "author": "罗伯特·舒乐" }, { - "quote": "The more you know, the more you realize you know nothing.", - "author": "Socrates" + "quote": "不要满足于故事,不要满足于别人的经历。揭开你自己的神话。", + "author": "鲁米" }, { - "quote": "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge.", - "author": "Stephen Hawking" + "quote": "忘掉安全感,到你所害怕的地方去生活。摧毁你的名声,做一个声名狼藉的人。", + "author": "鲁米" }, { - "quote": "The universe doesn't allow perfection.", - "author": "Stephen Hawking" + "quote": "卖掉你的聪明,买下困惑。", + "author": "鲁米" }, { - "quote": "Whether you want to uncover the secrets of the universe, or you want to pursue a career in the 21st century, basic computer programming is an essential skill to learn.", - "author": "Stephen Hawking" + "quote": "治疗疼痛的方法是在疼痛中。", + "author": "鲁米" }, { - "quote": "The scariest moment is always just before you start.", - "author": "Stephen King" + "quote": "不要害怕完美——你永远达不到完美。", + "author": "萨尔瓦多·达利" }, { - "quote": "You can, you should, and if you're brave enough to start, you will.", - "author": "Stephen King" + "quote": "不要看时钟。做它做的事情。继续前进。", + "author": "山姆·李文生" }, { - "quote": "Arise, Awake and Stop not until the goal is reached.", - "author": "Swami Vivekananda" + "quote": "曾经尝试过。曾经失败过。没关系。再尝试一次。再失败一次。做得更好。", + "author": "塞缪尔·贝克特" }, { - "quote": "It is said that your life flashes before your eyes just before you die. That is true, it's called Life.", - "author": "Terry Pratchett" + "quote": "你知道的越多,你就越发现你什么都不知道。", + "author": "苏格拉底" }, { - "quote": "Believe you can and you're halfway there.", - "author": "Theodore Roosevelt" + "quote": "知识最大的敌人不是无知,而是知识的幻觉。", + "author": "史蒂芬·霍金" }, { - "quote": "I have not failed. I've just found 10,000 ways that won't work.", - "author": "Thomas A. Edison" + "quote": "宇宙不允许完美。", + "author": "史蒂芬·霍金" }, { - "quote": "Our greatest weakness lies in giving up. The most certain way to succeed is always to try just one more time.", - "author": "Thomas A. Edison" + "quote": "无论你是想揭开宇宙的秘密,还是想在 21 世纪谋求职业,基础计算机编程是必学的技能。", + "author": "史蒂芬·霍金" }, { - "quote": "The harder the conflict, the more glorious the triumph.", - "author": "Thomas Paine" + "quote": "最可怕的时刻总是在你开始之前。", + "author": "史蒂芬.金" }, { - "quote": "The Web as I envisaged it, we have not seen it yet. The future is still so much bigger than the past.", - "author": "Tim Berners-Lee" + "quote": "你可以,你应该,如果你有足够的勇气开始,你会的。", + "author": "史蒂芬.金" }, { - "quote": "Failure is the condiment that gives success its flavor.", - "author": "Truman Capote" + "quote": "起床,醒来,直到达到目标才停下来。", + "author": "斯瓦米·维韦卡南达" }, { - "quote": "Those who says it cannot be done should not interrupt the person doing it.", - "author": "Unknown" + "quote": "据说,就在你死之前,你的生命在你眼前闪过。没错,这就是所谓的生活。", + "author": "泰瑞·普莱契" }, { - "quote": "Even if you fall on your face, you're still moving forward.", - "author": "Victor Kiam" + "quote": "相信你可以,你就成功了一半。", + "author": "西奥多·罗斯福" }, { - "quote": "It's not whether you get knocked down, it's whether you get up.", - "author": "Vince Lombardi" + "quote": "我没有失败。我只是找到了一万种行不通的方法。", + "author": "爱迪生" }, { - "quote": "I dream my painting and I paint my dream.", - "author": "Vincent van Gogh" + "quote": "我们最大的弱点在于放弃。最确定的成功方法永远是再试一次。", + "author": "爱迪生" }, { - "quote": "Let us cultivate our garden.", - "author": "Voltaire" + "quote": "冲突越激烈,胜利就越光荣。", + "author": "托马斯·潘恩" }, { - "quote": "Aim for the moon. If you miss, you may hit a star.", - "author": "W. Clement Stone" + "quote": "我所设想的网络,我们还没有看到。未来仍然比过去要大得多。", + "author": "蒂姆·伯纳斯-李" }, { - "quote": "The way to get started is to quit talking and begin doing.", - "author": "Walt Disney" + "quote": "失败是给成功增添风味的调味品。", + "author": "杜鲁门·卡波特" }, { - "quote": "You miss 100% of the shots you don't take.", - "author": "Wayne Gretzky" + "quote": "那些说这是不可能的人,不应该打断正在做这件事的人。", + "author": "佚名" }, { - "quote": "Don't let yesterday take up too much of today.", - "author": "Will Rogers" + "quote": "用不同的眼光看待平常的事物。", + "author": "维科·马吉斯泰蒂" }, { - "quote": "Even if you're on the right track, you'll get run over if you just sit there.", - "author": "Will Rogers" + "quote": "即使你摔倒在地,你仍然在前进。", + "author": "维克托·基亚姆" }, { - "quote": "Do not wait to strike till the iron is hot; but make it hot by striking.", - "author": "William Butler Yeats" + "quote": "重要的不是你是否被击倒,而是你是否爬起来。", + "author": "文斯·隆巴迪" }, { - "quote": "You cannot swim for new horizons until you have courage to lose sight of the shore.", - "author": "William Faulkner" + "quote": "我梦想我的画,我画我的梦。", + "author": "文森特·梵高" }, { - "quote": "Be not afraid of greatness. Some are born great, some achieve greatness, and others have greatness thrust upon them.", - "author": "William Shakespeare" + "quote": "伟大的事情是由一系列小事情汇聚而成的。", + "author": "文森特·梵高" }, { - "quote": "We know what we are, but not what we may be.", - "author": "William Shakespeare" + "quote": "让我们耕种我们的花园。", + "author": "伏尔泰" }, { - "quote": "In theory there is no difference between theory and practice. In practice there is.", - "author": "Yogi Berra" + "quote": "瞄准月亮。如果你错失目标,你可能会击中一颗恒星。", + "author": "克莱门特·斯通" }, { - "quote": "You can see a lot by just looking.", - "author": "Yogi Berra" + "quote": "开始的方法是停止说话,开始行动。", + "author": "沃尔特·迪斯尼" }, { - "quote": "There is no elevator to success, you have to take the stairs.", - "author": "Zig Ziglar" + "quote": "你不尝试的话,就有 100% 的机会失败。", + "author": "韦恩·格雷茨基" }, { - "quote": "You don't have to be great to start, but you have to start to be great.", - "author": "Zig Ziglar" + "quote": "不要让昨天占据太多的今天。", + "author": "威尔·罗杰斯" + }, + { + "quote": "即使你是在正确的路上,如果你只是坐在那里,你也会被撞倒。", + "author": "威尔·罗杰斯" + }, + { + "quote": "不要等铁热了再打;要用敲打使它变热。", + "author": "威廉·巴特勒·叶芝" + }, + { + "quote": "除非你有勇气离开海岸,否则你无法游向新的地平线。", + "author": "威廉·福克纳" + }, + { + "quote": "不要害怕伟大。 有些人天生伟大,有些人成就伟大,而另一些人则被推向伟大。", + "author": "威廉·莎士比亚" + }, + { + "quote": "我们知道我们是什么,但不知道我们可能成为什么。", + "author": "威廉·莎士比亚" + }, + { + "quote": "从理论上讲,理论和实践之间没有区别。在实践中是有的。", + "author": "约吉·贝拉" + }, + { + "quote": "通过看,你就可以觉察到很多东西。", + "author": "约吉·贝拉" + }, + { + "quote": "成功没有电梯,你必须走楼梯。", + "author": "齐格·齐格勒" + }, + { + "quote": "你不一定要很伟大才能开始,但你必须开始才能变得伟大。", + "author": "齐格·齐格勒" } ] } diff --git a/client/i18n/locales/chinese/translations.json b/client/i18n/locales/chinese/translations.json index 967982d023f..91cf2f1c245 100644 --- a/client/i18n/locales/chinese/translations.json +++ b/client/i18n/locales/chinese/translations.json @@ -11,6 +11,7 @@ "view": "查看", "view-code": "查看代码", "view-project": "查看项目", + "view-cert-title": "View {{certTitle}}", "show-cert": "显示认证", "claim-cert": "申请认证", "save-progress": "保存进度", @@ -52,7 +53,7 @@ "check-code": "检查您的代码 (Ctrl + Enter)", "check-code-2": "检查你的代码", "reset": "重置", - "reset-code": "重置所有代码", + "reset-step": "Reset This Step", "help": "帮助", "get-help": "获得帮助", "watch-video": "观看视频", @@ -157,7 +158,8 @@ "honesty": "学术诚信条例", "internet": "你在各平台的账号", "portfolio": "作品集设置", - "privacy": "隐私设置" + "privacy": "隐私设置", + "personal-info": "Personal Information" }, "danger": { "heading": "危险区域", @@ -272,6 +274,7 @@ "add-subtitles": "帮助我们完善或添加字幕", "wrong-answer": "抱歉,这个答案不正确。再试一次?", "check-answer": "点击下方按钮,查看你的答案。", + "assignment-not-complete": "Please finish the assignments", "solution-link": "解决方案链接", "github-link": "GitHub 链接", "submit-and-go": "提交并访问下一个挑战", @@ -339,6 +342,7 @@ "title": "支持我们的慈善组织", "processing": "我们正在处理你的捐款。", "redirecting": "重新引导中...", + "thanks": "Thanks for donating", "thank-you": "谢谢你成为我们的支持者。", "additional": "你可以使用这个链接 <0>{{url}} 额外进行一次性捐款:", "help-more": "帮助我们做更多", @@ -462,7 +466,8 @@ "iframe-preview": "{{title}} 预览", "iframe-alert": "通常,此链接会将你带到另一个网站!一切正常,这个链接指向:{{externalLink}}。", "iframe-form-submit-alert": "通常这个表单将被提交!工作正常,这将被提交到:{{externalLink}}", - "document-notfound": "找不到文件" + "document-notfound": "找不到文件", + "slow-load-msg": "Looks like this is taking longer than usual, please try refreshing the page." }, "icons": { "gold-cup": "金奖杯", @@ -507,7 +512,8 @@ "step": "步骤", "steps": "步骤", "steps-for": "{{blockTitle}} 的步骤", - "code-example": "{{codeName}} 代码示例" + "code-example": "{{codeName}} 代码示例", + "opens-new-window": "Opens in new window" }, "flash": { "honest-first": "申请认证之前,你必须先接受我们的《学术诚信条例》", diff --git a/client/i18n/locales/english/intro.json b/client/i18n/locales/english/intro.json index f6f66d32d27..dd6e626afdb 100644 --- a/client/i18n/locales/english/intro.json +++ b/client/i18n/locales/english/intro.json @@ -553,7 +553,7 @@ "intro": [ "Until this point, you've only used JavaScript on the front end to add interactivity to a page, solve algorithm challenges, or build an SPA. But JavaScript can also be used on the back end, or server, to build entire web applications.", "Today, one of the popular ways to build applications is through microservices, which are small, modular applications that work together to form a larger whole.", - "In the Back End Development and APIs Certification, you'll learn how to write back end apps with Node.js and npm (Node Package Manager). You'll also build web applications with the Express framework, and build a People Finder microservice with MongoDB and the Mongoose library." + "In the Back End Development and APIs Certification, you'll learn how to write back end apps with Node.js and npm. You'll also build web applications with the Express framework, and build a People Finder microservice with MongoDB and the Mongoose library." ], "note": "", "blocks": { @@ -778,6 +778,10 @@ "Attribute: Rosetta Code" ] }, + "the-odin-project": { + "title": "The Odin Project", + "intro": ["A description is to be determined"] + }, "project-euler": { "title": "Project Euler", "intro": [ diff --git a/client/i18n/locales/english/translations.json b/client/i18n/locales/english/translations.json index afee76b2d58..165fa0c6146 100644 --- a/client/i18n/locales/english/translations.json +++ b/client/i18n/locales/english/translations.json @@ -11,6 +11,7 @@ "view": "View", "view-code": "View Code", "view-project": "View Project", + "view-cert-title": "View {{certTitle}}", "show-cert": "Show Certification", "claim-cert": "Claim Certification", "save-progress": "Save Progress", @@ -52,7 +53,7 @@ "check-code": "Check Your Code (Ctrl + Enter)", "check-code-2": "Check Your Code", "reset": "Reset", - "reset-code": "Reset All Code", + "reset-step": "Reset This Step", "help": "Help", "get-help": "Get Help", "watch-video": "Watch a Video", @@ -157,7 +158,8 @@ "honesty": "Academic Honesty Policy", "internet": "Your Internet Presence", "portfolio": "Portfolio Settings", - "privacy": "Privacy Settings" + "privacy": "Privacy Settings", + "personal-info": "Personal Information" }, "danger": { "heading": "Danger Zone", @@ -272,6 +274,7 @@ "add-subtitles": "Help improve or add subtitles", "wrong-answer": "Sorry, that's not the right answer. Give it another try?", "check-answer": "Click the button below to check your answer.", + "assignment-not-complete": "Please finish the assignments", "solution-link": "Solution Link", "github-link": "GitHub Link", "submit-and-go": "Submit and go to my next challenge", @@ -463,7 +466,8 @@ "iframe-preview": "{{title}} preview", "iframe-alert": "Normally this link would bring you to another website! It works. This is a link to: {{externalLink}}", "iframe-form-submit-alert": "Normally this form would be submitted! It works. This will be submitted to: {{externalLink}}", - "document-notfound": "document not found" + "document-notfound": "document not found", + "slow-load-msg": "Looks like this is taking longer than usual, please try refreshing the page." }, "icons": { "gold-cup": "Gold Cup", @@ -508,7 +512,8 @@ "step": "Step", "steps": "Steps", "steps-for": "Steps for {{blockTitle}}", - "code-example": "{{codeName}} code example" + "code-example": "{{codeName}} code example", + "opens-new-window": "Opens in new window" }, "flash": { "honest-first": "To claim a certification, you must first accept our academic honesty policy", diff --git a/client/i18n/locales/espanol/intro.json b/client/i18n/locales/espanol/intro.json index 938a114868e..c4aab96d457 100644 --- a/client/i18n/locales/espanol/intro.json +++ b/client/i18n/locales/espanol/intro.json @@ -553,7 +553,7 @@ "intro": [ "Hasta este punto, solo has usado JavaScript en la parte de front-end para agregar interactividad a una página, resolver los desafíos de algoritmos o construir un SPA. Pero JavaScript también se puede utilizar en el back-end, o servidor, para construir aplicaciones web completas.", "Hoy en día, una de las formas populares para construir aplicaciones es a través de microservicios, que son pequeñas aplicaciones modulares que trabajan juntas para formar una aplicación más grande.", - "En la Certificación Desarrollo de Back End y APIs, aprenderás cómo escribir aplicaciones de back-end con Node.js y npm (Node Package Manager). También construirás aplicaciones web con el framework Express, y un microservicio \"People Finder\" con MongoDB y la biblioteca Mongoose." + "In the Back End Development and APIs Certification, you'll learn how to write back end apps with Node.js and npm. You'll also build web applications with the Express framework, and build a People Finder microservice with MongoDB and the Mongoose library." ], "note": "", "blocks": { @@ -778,6 +778,10 @@ "Atributo: Código Rosetta" ] }, + "the-odin-project": { + "title": "The Odin Project", + "intro": ["A description is to be determined"] + }, "project-euler": { "title": "Project Euler", "intro": [ diff --git a/client/i18n/locales/espanol/translations.json b/client/i18n/locales/espanol/translations.json index 7d706029cd4..121d851d193 100644 --- a/client/i18n/locales/espanol/translations.json +++ b/client/i18n/locales/espanol/translations.json @@ -11,6 +11,7 @@ "view": "Ver", "view-code": "Mostrar Código", "view-project": "Mostrar Proyecto", + "view-cert-title": "View {{certTitle}}", "show-cert": "Mostrar certificación", "claim-cert": "Solicitar certificación", "save-progress": "Guardar progreso", @@ -52,7 +53,7 @@ "check-code": "Comprueba tu código (Ctrl + Enter)", "check-code-2": "Comprueba tu código", "reset": "Restablecer", - "reset-code": "Restablecer todo el código", + "reset-step": "Reset This Step", "help": "Ayuda", "get-help": "Obtener ayuda", "watch-video": "Ver un Video", @@ -157,7 +158,8 @@ "honesty": "Política de Honestidad Académica", "internet": "Tu presencia en Internet", "portfolio": "Ajustes de portafolio", - "privacy": "Ajustes de privacidad" + "privacy": "Ajustes de privacidad", + "personal-info": "Personal Information" }, "danger": { "heading": "Zona de peligro", @@ -272,6 +274,7 @@ "add-subtitles": "Ayudar a mejorar o agregar subtítulos", "wrong-answer": "Lo siento, esa no es la respuesta correcta. ¡Vuelve a intentarlo!", "check-answer": "Haz clic en el botón de abajo para verificar tu respuesta.", + "assignment-not-complete": "Please finish the assignments", "solution-link": "Enlace a la solución", "github-link": "Enlace de GitHub", "submit-and-go": "Enviar y pasar a mi siguiente desafío", @@ -339,6 +342,7 @@ "title": "Support our charity", "processing": "Estamos procesando tu donación.", "redirecting": "Redirigiendo...", + "thanks": "Thanks for donating", "thank-you": "Gracias por tu apoyo.", "additional": "Puede hacer una donación adicional única de cualquier monto utilizando este enlace: <0>{{url}}", "help-more": "Ayúdanos a hacer más", @@ -462,7 +466,8 @@ "iframe-preview": "{{title}} Vista previa", "iframe-alert": "¡Normalmente este link te llevaría a otro sitio web! Funciona. Este es un enlace a: {{externalLink}}", "iframe-form-submit-alert": "¡Normalmente, se enviaría este formulario! Funciona. Esto se enviará a: {{externalLink}}", - "document-notfound": "documento no encontrado" + "document-notfound": "documento no encontrado", + "slow-load-msg": "Looks like this is taking longer than usual, please try refreshing the page." }, "icons": { "gold-cup": "Copa de Oro", @@ -507,7 +512,8 @@ "step": "Paso", "steps": "Pasos", "steps-for": "Pasos para {{blockTitle}}", - "code-example": "ejemplo de código de {{codeName}}" + "code-example": "ejemplo de código de {{codeName}}", + "opens-new-window": "Opens in new window" }, "flash": { "honest-first": "Para reclamar una certificación, primero debes aceptar nuestra política de honestidad académica.", diff --git a/client/i18n/locales/german/intro.json b/client/i18n/locales/german/intro.json index c7337e2d451..2c100257f3b 100644 --- a/client/i18n/locales/german/intro.json +++ b/client/i18n/locales/german/intro.json @@ -553,7 +553,7 @@ "intro": [ "Bis zu diesem Punkt hast du JavaScript nur im Front-End verwendet, um einer Seite Interaktivität hinzuzufügen, Aufgaben mit Algorithmen zu lösen oder eine SPA zu bauen. Aber JavaScript kann auch im Back-End, also auf dem Server, verwendet werden, um ganze Webanwendungen zu erstellen.", "Heutzutage ist eine der beliebtesten Arten, Anwendungen zu erstellen, Microservices. Das sind kleine, modulare Anwendungen, die zusammenarbeiten und ein größeres Ganzes bilden.", - "In der Zertifizierung für Back-End-Entwicklung und APIs lernst du, wie du Back-End-Apps mit Node.js und npm (Node Package Manager) schreibst. Du wirst auch Webanwendungen mit dem Express-Framework erstellen und einen Personensuche-Microservice mit MongoDB und der Mongoose-Bibliothek bauen." + "In the Back End Development and APIs Certification, you'll learn how to write back end apps with Node.js and npm. You'll also build web applications with the Express framework, and build a People Finder microservice with MongoDB and the Mongoose library." ], "note": "", "blocks": { @@ -778,6 +778,10 @@ "Attribut: Rosetta Code" ] }, + "the-odin-project": { + "title": "The Odin Project", + "intro": ["A description is to be determined"] + }, "project-euler": { "title": "Projekt Euler", "intro": [ diff --git a/client/i18n/locales/german/translations.json b/client/i18n/locales/german/translations.json index fc9518f3983..cb6f8aa2da9 100644 --- a/client/i18n/locales/german/translations.json +++ b/client/i18n/locales/german/translations.json @@ -11,6 +11,7 @@ "view": "Anzeigen", "view-code": "Code anschauen", "view-project": "Projekt anschauen", + "view-cert-title": "View {{certTitle}}", "show-cert": "Zertifikat anzeigen", "claim-cert": "Zertifizierung anfordern", "save-progress": "Fortschritt speichern", @@ -52,7 +53,7 @@ "check-code": "Überprüfe deinen Code (Strg + Enter)", "check-code-2": "Prüfe deinen Code", "reset": "Zurücksetzen", - "reset-code": "Den Quellcode zurücksetzen", + "reset-step": "Reset This Step", "help": "Hilfe", "get-help": "Hilfe bekommen", "watch-video": "Ein Video ansehen", @@ -157,7 +158,8 @@ "honesty": "Akademischer Ehrlichkeitskodex", "internet": "Dein Internetauftritt", "portfolio": "Portfolio-Einstellungen", - "privacy": "Privatsphäre-Einstellungen" + "privacy": "Privatsphäre-Einstellungen", + "personal-info": "Personal Information" }, "danger": { "heading": "Gefahrenzone", @@ -272,6 +274,7 @@ "add-subtitles": "Hilf mit Untertitel hinzuzufügen oder zu verbessern", "wrong-answer": "Sorry, das ist nicht die richtige Antwort. Möchtest du noch einen Anlauf wagen?", "check-answer": "Klick unten auf den Button, um deine Antwort zu überprüfen.", + "assignment-not-complete": "Please finish the assignments", "solution-link": "Lösungs-Link", "github-link": "GitHub Link", "submit-and-go": "Absenden und zur nächsten Herausforderung gehen", @@ -339,6 +342,7 @@ "title": "Support our charity", "processing": "Wir bearbeiten deine Spende.", "redirecting": "Weiterleiten...", + "thanks": "Thanks for donating", "thank-you": "Vielen Dank für deine Unterstützung.", "additional": "Du kannst eine zusätzliche einmalige Spende in beliebiger Höhe über diesen Link tätigen: <0>{{url}}", "help-more": "Hilf uns, mehr zu tun", @@ -462,7 +466,8 @@ "iframe-preview": "{{title}} Vorschau", "iframe-alert": "Normalerweise würde dieser Link dich auf eine andere Website führen! Er funktioniert. Dies ist ein Link zu: {{externalLink}}", "iframe-form-submit-alert": "Normalerweise würde dieses Formular übermittelt werden! Es funktioniert. Dies wird übermittelt an: {{externalLink}}", - "document-notfound": "Dokument wurde nicht gefunden" + "document-notfound": "Dokument wurde nicht gefunden", + "slow-load-msg": "Looks like this is taking longer than usual, please try refreshing the page." }, "icons": { "gold-cup": "Goldpokal", @@ -507,7 +512,8 @@ "step": "Schritt", "steps": "Schritte", "steps-for": "Schritte für {{blockTitle}}", - "code-example": "{{codeName}} code example" + "code-example": "{{codeName}} code example", + "opens-new-window": "Opens in new window" }, "flash": { "honest-first": "Um eine Zertifizierung zu erlangen, musst du zunächst unsere Richtlinie zur akademischen Ehrlichkeit akzeptieren", diff --git a/client/i18n/locales/italian/intro.json b/client/i18n/locales/italian/intro.json index 8145eb32773..ea8ec10c6ef 100644 --- a/client/i18n/locales/italian/intro.json +++ b/client/i18n/locales/italian/intro.json @@ -553,7 +553,7 @@ "intro": [ "Fino a questo punto, hai usato solo JavaScript sul front-end per aggiungere interattività a una pagina, risolvere sfide algoritmiche o costruire una Single Page Application. Ma JavaScript può essere utilizzato anche nel backend (cioè lato server), per costruire intere applicazioni web.", "Oggi, uno dei modi più popolari per costruire applicazioni è attraverso i microservizi, che sono piccole applicazioni modulari che lavorano insieme per formare qualcosa di più grande.", - "Nella Certificazione Sviluppo Back End e API, imparerai a scrivere app per il backend con Node.js e npm (Node Package Manager). Costruirai anche applicazioni web con il framework Express, e costruirai un microservizio Trova Persone con MongoDB e la libreria Mongoose." + "Nella Certificazione Sviluppo Back End e API, imparerai a scrivere app per il backend con Node.js e npm. Costruirai anche applicazioni web con il framework Express, e costruirai un microservizio Trova Persone con MongoDB e la libreria Mongoose." ], "note": "", "blocks": { @@ -778,6 +778,10 @@ "Fonte: Codice Rosetta" ] }, + "the-odin-project": { + "title": "The Odin Project", + "intro": ["A description is to be determined"] + }, "project-euler": { "title": "Progetto Eulero", "intro": [ diff --git a/client/i18n/locales/italian/translations.json b/client/i18n/locales/italian/translations.json index 3a5a9a7bbcb..1ef85aff2f3 100644 --- a/client/i18n/locales/italian/translations.json +++ b/client/i18n/locales/italian/translations.json @@ -11,6 +11,7 @@ "view": "Visualizza", "view-code": "Visualizza il Codice", "view-project": "Visualizza il Progetto", + "view-cert-title": "Visualizza {{certTitle}}", "show-cert": "Mostra la Certificazione", "claim-cert": "Richiedi la Certificazione", "save-progress": "Salva l'avanzamento", @@ -52,7 +53,7 @@ "check-code": "Verifica il tuo codice (Ctrl + Invio)", "check-code-2": "Verifica il tuo codice", "reset": "Resetta", - "reset-code": "Resetta tutto il codice", + "reset-step": "Resetta questo step", "help": "Guida", "get-help": "Ottieni Aiuto", "watch-video": "Guarda un video", @@ -80,7 +81,7 @@ "big-heading-1": "Impara a programmare — gratis.", "big-heading-2": "Costruisci progetti.", "big-heading-3": "Ottieni certificazioni.", - "h2-heading": "Dal 2014, più di 40.000 laureati di freeCodeCamp.org hanno ottenuto posti di lavoro presso aziende tecnologiche, tra cui:", + "h2-heading": "Dal 2014, più di 40.000 studenti di freeCodeCamp.org hanno ottenuto posti di lavoro presso aziende tecnologiche, tra cui:", "hero-img-description": "Studenti di un gruppo di studio locale di freeCodeCamp in Corea del Sud.", "as-seen-in": "Hanno parlato di noi:", "testimonials": { @@ -157,7 +158,8 @@ "honesty": "Politica di Onestà Accademica", "internet": "La Tua presenza su Internet", "portfolio": "Impostazioni Portfolio", - "privacy": "Impostazioni Privacy" + "privacy": "Impostazioni Privacy", + "personal-info": "Personal Information" }, "danger": { "heading": "Zona di Pericolo", @@ -272,6 +274,7 @@ "add-subtitles": "Aiuta a migliorare o aggiungi sottotitoli", "wrong-answer": "Siamo spiacenti, non è la risposta giusta. Vuoi riprovare?", "check-answer": "Fai clic sul pulsante qui sotto per controllare la tua risposta.", + "assignment-not-complete": "Please finish the assignments", "solution-link": "Link alla soluzione", "github-link": "Link GitHub", "submit-and-go": "Invia e vai alla prossima sfida", @@ -339,6 +342,7 @@ "title": "Supporta il nostro ente", "processing": "Stiamo elaborando la tua donazione.", "redirecting": "Reindirizzamento...", + "thanks": "Grazie per la donazione", "thank-you": "Grazie per essere un sostenitore.", "additional": "Puoi effettuare una donazione una tantum aggiuntiva di qualsiasi importo utilizzando questo link: <0>{{url}}", "help-more": "Aiutaci a fare di più", @@ -462,7 +466,8 @@ "iframe-preview": "Anteprima {{title}}", "iframe-alert": "Solitamente questo link ti porterebbe su un altro sito web! Funziona. Questo è un link per {{externalLink}}", "iframe-form-submit-alert": "Normalmente questo modulo sarebbe stato inviato! Funziona. Sarà inviato a: {{externalLink}}", - "document-notfound": "documento non trovato" + "document-notfound": "documento non trovato", + "slow-load-msg": "Sembra che sia necessario più tempo del solito, per favore prova ad aggiornare la pagina." }, "icons": { "gold-cup": "Coppa d'Oro", @@ -507,7 +512,8 @@ "step": "Step", "steps": "Step", "steps-for": "Step per {{blockTitle}}", - "code-example": "{{codeName}} esempio di codice" + "code-example": "{{codeName}} esempio di codice", + "opens-new-window": "Apri in una nuova finestra" }, "flash": { "honest-first": "Per richiedere una certificazione, è necessario prima accettare la nostra politica di onestà accademica", diff --git a/client/i18n/locales/japanese/intro.json b/client/i18n/locales/japanese/intro.json index 3331222240a..1238c190923 100644 --- a/client/i18n/locales/japanese/intro.json +++ b/client/i18n/locales/japanese/intro.json @@ -553,7 +553,7 @@ "intro": [ "ここまでは、JavaScript をフロントエンドで使用して、ページに対話性を加えたり、アルゴリズムチャレンジを解決したり、SPA を構築したりしてきました。しかし JavaScript は、バックエンド (サーバー) でも使用でき、ウェブアプリケーション全体を構築することができます。", "現在、アプリケーションを構築する一般的な方法の一つはマイクロサービスを使用する方法です。これは、小さなモジュール式のアプリケーションを組み合わせて、より大きな全体を形成する方法です。", - "バックエンド開発と API 認定講座では、Node.js と npm (Node Package Manager) を使用してバックエンドアプリを記述する方法を学習します。また、Express フレームワークでウェブアプリケーションを構築し、そして MongoDB と Mongoose ライブラリで People Finder マイクロサービスを構築します。" + "バックエンド開発と API 認定講座では、Node.js と npm を使用してバックエンドアプリを記述する方法を学習します。Express フレームワークでウェブアプリケーションを構築し、MongoDB と Mongoose ライブラリで People Finder マイクロサービスを構築します。" ], "note": "", "blocks": { @@ -778,6 +778,10 @@ "作: Rosetta Code" ] }, + "the-odin-project": { + "title": "The Odin Project", + "intro": ["A description is to be determined"] + }, "project-euler": { "title": "プロジェクト・オイラー", "intro": [ diff --git a/client/i18n/locales/japanese/translations.json b/client/i18n/locales/japanese/translations.json index 00b9053b9c4..6564dca5525 100644 --- a/client/i18n/locales/japanese/translations.json +++ b/client/i18n/locales/japanese/translations.json @@ -11,6 +11,7 @@ "view": "表示", "view-code": "コードを表示", "view-project": "プロジェクトを表示", + "view-cert-title": "{{certTitle}}を表示", "show-cert": "認定証を表示", "claim-cert": "認定証を取得", "save-progress": "進行状況を保存", @@ -52,7 +53,7 @@ "check-code": "コードをチェック (Ctrl + Enter)", "check-code-2": "コードをチェック", "reset": "リセット", - "reset-code": "全てのコードをリセット", + "reset-step": "Reset This Step", "help": "ヘルプ", "get-help": "助けを求める", "watch-video": "動画を見る", @@ -157,7 +158,8 @@ "honesty": "学問的誠実性ポリシー", "internet": "他サービスのリンク", "portfolio": "ポートフォリオ設定", - "privacy": "プライバシー設定" + "privacy": "プライバシー設定", + "personal-info": "Personal Information" }, "danger": { "heading": "危険な操作", @@ -272,6 +274,7 @@ "add-subtitles": "字幕の改善や追加を支援する", "wrong-answer": "残念、正しい答えではありません。もう一度挑戦してみましょう。", "check-answer": "以下のボタンをクリックして解答を確認してください。", + "assignment-not-complete": "Please finish the assignments", "solution-link": "回答のリンク", "github-link": "GitHub のリンク", "submit-and-go": "提出して次のチャレンジに進む", @@ -339,6 +342,7 @@ "title": "当団体への支援", "processing": "いただいた寄付を処理中です。", "redirecting": "リダイレクト中...", + "thanks": "寄付ありがとうございます", "thank-you": "サポーターとなってくださり、ありがとうございます。", "additional": "任意の金額を、追加で 1 回ずつご寄付いただけるリンクはこちら: <0>{{url}}", "help-more": "私たちのさらなる活動をご支援ください", @@ -375,8 +379,8 @@ "need-help": "現在または過去の寄付についてお困りでしょうか?", "forward-receipt": "寄付の領収書のコピーを添えて、お問い合わせ内容を donors@freecodecamp.org までお送りください。", "efficiency": "freeCodeCamp は非常に効率的な、教育分野の慈善団体です。", - "why-donate-1": "freeCodeCamp にご寄付いただくことにより、新しい技能を学習して家族を支えようとしている人々を助けることに繋がります。", - "why-donate-2": "また、あなた自身の技術スキルを高めるための、学習リソースの作成を支援することにもなります。", + "why-donate-1": "freeCodeCamp への寄付を通して、新しい技能を習得して家計を支えようと努力している人々を支援できます。", + "why-donate-2": "また、あなた自身の技術スキルを高める学習リソースの作成を支援することにもなります。", "bigger-donation": "より多くの金額による一回の寄付や、小切手の送付、または他の方法をお考えでしょうか?", "other-ways": "<0>当団体の使命を支援する方法 は他にも多数ございます。", "failed-pay": "処理が完了しませんでした。再度お試しください。", @@ -462,7 +466,8 @@ "iframe-preview": "{{title}} のプレビュー", "iframe-alert": "このリンクは通常の環境では他のウェブサイトを開きます。正しく動作しています。これは {{externalLink}} へのリンクです。", "iframe-form-submit-alert": "通常はこれでフォームが送信されます。正しく動作しています。フォームは {{externalLink}} へ送信されます。", - "document-notfound": "ドキュメントが見つかりませんでした" + "document-notfound": "ドキュメントが見つかりませんでした", + "slow-load-msg": "通常より処理に時間がかかっているようです。ページの再読み込みをお試しください。" }, "icons": { "gold-cup": "ゴールドカップ", @@ -477,7 +482,7 @@ "hint": "ヒント", "heart": "ハート", "initial": "初期状態", - "input-reset": "Clear search terms", + "input-reset": "検索キーワードをクリア", "info": "導入情報", "spacer": "スペーサー", "toggle": "トグルチェックマーク", @@ -507,7 +512,8 @@ "step": "ステップ", "steps": "ステップ一覧", "steps-for": "「{{blockTitle}}」のステップ一覧", - "code-example": "{{codeName}} のコード例" + "code-example": "{{codeName}} のコード例", + "opens-new-window": "新しいウィンドウで開く" }, "flash": { "honest-first": "認定証を請求するには、まず学問的誠実性ポリシーに同意する必要があります。", @@ -708,7 +714,7 @@ "Legacy Back End": "(レガシー) バックエンド", "legacy-back-end": "バックエンド認定証", "Legacy Data Visualization": "(レガシー) データ可視化", - "legacy-data-visualization": "Data Visualization Certification", + "legacy-data-visualization": "データ可視化認定証", "Legacy Information Security and Quality Assurance": "(レガシー) 情報セキュリティと品質保証認定証", "information-security-and-quality-assurance": "情報セキュリティと品質保証認定証", "Legacy Full Stack Certification": "(レガシー) フルスタック認定証", @@ -769,7 +775,7 @@ }, "signout": { "heading": "アカウントからサインアウト", - "p1": "注意: サインアウト後は進行状況が保存されません。", + "p1": "注意: サインアウト状態では進行状況が保存されません。", "p2": "この操作では、このデバイスおよびブラウザーセッションのみを対象にサインアウトされます。サインアウトしてよろしいですか?", "certain": "はい、サインアウトします", "nevermind": "いいえ、サインアウトしません" diff --git a/client/i18n/locales/portuguese/intro.json b/client/i18n/locales/portuguese/intro.json index e6e28507998..f0e6bc8c734 100644 --- a/client/i18n/locales/portuguese/intro.json +++ b/client/i18n/locales/portuguese/intro.json @@ -553,7 +553,7 @@ "intro": [ "Até esse ponto, você usou JavaScript apenas no front-end para adicionar interatividade a uma página, resolver desafios de algoritmos ou construir uma SPA. Mas o JavaScript também pode ser usado no back-end, ou servidor, para construir aplicações web inteiras.", "Hoje em dia, uma das formas populares de se criar aplicações é através do uso de microsserviços, que são pequenas aplicações modulares que trabalham em conjunto para formar uma aplicação maior inteira.", - "Na certificação de APIs e desenvolvimento de back-end, você aprenderá a escrever aplicações de back-end com o Node.js e o npm (Node Package Manager). Você também vai construir aplicações web com o framework Express e criará um microsserviço de localização de pessoas com o MongoDB e com a biblioteca Mongoose." + "Na certificação de APIs e desenvolvimento de back-end, você aprenderá a escrever aplicações de back-end com o Node.js e o npm. Você também vai construir aplicações web com o framework Express e criará um microsserviço de localização de pessoas com o MongoDB e com a biblioteca Mongoose." ], "note": "", "blocks": { @@ -778,6 +778,10 @@ "Attribute: Rosetta Code" ] }, + "the-odin-project": { + "title": "The Odin Project", + "intro": ["A description is to be determined"] + }, "project-euler": { "title": "Projeto Euler", "intro": [ diff --git a/client/i18n/locales/portuguese/translations.json b/client/i18n/locales/portuguese/translations.json index debb22e2fb3..6ab7599a83c 100644 --- a/client/i18n/locales/portuguese/translations.json +++ b/client/i18n/locales/portuguese/translations.json @@ -11,6 +11,7 @@ "view": "Visualizar", "view-code": "Ver código", "view-project": "Ver o projeto", + "view-cert-title": "Ver {{certTitle}}", "show-cert": "Exibir certificado", "claim-cert": "Solicitar certificação", "save-progress": "Salvar progresso", @@ -52,7 +53,7 @@ "check-code": "Verifique seu código (Ctrl + Enter)", "check-code-2": "Verifique seu código", "reset": "Redefinir", - "reset-code": "Redefinir todo o código", + "reset-step": "Reiniciar este passo", "help": "Ajuda", "get-help": "Obter ajuda", "watch-video": "Assistir a um vídeo", @@ -157,7 +158,8 @@ "honesty": "Política de honestidade acadêmica", "internet": "Sua presença na internet", "portfolio": "Configurações do portfólio", - "privacy": "Configurações de privacidade" + "privacy": "Configurações de privacidade", + "personal-info": "Personal Information" }, "danger": { "heading": "Zona de perigo", @@ -272,6 +274,7 @@ "add-subtitles": "Ajudar a melhorar ou adicionar legendas", "wrong-answer": "Desculpe, essa não é a resposta correta. Quer tentar novamente?", "check-answer": "Clique no botão abaixo para verificar sua resposta.", + "assignment-not-complete": "Please finish the assignments", "solution-link": "Link da solução", "github-link": "Link do GitHub", "submit-and-go": "Enviar e ir para o meu próximo desafio", @@ -339,6 +342,7 @@ "title": "Ajude nossa instituição", "processing": "Estamos processando a sua doação.", "redirecting": "Redirecionando...", + "thanks": "Agradecemos por sua doação", "thank-you": "Obrigado pelo seu apoio.", "additional": "Você pode fazer uma doação adicional de qualquer valor usando este link: <0>{{url}}", "help-more": "Ajude-nos a fazer mais", @@ -462,7 +466,8 @@ "iframe-preview": "Visualização de {{title}}", "iframe-alert": "Normalmente, este link levaria você para outro site da web! Funciona. Esse é um link para: {{externalLink}}", "iframe-form-submit-alert": "Normalmente, esse formulário seria enviado! Funciona. Ele será enviado para: {{externalLink}}", - "document-notfound": "documento não encontrado" + "document-notfound": "documento não encontrado", + "slow-load-msg": "Parece que está demorando mais do que o normal. Tente atualizar a página." }, "icons": { "gold-cup": "Taça de ouro", @@ -507,7 +512,8 @@ "step": "Passo", "steps": "Passos", "steps-for": "Passos para {{blockTitle}}", - "code-example": "Exemplo de código de {{codeName}}" + "code-example": "Exemplo de código de {{codeName}}", + "opens-new-window": "Abre em uma nova janela" }, "flash": { "honest-first": "Para solicitar uma certificação, você precisa primeiro aceitar nossa política de honestidade acadêmica", diff --git a/client/i18n/locales/ukrainian/intro.json b/client/i18n/locales/ukrainian/intro.json index b725c1a96c7..8dfc2308bb9 100644 --- a/client/i18n/locales/ukrainian/intro.json +++ b/client/i18n/locales/ukrainian/intro.json @@ -553,7 +553,7 @@ "intro": [ "До цього моменту ви використовували JavaScript тільки для фронтенду, аби зробити вебсторінку інтерактивнішою, розв'язати завдання з алгоритмами, або створити SPA. Але JavaScript можна використовувати й в бекенд, або на сервері, для створення цілих вебзастосунків.", "Сьогодні один із найпопулярніших способів створення застосунків – за допомогою мікросервісів, маленьких модульних застосунків, які разом формують єдине ціле.", - "У сертифікації «Розробка Back End та API» ви навчитеся писати бекенд програми за допомогою Node.js та npm (Node Package Manager). Також, ви створите вебзастосунок за допомогою фреймворку Express та мікросервіс для пошуку людей за допомогою MongoDB і Mongoose library." + "У сертифікації «Розробка Back End та API» ви навчитеся писати бекенд програми за допомогою Node.js та npm. Ви також створите вебзастосунок за допомогою фреймворку Express та мікросервіс для пошуку людей за допомогою MongoDB і бібліотеки Mongoose." ], "note": "", "blocks": { @@ -778,6 +778,10 @@ "Атрибут: Rosetta Code" ] }, + "the-odin-project": { + "title": "The Odin Project", + "intro": ["A description is to be determined"] + }, "project-euler": { "title": "Проєкт «Ейлер»", "intro": [ diff --git a/client/i18n/locales/ukrainian/translations.json b/client/i18n/locales/ukrainian/translations.json index 2b906fac215..a6a44d0b8f4 100644 --- a/client/i18n/locales/ukrainian/translations.json +++ b/client/i18n/locales/ukrainian/translations.json @@ -11,6 +11,7 @@ "view": "Перегляд", "view-code": "Переглянути код", "view-project": "Переглянути проєкт", + "view-cert-title": "Переглянути {{certTitle}}", "show-cert": "Показати сертифікацію", "claim-cert": "Отримати сертифікацію", "save-progress": "Зберегти прогрес", @@ -52,7 +53,7 @@ "check-code": "Перевірити код (Ctrl + Enter)", "check-code-2": "Перевірити код", "reset": "Скинути", - "reset-code": "Скинути весь код", + "reset-step": "Скинути цей крок", "help": "Допомога", "get-help": "Отримати допомогу", "watch-video": "Подивитися відео", @@ -157,7 +158,8 @@ "honesty": "Політика академічної доброчесності", "internet": "Ваші соціальні мережі", "portfolio": "Налаштування портфоліо", - "privacy": "Налаштування конфіденційності" + "privacy": "Налаштування конфіденційності", + "personal-info": "Personal Information" }, "danger": { "heading": "Небезпечна зона", @@ -272,6 +274,7 @@ "add-subtitles": "Допомогти покращити або додати субтитри", "wrong-answer": "Нам шкода, але це неправильна відповідь. Спробуєте ще раз?", "check-answer": "Натисніть кнопку нижче, щоб перевірити свою відповідь.", + "assignment-not-complete": "Please finish the assignments", "solution-link": "Посилання на рішення", "github-link": "Посилання на GitHub", "submit-and-go": "Відправити та перейти до мого наступного завдання", @@ -339,6 +342,7 @@ "title": "Підтримайте нашу організацію", "processing": "Ми опрацьовуємо ваш внесок.", "redirecting": "Переадресація...", + "thanks": "Дякуємо за внесок", "thank-you": "Дякуємо за вашу підтримку.", "additional": "Ви можете зробити додатковий одноразовий внесок на будь-яку суму за цим посиланням: <0>{{url}}", "help-more": "Допоможіть нам розвиватися", @@ -462,7 +466,8 @@ "iframe-preview": "Передперегляд {{title}}", "iframe-alert": "Зазвичай це посилання перенесло б вас на інший вебсайт! Воно працює. Це посилання на: {{externalLink}}", "iframe-form-submit-alert": "Зазвичай ця форма буде відправлена! Вона буде відправлена на: {{externalLink}}", - "document-notfound": "документ не знайдено" + "document-notfound": "документ не знайдено", + "slow-load-msg": "Схоже, це займає більше часу, ніж зазвичай. Будь ласка, спробуйте оновити сторінку." }, "icons": { "gold-cup": "Золотий кубок", @@ -507,7 +512,8 @@ "step": "Крок", "steps": "Кроки", "steps-for": "Кроки для {{blockTitle}}", - "code-example": "Приклад коду {{codeName}}" + "code-example": "Приклад коду {{codeName}}", + "opens-new-window": "Відкривається у новому вікні" }, "flash": { "honest-first": "Щоб отримати сертифікацію, ви повинні спочатку прийняти нашу політику академічної доброчесності", diff --git a/client/package.json b/client/package.json index 70667dc73e3..59974c2b79b 100644 --- a/client/package.json +++ b/client/package.json @@ -38,7 +38,7 @@ "@babel/polyfill": "7.12.1", "@babel/preset-env": "7.20.2", "@babel/preset-react": "7.18.6", - "@babel/standalone": "7.20.11", + "@babel/standalone": "7.20.12", "@fortawesome/fontawesome-svg-core": "6.2.1", "@fortawesome/free-brands-svg-icons": "6.2.1", "@fortawesome/free-solid-svg-icons": "6.2.1", @@ -52,7 +52,7 @@ "@loadable/component": "5.15.2", "@reach/router": "1.3.4", "@sentry/gatsby": "6.19.7", - "@stripe/react-stripe-js": "1.16.1", + "@stripe/react-stripe-js": "1.16.3", "@stripe/stripe-js": "1.46.0", "@types/react-scrollable-anchor": "0.6.1", "algoliasearch": "4.14.3", @@ -67,9 +67,10 @@ "date-fns": "2.27.0", "enzyme": "3.11.0", "enzyme-adapter-react-16": "1.15.7", - "final-form": "4.20.7", + "final-form": "4.20.8", "gatsby": "3.15.0", "gatsby-cli": "3.15.0", + "gatsby-link": "3.15.0", "gatsby-plugin-advanced-sitemap": "2.1.0", "gatsby-plugin-create-client-paths": "3.15.0", "gatsby-plugin-manifest": "3.15.0", @@ -87,7 +88,7 @@ "nanoid": "3.3.4", "normalize-url": "4.5.1", "path-browserify": "1.0.1", - "postcss": "8.4.20", + "postcss": "8.4.21", "prismjs": "1.29.0", "process": "0.11.10", "prop-types": "15.8.1", @@ -96,11 +97,12 @@ "react": "16.14.0", "react-dom": "16.14.0", "react-final-form": "6.5.9", - "react-ga": "3.3.1", + "react-gtm-module": "2.0.11", "react-helmet": "6.1.0", "react-hotkeys": "2.0.0", "react-i18next": "11.18.6", - "react-instantsearch-dom": "6.38.1", + "react-instantsearch-core": "6.38.3", + "react-instantsearch-dom": "6.38.3", "react-lazy-load": "3.1.14", "react-monaco-editor": "0.40.0", "react-redux": "5.1.2", @@ -131,10 +133,11 @@ }, "devDependencies": { "@babel/types": "7.20.7", - "@codesee/babel-plugin-instrument": "0.470.0", - "@codesee/tracker": "0.470.0", + "@codesee/babel-plugin-instrument": "0.479.0", + "@codesee/tracker": "0.479.0", "@testing-library/jest-dom": "5.16.5", "@testing-library/react": "12.1.5", + "@types/react-gtm-module": "2.0.1", "autoprefixer": "10.4.13", "babel-plugin-transform-imports": "2.0.0", "chokidar": "3.5.3", diff --git a/client/src/analytics/index.ts b/client/src/analytics/index.ts new file mode 100644 index 00000000000..32a21405122 --- /dev/null +++ b/client/src/analytics/index.ts @@ -0,0 +1,25 @@ +import TagManager from 'react-gtm-module'; + +import { + devAnalyticsId, + prodAnalyticsId, + prodAnalyticsESId +} from '../../../config/analytics-settings'; + +import envData from '../../../config/env.json'; + +const { deploymentEnv, clientLocale } = envData; + +const analyticsIDSelector = () => { + if (deploymentEnv === 'staging') return devAnalyticsId; + else if (clientLocale === 'espanol') return prodAnalyticsESId; + else return prodAnalyticsId; +}; + +const gtmId = analyticsIDSelector(); + +if (typeof document !== `undefined`) { + TagManager.initialize({ gtmId }); +} + +export default TagManager; diff --git a/client/src/analytics/index.tsx b/client/src/analytics/index.tsx deleted file mode 100644 index 79791770228..00000000000 --- a/client/src/analytics/index.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import ReactGA from 'react-ga'; -import { - devAnalyticsId, - prodAnalyticsId -} from '../../../config/analytics-settings'; -import envData from '../../../config/env.json'; - -const { deploymentEnv } = envData; - -const analyticsId = - deploymentEnv === 'staging' ? devAnalyticsId : prodAnalyticsId; - -ReactGA.initialize(analyticsId); - -export default ReactGA; diff --git a/client/src/client-only-routes/show-certification.tsx b/client/src/client-only-routes/show-certification.tsx index eeaeebbea55..6ac89c242ed 100644 --- a/client/src/client-only-routes/show-certification.tsx +++ b/client/src/client-only-routes/show-certification.tsx @@ -155,12 +155,8 @@ const ShowCertification = (props: ShowCertificationProps): JSX.Element => { ) { setIsDonationDisplayed(true); executeGA({ - type: 'event', - data: { - category: 'Donation View', - action: 'Displayed Certificate Donation', - nonInteraction: true - } + event: 'donationview', + action: 'Displayed Certificate Donation' }); } // eslint-disable-next-line react-hooks/exhaustive-deps diff --git a/client/src/client-only-routes/show-project-links.tsx b/client/src/client-only-routes/show-project-links.tsx index 30df99a8843..94d8a603759 100644 --- a/client/src/client-only-routes/show-project-links.tsx +++ b/client/src/client-only-routes/show-project-links.tsx @@ -83,6 +83,7 @@ const ShowProjectLinks = (props: ShowProjectLinksProps): JSX.Element => { string; theme: Themes; updateDonationFormState: (state: DonationApprovalData) => unknown; - isVariantA: boolean; paymentContext: PaymentContext; }; @@ -97,22 +95,19 @@ const mapStateToProps = createSelector( isDonatingSelector, donationFormStateSelector, userSelector, - isVariantASelector, ( showLoading: DonateFormProps['showLoading'], isSignedIn: DonateFormProps['isSignedIn'], isDonating: DonateFormProps['isDonating'], donationFormState: DonateFormState, - { email, theme }: { email: string; theme: Themes }, - isVariantA: boolean + { email, theme }: { email: string; theme: Themes } ) => ({ isSignedIn, isDonating, showLoading, donationFormState, email, - theme, - isVariantA + theme }) ); @@ -280,8 +275,7 @@ class DonateForm extends Component { t, isMinimalForm, isSignedIn, - isDonating, - isVariantA + isDonating } = this.props; const priorityTheme = defaultTheme ? defaultTheme : theme; const isOneTime = donationDuration === 'one-time'; @@ -335,7 +329,6 @@ class DonateForm extends Component { processing={processing} t={t} theme={priorityTheme} - isVariantA={isVariantA} /> )} diff --git a/client/src/components/Donation/donation-modal.tsx b/client/src/components/Donation/donation-modal.tsx index 0b3c97465e4..04d5f2e4efb 100644 --- a/client/src/components/Donation/donation-modal.tsx +++ b/client/src/components/Donation/donation-modal.tsx @@ -66,16 +66,12 @@ function DonateModal({ useEffect(() => { if (show) { void playTone('donation'); - executeGA({ type: 'modal', data: '/donation-modal' }); + executeGA({ event: 'pageview', pagePath: '/donation-modal' }); executeGA({ - type: 'event', - data: { - category: 'Donation View', - action: `Displayed ${ - recentlyClaimedBlock ? 'block' : 'progress' - } donation modal`, - nonInteraction: true - } + event: 'donationview', + action: `Displayed ${ + recentlyClaimedBlock ? 'Block' : 'Progress' + } Donation Modal` }); } }, [show, recentlyClaimedBlock, executeGA]); diff --git a/client/src/components/Donation/donation-text-components.tsx b/client/src/components/Donation/donation-text-components.tsx index 8df1792ca2f..208f989ccfd 100644 --- a/client/src/components/Donation/donation-text-components.tsx +++ b/client/src/components/Donation/donation-text-components.tsx @@ -47,11 +47,13 @@ const FaqItem = ( const [isExpanded, setExpanded] = useState(false); return (
- {isExpanded && ( <> diff --git a/client/src/components/Donation/donation.css b/client/src/components/Donation/donation.css index da4c037fff6..2bb6675f6e1 100644 --- a/client/src/components/Donation/donation.css +++ b/client/src/components/Donation/donation.css @@ -526,6 +526,12 @@ a.patreon-button:hover { margin-inline-start: 0.25em; } +.faq-item h3 { + font-size: 1rem; + line-height: 1.5; + margin: 0; +} + .faq-item div { width: 100%; padding: 10px 15px; diff --git a/client/src/components/Donation/paypal-button.tsx b/client/src/components/Donation/paypal-button.tsx index e6b3167e82f..3e54d4fd119 100644 --- a/client/src/components/Donation/paypal-button.tsx +++ b/client/src/components/Donation/paypal-button.tsx @@ -59,10 +59,7 @@ const { deploymentEnv: 'staging' | 'live'; }; -export class PaypalButton extends Component< - PaypalButtonProps, - PaypalButtonState -> { +class PaypalButton extends Component { static displayName = 'PaypalButton'; state: PaypalButtonState = { amount: defaultDonation.donationAmount, diff --git a/client/src/components/Donation/stripe-card-form.tsx b/client/src/components/Donation/stripe-card-form.tsx index 683c118480a..f10ac62de70 100644 --- a/client/src/components/Donation/stripe-card-form.tsx +++ b/client/src/components/Donation/stripe-card-form.tsx @@ -17,7 +17,6 @@ import { PaymentProvider } from '../../../../config/donation-settings'; import envData from '../../../../config/env.json'; import { Themes } from '../settings/theme'; import { DonationApprovalData, PostPayment } from './types'; -import SecurityLockIcon from './security-lock-icon'; const { stripePublicKey }: { stripePublicKey: string | null } = envData; @@ -27,7 +26,6 @@ interface FormPropTypes { t: (label: string) => string; theme: Themes; processing: boolean; - isVariantA: boolean; } interface Element { @@ -43,8 +41,7 @@ const StripeCardForm = ({ t, onDonationStateChange, postPayment, - processing, - isVariantA + processing }: FormPropTypes): JSX.Element => { const [isSubmissionValid, setSubmissionValidity] = useState(true); const [isTokenizing, setTokenizing] = useState(false); @@ -166,7 +163,6 @@ const StripeCardForm = ({ disabled={!stripe || !elements || isSubmitting} type='submit' > - {!isVariantA && } {t('buttons.donate')} diff --git a/client/src/components/Header/components/nav-links.tsx b/client/src/components/Header/components/nav-links.tsx index dc9bd246338..3de9d1c1063 100644 --- a/client/src/components/Header/components/nav-links.tsx +++ b/client/src/components/Header/components/nav-links.tsx @@ -65,7 +65,7 @@ const mapDispatchToProps = { openSignoutModal }; -export class NavLinks extends Component { +class NavLinks extends Component { static displayName: string; langButtonRef: React.RefObject; firstLangOptionRef: React.RefObject; diff --git a/client/src/components/Header/components/universal-nav.css b/client/src/components/Header/components/universal-nav.css index 709432a5eca..83d8dec691c 100644 --- a/client/src/components/Header/components/universal-nav.css +++ b/client/src/components/Header/components/universal-nav.css @@ -449,9 +449,7 @@ button.nav-link[aria-disabled='true'] { } .universal-nav-right .fcc_searchBar .ais-SearchBox-form { - width: 100vw; max-width: unset; - padding: 0 15px; } /* In mobile layout, prevent search input from hanging around if the @@ -472,12 +470,9 @@ button.nav-link[aria-disabled='true'] { display: none; } -.universal-nav-right .ais-SearchBox-input { +.universal-nav-right .ais-SearchBox-form { width: calc(100vw - 17rem); -} - -.universal-nav-right .ais-SearchBox-reset { - right: 291px; + margin-inline-start: 15px; } .universal-nav-right .fcc_searchBar .ais-Hits { @@ -485,6 +480,9 @@ button.nav-link[aria-disabled='true'] { } .ais-SearchBox-input:focus { + box-sizing: content-box; + margin-inline-start: -30px; + padding-inline: 35px; outline: 3px solid var(--blue-mid); } @@ -523,8 +521,6 @@ button.nav-link[aria-disabled='true'] { } .fcc_searchBar .ais-SearchBox-form { - display: flex; - justify-content: flex-end; max-width: calc(100vw - 350px); } @@ -553,21 +549,13 @@ button.nav-link[aria-disabled='true'] { } .universal-nav-right .fcc_searchBar .ais-SearchBox-form { - width: 100%; + width: calc(100% - 30px); } .display-menu { max-height: calc(100vh - var(--header-height) * 2); } - .universal-nav-right .ais-SearchBox-input { - width: calc(100vw - 30px); - } - - .universal-nav-right .ais-SearchBox-reset { - right: 15px; - } - .universal-nav-right .fcc_searchBar .ais-Hits { width: calc(100% - 30px); } diff --git a/client/src/components/app-mount-notifier.test.tsx b/client/src/components/app-mount-notifier.test.tsx index 78c83e1ba8b..94121daba6c 100644 --- a/client/src/components/app-mount-notifier.test.tsx +++ b/client/src/components/app-mount-notifier.test.tsx @@ -8,7 +8,6 @@ import i18nTestConfig from '../../i18n/config-for-tests'; import { createStore } from '../redux/createStore'; import AppMountNotifier from './app-mount-notifier'; -jest.mock('react-ga'); jest.unmock('react-i18next'); type Language = keyof typeof i18nextCodes; diff --git a/client/src/components/helpers/__snapshots__/loader.test.tsx.snap b/client/src/components/helpers/__snapshots__/loader.test.tsx.snap index 6dab24a5651..d754d42ea67 100644 --- a/client/src/components/helpers/__snapshots__/loader.test.tsx.snap +++ b/client/src/components/helpers/__snapshots__/loader.test.tsx.snap @@ -14,6 +14,12 @@ exports[` matches the fullScreen render snapshot 1`] = `
+
+

+ misc.slow-load-msg +

`; diff --git a/client/src/components/helpers/loader.css b/client/src/components/helpers/loader.css index 5acf705bd85..2182772d777 100644 --- a/client/src/components/helpers/loader.css +++ b/client/src/components/helpers/loader.css @@ -2,8 +2,10 @@ height: 100%; width: 100%; display: flex; + flex-direction: column; justify-content: center; align-items: center; + gap: 1em; } .fcc-loader .sk-spinner, diff --git a/client/src/components/helpers/loader.tsx b/client/src/components/helpers/loader.tsx index 9e5aa9b2aa4..dd265c19e56 100644 --- a/client/src/components/helpers/loader.tsx +++ b/client/src/components/helpers/loader.tsx @@ -1,27 +1,49 @@ import React, { useState, useEffect } from 'react'; +import { useTranslation } from 'react-i18next'; import Spinner from 'react-spinkit'; import './loader.css'; interface LoaderProps { fullScreen?: boolean; - timeout?: number; + loaderDelay?: number; + messageDelay?: number; } -function Loader({ fullScreen, timeout }: LoaderProps): JSX.Element { - const [showSpinner, setShowSpinner] = useState(!timeout); +function Loader({ + fullScreen, + loaderDelay, + messageDelay +}: LoaderProps): JSX.Element { + const { t } = useTranslation(); + + const [showSpinner, setShowSpinner] = useState(!loaderDelay); + const [showMessage, setShowMessage] = useState(!messageDelay); useEffect(() => { - let timerId: ReturnType; - if (!showSpinner) { - timerId = setTimeout(() => setShowSpinner(true), timeout); + if (loaderDelay) { + const timerId = setTimeout(() => setShowSpinner(true), loaderDelay); + return () => clearTimeout(timerId); } - return () => clearTimeout(timerId); - }, [setShowSpinner, showSpinner, timeout]); + }, [loaderDelay]); + + useEffect(() => { + if (messageDelay) { + const timerId = setTimeout(() => setShowMessage(true), messageDelay); + return () => clearTimeout(timerId); + } + }, [messageDelay]); + return (
{showSpinner && } + {showMessage && fullScreen && ( + <> +
+

{t('misc.slow-load-msg')}

+ + )}
); } diff --git a/client/src/components/layouts/certification.tsx b/client/src/components/layouts/certification.tsx index 74e13244146..2469b0c2d77 100644 --- a/client/src/components/layouts/certification.tsx +++ b/client/src/components/layouts/certification.tsx @@ -3,12 +3,11 @@ import Helmet from 'react-helmet'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; -import { fetchUser, executeGA } from '../../redux/actions'; +import { fetchUser } from '../../redux/actions'; import { isSignedInSelector } from '../../redux/selectors'; interface CertificationProps { children?: React.ReactNode; - executeGA?: (args: { type: string; data: string }) => void; fetchUser: () => void; isSignedIn?: boolean; pathname: string; @@ -18,18 +17,15 @@ const mapStateToProps = createSelector(isSignedInSelector, isSignedIn => ({ isSignedIn })); -const mapDispatchToProps = { fetchUser, executeGA }; +const mapDispatchToProps = { fetchUser }; class CertificationLayout extends Component { static displayName = 'CertificationLayout'; componentDidMount() { - const { isSignedIn, fetchUser, pathname } = this.props; + const { isSignedIn, fetchUser } = this.props; if (!isSignedIn) { fetchUser(); } - if (this.props.executeGA) { - this.props.executeGA({ type: 'page', data: pathname }); - } } render(): JSX.Element { diff --git a/client/src/components/layouts/default.tsx b/client/src/components/layouts/default.tsx index db1d1712575..071611f499d 100644 --- a/client/src/components/layouts/default.tsx +++ b/client/src/components/layouts/default.tsx @@ -1,6 +1,7 @@ import React, { Component, ReactNode } from 'react'; import Helmet from 'react-helmet'; import { TFunction, withTranslation } from 'react-i18next'; +// import TagManager from 'react-gtm-module'; import { connect } from 'react-redux'; import { bindActionCreators, Dispatch } from 'redux'; import { createSelector } from 'reselect'; @@ -16,8 +17,7 @@ import { isBrowser } from '../../../utils'; import { fetchUser, onlineStatusChange, - serverStatusChange, - executeGA + serverStatusChange } from '../../redux/actions'; import { isSignedInSelector, @@ -76,8 +76,7 @@ const mapDispatchToProps = (dispatch: Dispatch) => fetchUser, removeFlashMessage, onlineStatusChange, - serverStatusChange, - executeGA + serverStatusChange }, dispatch ); @@ -105,24 +104,14 @@ class DefaultLayout extends Component { static displayName = 'DefaultLayout'; componentDidMount() { - const { isSignedIn, fetchUser, pathname, executeGA } = this.props; + const { isSignedIn, fetchUser } = this.props; if (!isSignedIn) { fetchUser(); } - executeGA({ type: 'page', data: pathname }); - window.addEventListener('online', this.updateOnlineStatus); window.addEventListener('offline', this.updateOnlineStatus); } - componentDidUpdate(prevProps: DefaultLayoutProps) { - const { pathname, executeGA } = this.props; - const { pathname: prevPathname } = prevProps; - if (pathname !== prevPathname) { - executeGA({ type: 'page', data: pathname }); - } - } - componentWillUnmount() { window.removeEventListener('online', this.updateOnlineStatus); window.removeEventListener('offline', this.updateOnlineStatus); @@ -157,7 +146,7 @@ class DefaultLayout extends Component { const useSystemTheme = fetchState.complete && isSignedIn === false; if (fetchState.pending) { - return ; + return ; } return ( diff --git a/client/src/components/layouts/rtl-layout.css b/client/src/components/layouts/rtl-layout.css index 89d33283e61..5c6d1e82b23 100644 --- a/client/src/components/layouts/rtl-layout.css +++ b/client/src/components/layouts/rtl-layout.css @@ -1,3 +1,11 @@ +/* +Increase the spacing in paragraphs +*/ + +[dir='rtl'] p { + line-height: 2rem; +} + /* breadcrumbs section */ @@ -90,7 +98,7 @@ the "not" and "is" selector is used to stop it from affecting other section and external fontawesome link icon */ -[dir='rtl'] .nav-link > svg, +[dir='rtl'] .nav-link > .fa-up-right-from-square, [dir='rtl'] td a[target='_blank'] > svg { transform: rotate(270deg); } @@ -100,7 +108,7 @@ universal-nav-bar and menu secion */ -@media (min-width: 767.5px) { +@media (min-width: 601px) { [dir='rtl'] .nav-list { right: auto; left: 0; @@ -112,6 +120,16 @@ and menu secion left: inherit; right: 17px; } + + [dir='rtl'] .fcc_searchBar .ais-Hits { + left: auto; + right: 15px; + } + + [dir='rtl'] .universal-nav-right .fcc_searchBar { + left: auto; + right: 0; + } } /* had to change overflow, because it clips the first words of the english articles */ diff --git a/client/src/components/profile/components/certifications.tsx b/client/src/components/profile/components/certifications.tsx index 1ce96539054..2f92efa0404 100644 --- a/client/src/components/profile/components/certifications.tsx +++ b/client/src/components/profile/components/certifications.tsx @@ -55,7 +55,9 @@ function CertButton({ username, cert }: CertButtonProps): JSX.Element { to={`/certification/${username}/${cert.certSlug}`} data-cy='claimed-certification' > - View {t(`certification.title.${cert.certSlug}`)} + {t('buttons.view-cert-title', { + certTitle: t(`certification.title.${cert.certSlug}`) + })} diff --git a/client/src/components/profile/components/time-line.test.tsx b/client/src/components/profile/components/time-line.test.tsx index 6256c9e7314..5d0dd9a1da1 100644 --- a/client/src/components/profile/components/time-line.test.tsx +++ b/client/src/components/profile/components/time-line.test.tsx @@ -7,7 +7,6 @@ import { render, screen } from '../../../../utils/test-utils'; import { createStore } from '../../../redux/createStore'; import TimeLine from './time-line'; -jest.mock('react-ga'); const store = createStore(); beforeEach(() => { @@ -57,7 +56,9 @@ describe('', () => { it('Render button when only solution is present', () => { // @ts-expect-error render(, store); - const showViewButton = screen.getByRole('link', { name: 'buttons.view' }); + const showViewButton = screen.getByRole('link', { + name: 'buttons.view settings.labels.solution-for (aria.opens-new-window)' + }); expect(showViewButton).toHaveAttribute( 'href', 'https://github.com/freeCodeCamp/freeCodeCamp' @@ -84,7 +85,9 @@ describe('', () => { // @ts-expect-error render(, store); - const viewButtons = screen.getAllByRole('button', { name: 'buttons.view' }); + const viewButtons = screen.getAllByRole('button', { + name: 'buttons.view settings.labels.solution-for' + }); viewButtons.forEach(button => { expect(button).toBeInTheDocument(); }); diff --git a/client/src/components/profile/components/time-line.tsx b/client/src/components/profile/components/time-line.tsx index 9dcdb48934b..b9c19a0d426 100644 --- a/client/src/components/profile/components/time-line.tsx +++ b/client/src/components/profile/components/time-line.tsx @@ -103,12 +103,15 @@ function TimelineInner({ function renderViewButton( completedChallenge: CompletedChallenge ): React.ReactNode { + const { id } = completedChallenge; + const projectTitle = idToNameMap.get(id)?.challengeTitle || ''; return ( viewSolution(completedChallenge)} showProjectPreview={() => viewProject(completedChallenge)} - displayContext={'timeline'} + displayContext='timeline' > ); } diff --git a/client/src/components/search/searchBar/searchbar-base.css b/client/src/components/search/searchBar/searchbar-base.css index 55d00a90b47..cda535b090c 100644 --- a/client/src/components/search/searchBar/searchbar-base.css +++ b/client/src/components/search/searchBar/searchbar-base.css @@ -614,7 +614,6 @@ a[class^='ais-'] { } .ais-SearchBox-submit, .ais-SearchBox-reset { - position: absolute; -webkit-appearance: none; -moz-appearance: none; appearance: none; @@ -623,15 +622,7 @@ a[class^='ais-'] { height: 20px; } .ais-SearchBox-reset { - right: 0; -} -.ais-SearchBox-resetIcon, -.ais-SearchBox-loadingIcon { - position: absolute; - top: 50%; - left: 50%; - -webkit-transform: translateX(-50%) translateY(-50%); - transform: translateX(-50%) translateY(-50%); + margin-inline-start: 10px; } .ais-SearchBox-submitIcon path, .ais-SearchBox-resetIcon path { diff --git a/client/src/components/search/searchBar/searchbar.css b/client/src/components/search/searchBar/searchbar.css index a8c47f6cacc..f4ac394d740 100644 --- a/client/src/components/search/searchBar/searchbar.css +++ b/client/src/components/search/searchBar/searchbar.css @@ -14,16 +14,15 @@ } .ais-SearchBox-input { - padding: 0 10px; + padding-block: 0; + padding-inline-start: 5px; font-size: 18px; display: inline-block; - margin-top: 6px; height: 26px; } .ais-SearchBox-submit, .ais-SearchBox-reset { - margin-top: 6px; height: 26px; width: 26px; background-color: var(--gray-75); @@ -33,6 +32,10 @@ padding-inline: 3px; } +.ais-SearchBox-reset { + padding-block: 0 2px; +} + .fcc_searchBar .ais-SearchBox-input, .fcc_searchBar .ais-Hits { z-index: 100; @@ -40,10 +43,6 @@ color: var(--gray-00); } -.fcc_searchBar .ais-SearchBox-input { - padding-inline: 2em; -} - .fcc_searchBar .ais-Hits { left: 15px; } @@ -125,15 +124,26 @@ and arrow keys */ font-weight: 300; } -.ais-SearchBox-input { - width: calc(100vw - 350px); +.fcc_searchBar .ais-SearchBox-form { + display: grid; + grid-template-columns: 26px auto 36px; + grid-template-areas: 'submit input reset'; + margin-bottom: 0; + gap: 0.25em; + margin-top: 6px; + background-color: var(--gray-75); } -.fcc_searchBar .ais-SearchBox-form { - margin-bottom: 0; - display: flex; - flex-direction: row-reverse; - gap: 0.25em; +.ais-SearchBox-input { + grid-area: input; +} + +.ais-SearchBox-submit { + grid-area: submit; +} + +.ais-SearchBox-reset { + grid-area: reset; } @media (min-width: 981px) { @@ -152,8 +162,6 @@ and arrow keys */ left: 0px; } .fcc_searchBar .ais-SearchBox-form { - display: flex; - justify-content: flex-end; top: auto; } } diff --git a/client/src/components/settings/about.tsx b/client/src/components/settings/about.tsx index 61f5ff7d96c..d18a777d9a1 100644 --- a/client/src/components/settings/about.tsx +++ b/client/src/components/settings/about.tsx @@ -15,6 +15,7 @@ import SoundSettings from './sound'; import ThemeSettings, { Themes } from './theme'; import UsernameSettings from './username'; import KeyboardShortcutsSettings from './keyboard-shortcuts'; +import SectionHeader from './section-header'; type FormValues = { name: string; @@ -212,6 +213,7 @@ class AboutSettings extends Component {

+ {t('settings.headings.personal-info')}
diff --git a/client/src/components/settings/certification.js b/client/src/components/settings/certification.js index a44724bdf09..2e81f4cf4be 100644 --- a/client/src/components/settings/certification.js +++ b/client/src/components/settings/certification.js @@ -213,9 +213,10 @@ export class CertificationSettings extends Component { ); }; @@ -285,7 +286,8 @@ export class CertificationSettings extends Component { data-cy={`btn-for-${certSlug}`} onClick={createClickHandler(certSlug)} > - {isCert ? t('buttons.show-cert') : t('buttons.claim-cert')} + {isCert ? t('buttons.show-cert') : t('buttons.claim-cert')}{' '} + {certName} diff --git a/client/src/components/settings/certification.test.tsx b/client/src/components/settings/certification.test.tsx index de7969d34a6..195b64dd920 100644 --- a/client/src/components/settings/certification.test.tsx +++ b/client/src/components/settings/certification.test.tsx @@ -20,7 +20,7 @@ describe('', () => { expect( screen.getByRole('link', { - name: 'buttons.show-cert' + name: /^buttons.show-cert\s+\S+/ }) ).toHaveAttribute( 'href', @@ -33,7 +33,7 @@ describe('', () => { renderWithRedux(); const allClaimedCerts = screen.getAllByRole('link', { - name: 'buttons.show-cert' + name: /^buttons.show-cert\s+\S+/ }); allClaimedCerts.forEach(cert => { @@ -49,7 +49,7 @@ describe('', () => { renderWithRedux(); const allClaimedCerts = screen.getAllByRole('link', { - name: 'buttons.show-cert' + name: /^buttons.show-cert\s+\S+/ }); allClaimedCerts.forEach(cert => { @@ -65,7 +65,7 @@ describe('', () => { expect( screen.getByRole('link', { - name: 'buttons.view' + name: 'buttons.view settings.labels.solution-for (aria.opens-new-window)' }) ).toHaveAttribute('href', 'https://github.com/freeCodeCamp/freeCodeCamp'); }); diff --git a/client/src/components/solution-display-widget/index.tsx b/client/src/components/solution-display-widget/index.tsx index 4ba1a5aa581..50694807034 100644 --- a/client/src/components/solution-display-widget/index.tsx +++ b/client/src/components/solution-display-widget/index.tsx @@ -1,17 +1,15 @@ import { faExternalLinkAlt } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { - Button, - DropdownButton, - MenuItem -} from '@freecodecamp/react-bootstrap'; +import { Button, Dropdown, MenuItem } from '@freecodecamp/react-bootstrap'; import React from 'react'; import { useTranslation } from 'react-i18next'; import { CompletedChallenge } from '../../redux/prop-types'; import { getSolutionDisplayType } from '../../utils/solution-display-type'; +import './solution-display-widget.css'; interface Props { completedChallenge: CompletedChallenge; dataCy?: string; + projectTitle: string; showUserCode: () => void; showProjectPreview?: () => void; displayContext: 'timeline' | 'settings' | 'certification'; @@ -20,6 +18,7 @@ interface Props { export function SolutionDisplayWidget({ completedChallenge, dataCy, + projectTitle, showUserCode, showProjectPreview, displayContext @@ -29,37 +28,48 @@ export function SolutionDisplayWidget({ const viewText = t('buttons.view'); const viewCode = t('buttons.view-code'); const viewProject = t('buttons.view-project'); - + // We need to add a random number for dropdown button id's since there may be + // two dropdowns for the same project on the page. + const randomIdSuffix = Math.floor(Math.random() * 1_000_000); const ShowFilesSolutionForCertification = ( ); const ShowProjectAndGithubLinkForCertification = ( - - - {t('certification.project.solution')} - - - {t('certification.project.source')} - - + + + {viewText}{' '} + + {t('settings.labels.solution-for', { projectTitle })} + + + + + {t('certification.project.solution')} + ({t('aria.opens-new-window')}) + + + + {t('certification.project.source')} + ({t('aria.opens-new-window')}) + + + + ); const ShowProjectLinkForCertification = ( ); const MissingSolutionComponentForCertification = ( @@ -81,57 +96,67 @@ export function SolutionDisplayWidget({ bsStyle='primary' className='btn-invert' data-cy={dataCy} - id={`btn-for-${id}`} onClick={showUserCode} > - {viewText} + {viewText}{' '} + + {t('settings.labels.solution-for', { projectTitle })} + ); const ShowMultifileProjectSolution = (
- - - {viewCode} - - - {viewProject} - - + + + {viewText}{' '} + + {t('settings.labels.solution-for', { projectTitle })} + + + + + {viewCode} + + + {viewProject} + + +
); const ShowProjectAndGithubLinks = (
- - - {t('buttons.frontend')} - - - {t('buttons.backend')} - - + + + {viewText}{' '} + + {t('settings.labels.solution-for', { projectTitle })} + + + + + {t('buttons.frontend')}{' '} + ({t('aria.opens-new-window')}) + + + + {t('buttons.backend')}{' '} + ({t('aria.opens-new-window')}) + + + +
); const ShowProjectLink = ( @@ -140,11 +165,15 @@ export function SolutionDisplayWidget({ bsStyle='primary' className='btn-invert' href={solution} - id={`btn-for-${id}`} rel='noopener noreferrer' target='_blank' > - {viewText} + {viewText}{' '} + + {t('settings.labels.solution-for', { projectTitle })} ( + {t('aria.opens-new-window')}) + + ); const MissingSolutionComponent = diff --git a/client/src/components/solution-display-widget/solution-display-widget.css b/client/src/components/solution-display-widget/solution-display-widget.css new file mode 100644 index 00000000000..4bff674e523 --- /dev/null +++ b/client/src/components/solution-display-widget/solution-display-widget.css @@ -0,0 +1,3 @@ +.solutions-dropdown a[role='menuitem'] { + text-decoration: none; +} diff --git a/client/src/pages/donate.tsx b/client/src/pages/donate.tsx index c2991783c09..20834631b7a 100644 --- a/client/src/pages/donate.tsx +++ b/client/src/pages/donate.tsx @@ -22,14 +22,10 @@ import { signInLoadingSelector, userSelector } from '../redux/selectors'; import { PaymentContext } from '../../../config/donation-settings'; export interface ExecuteGaArg { - type: string; - data: { - category: string; - action: string; - nonInteraction?: boolean; - label?: string; - value?: number; - }; + event: string; + action: string; + duration?: string; + amount?: number; } interface DonatePageProps { executeGA: (arg: ExecuteGaArg) => void; @@ -59,12 +55,8 @@ function DonatePage({ }: DonatePageProps) { useEffect(() => { executeGA({ - type: 'event', - data: { - category: 'Donation View', - action: `Displayed donate page`, - nonInteraction: true - } + event: 'donationview', + action: `Displayed Donate Page` }); // eslint-disable-next-line react-hooks/exhaustive-deps }, []); diff --git a/client/src/pages/learn.tsx b/client/src/pages/learn.tsx index b5345639891..0ae210ae9fd 100644 --- a/client/src/pages/learn.tsx +++ b/client/src/pages/learn.tsx @@ -11,6 +11,7 @@ import Intro from '../components/Intro'; import Map from '../components/Map'; import { Spacer } from '../components/helpers'; import LearnLayout from '../components/layouts/learn'; +import { defaultDonation } from '../../../config/donation-settings'; import { isSignedInSelector, userSelector, @@ -82,11 +83,10 @@ function LearnPage({ const onDonationAlertClick = () => { executeGA({ - type: 'event', - data: { - category: 'Donation Related', - action: `learn donation alert click` - } + event: 'donationrelated', + action: `Learn Donation Alert Click`, + duration: defaultDonation.donationDuration, + amount: defaultDonation.donationAmount }); }; return ( diff --git a/client/src/redux/action-types.js b/client/src/redux/action-types.js index 1b487225651..7aa77c37257 100644 --- a/client/src/redux/action-types.js +++ b/client/src/redux/action-types.js @@ -23,7 +23,6 @@ export const actionTypes = createTypes( 'showCodeAlly', 'submitComplete', 'updateComplete', - 'updateCurrentChallengeId', 'updateFailed', 'updateDonationFormState', 'updateUserToken', diff --git a/client/src/redux/actions.js b/client/src/redux/actions.js index 47a3d923eed..43c1d3923b9 100644 --- a/client/src/redux/actions.js +++ b/client/src/redux/actions.js @@ -90,9 +90,5 @@ export const hideCodeAlly = createAction(actionTypes.hideCodeAlly); export const showCodeAlly = createAction(actionTypes.showCodeAlly); export const tryToShowCodeAlly = createAction(actionTypes.tryToShowCodeAlly); -export const updateCurrentChallengeId = createAction( - actionTypes.updateCurrentChallengeId -); - export const closeSignoutModal = createAction(actionTypes.closeSignoutModal); export const openSignoutModal = createAction(actionTypes.openSignoutModal); diff --git a/client/src/redux/donation-saga.js b/client/src/redux/donation-saga.js index 564698bccea..245f3cf7940 100644 --- a/client/src/redux/donation-saga.js +++ b/client/src/redux/donation-saga.js @@ -103,16 +103,13 @@ export function* postChargeSaga({ } yield put( executeGA({ - type: 'event', - data: { - category: - paymentProvider === PaymentProvider.Patreon - ? 'Donation Related' - : 'Donation', - action: stringifyDonationEvents(paymentContext, paymentProvider), - label: duration, - value: amount - } + event: + paymentProvider === PaymentProvider.Patreon + ? 'donationrelated' + : 'donation', + action: stringifyDonationEvents(paymentContext, paymentProvider), + duration, + amount }) ); } catch (error) { diff --git a/client/src/redux/donation-saga.test.js b/client/src/redux/donation-saga.test.js index c093a432845..d7fa3de10a6 100644 --- a/client/src/redux/donation-saga.test.js +++ b/client/src/redux/donation-saga.test.js @@ -22,13 +22,10 @@ const postChargeDataMock = { }; const analyticsDataMock = { - type: 'event', - data: { - category: 'Donation', - action: 'Donate Page Stripe Payment Submission', - label: 'monthly', - value: '500' - } + event: 'donation', + action: 'Donate Page Stripe Payment Submission', + duration: 'monthly', + amount: '500' }; describe('donation-saga', () => { @@ -48,7 +45,7 @@ describe('donation-saga', () => { }; const stripeCardAnalyticsDataMock = analyticsDataMock; - stripeCardAnalyticsDataMock.data.action = + stripeCardAnalyticsDataMock.action = 'Donate Page Stripe Card Payment Submission'; const { paymentMethodId, amount, duration } = stripeCardDataMock.payload; @@ -68,8 +65,7 @@ describe('donation-saga', () => { }; const paypalAnalyticsDataMock = analyticsDataMock; - paypalAnalyticsDataMock.data.action = - 'Donate Page Paypal Payment Submission'; + paypalAnalyticsDataMock.action = 'Donate Page Paypal Payment Submission'; const storeMock = { app: { @@ -94,8 +90,7 @@ describe('donation-saga', () => { }; const paypalAnalyticsDataMock = analyticsDataMock; - paypalAnalyticsDataMock.data.action = - 'Donate Page Paypal Payment Submission'; + paypalAnalyticsDataMock.action = 'Donate Page Paypal Payment Submission'; const storeMock = { app: {} @@ -117,9 +112,8 @@ describe('donation-saga', () => { }; const patreonAnalyticsDataMock = analyticsDataMock; - patreonAnalyticsDataMock.data.action = - 'Donate Page Patreon Payment Redirection'; - patreonAnalyticsDataMock.data.category = 'Donation Related'; + patreonAnalyticsDataMock.action = 'Donate Page Patreon Payment Redirection'; + patreonAnalyticsDataMock.event = 'donationrelated'; return expectSaga(postChargeSaga, patreonDataMock) .not.call.fn(addDonation) .not.call.fn(postChargeStripeCard) diff --git a/client/src/redux/fetch-user-saga.js b/client/src/redux/fetch-user-saga.js index 6e9dadac818..20b4d65ddae 100644 --- a/client/src/redux/fetch-user-saga.js +++ b/client/src/redux/fetch-user-saga.js @@ -1,5 +1,5 @@ import { call, put, takeEvery } from 'redux-saga/effects'; - +import store from 'store'; import { getSessionUser, getUserProfile } from '../utils/ajax'; import { fetchProfileForUserComplete, @@ -19,6 +19,13 @@ function* fetchSessionUser() { data: { user = {}, result = '', sessionMeta = {} } } = yield call(getSessionUser); const appUser = user[result] || {}; + + const [userId] = Object.keys(user); + + const sound = user[userId].sound; + + store.set('fcc-sound', sound); + yield put( fetchUserComplete({ user: appUser, username: result, sessionMeta }) ); diff --git a/client/src/redux/ga-saga.js b/client/src/redux/ga-saga.js index 9b94094a516..98ef478479e 100644 --- a/client/src/redux/ga-saga.js +++ b/client/src/redux/ga-saga.js @@ -1,57 +1,34 @@ -/* eslint-disable camelcase */ -import { all, call, select, takeEvery } from 'redux-saga/effects'; +import { all, call, takeEvery } from 'redux-saga/effects'; +import TagManager from '../analytics'; -import { aBTestConfig } from '../../../config/donation-settings'; -import ga from '../analytics'; -import { emailToABVariant } from '../utils/A-B-tester'; -import { - completedChallengesSelector, - completionCountSelector, - emailSelector, - recentlyClaimedBlockSelector -} from './selectors'; - -const GaTypes = { event: ga.event, page: ga.pageview, modal: ga.modalview }; - -function* callGaType({ payload: { type, data } }) { - if ( - type === 'event' && - data.category.toLowerCase().includes('donation') && - aBTestConfig.isTesting - ) { - const email = yield select(emailSelector); - - // a b test results are only reported when user is signed in and has email - if (email) { - const completedChallengeTotal = yield select(completedChallengesSelector); - const completedChallengeSession = yield select(completionCountSelector); - let viewType = null; - - // set the modal type - if (data.action.toLowerCase().includes('modal')) { - const recentlyClaimedBlock = yield select(recentlyClaimedBlockSelector); - viewType = recentlyClaimedBlock ? 'block' : 'progress'; +function* callGaType({ + payload: { action, duration, amount, event, pagePath } +}) { + if (event === 'pageview') { + yield call(TagManager.dataLayer, { + dataLayer: { + event, + pagePath } - - const customDimensions = { - // URL; - dimension1: window.location.href, - // Challenges_Completed_Session - dimension2: completedChallengeSession, - // Challenges_Completed_Total - dimension3: completedChallengeTotal.length, - // Test_Type - dimension4: aBTestConfig.type, - // Test_Variation - dimension5: emailToABVariant(email).isVariantA ? 'A' : 'B', - // View_Type - dimension6: viewType - }; - ga.set(customDimensions); - } + }); + } else if (event === 'donationview') { + yield call(TagManager.dataLayer, { + dataLayer: { + event, + action + } + }); + } else { + // donation and donationrelated + yield call(TagManager.dataLayer, { + dataLayer: { + event, + action, + duration, + amount + } + }); } - - yield call(GaTypes[type], data); } export function* createGaSaga(types) { diff --git a/client/src/redux/ga-saga.test.js b/client/src/redux/ga-saga.test.js index 47c7026caa1..7911349727e 100644 --- a/client/src/redux/ga-saga.test.js +++ b/client/src/redux/ga-saga.test.js @@ -1,24 +1,21 @@ import { expectSaga } from 'redux-saga-test-plan'; -import ga from '../analytics'; +import TagManager from '../analytics'; import { actionTypes } from './action-types'; import { createGaSaga } from './ga-saga'; - jest.mock('../analytics'); describe('ga-saga', () => { it('calls GA after executeGA action', () => { - const GaTypes = { event: ga.event, page: ga.pageview, modal: ga.modalview }; const mockEventPayload = { - type: 'event', - data: { - category: 'Map Challenge Click', - action: '/learn' - } + action: 'Learn Donation Alert Click', + amount: 500, + duration: 'month', + event: 'donationrelated' }; return ( expectSaga(createGaSaga, actionTypes) // Assert that the `call` with expected paramater will eventually happen. - .call(GaTypes.event, mockEventPayload.data) + .call(TagManager.dataLayer, { dataLayer: mockEventPayload }) // Dispatch any actions that the saga will `take`. .dispatch({ type: actionTypes.executeGA, payload: mockEventPayload }) diff --git a/client/src/redux/index.js b/client/src/redux/index.js index b520e2c03c9..9dbaf84a81e 100644 --- a/client/src/redux/index.js +++ b/client/src/redux/index.js @@ -23,7 +23,7 @@ import { createShowCertSaga } from './show-cert-saga'; import updateCompleteEpic from './update-complete-epic'; import { createUserTokenSaga } from './user-token-saga'; -export const defaultFetchState = { +const defaultFetchState = { pending: true, complete: false, errored: false, @@ -41,7 +41,7 @@ export const defaultDonationFormState = { } }; -export const initialState = { +const initialState = { appUsername: '', recentlyClaimedBlock: null, canRequestProgressDonation: true, diff --git a/client/src/redux/prop-types.ts b/client/src/redux/prop-types.ts index aed72b85469..d1c9565fe2c 100644 --- a/client/src/redux/prop-types.ts +++ b/client/src/redux/prop-types.ts @@ -1,78 +1,8 @@ -import PropTypes from 'prop-types'; import { HandlerProps } from 'react-reflex'; import { SuperBlocks } from '../../../config/certification-settings'; import { Themes } from '../components/settings/theme'; import { certMap } from '../resources/cert-and-project-map'; -export const UserPropType = PropTypes.shape({ - about: PropTypes.string, - completedChallenges: PropTypes.arrayOf( - PropTypes.shape({ - id: PropTypes.string, - solution: PropTypes.string, - githubLink: PropTypes.string, - challengeType: PropTypes.number, - completedDate: PropTypes.number, - challengeFiles: PropTypes.array - }) - ), - email: PropTypes.string, - githubProfile: PropTypes.string, - is2018DataVisCert: PropTypes.bool, - isApisMicroservicesCert: PropTypes.bool, - isBackEndCert: PropTypes.bool, - isDataVisCert: PropTypes.bool, - isEmailVerified: PropTypes.bool, - isFrontEndCert: PropTypes.bool, - isFrontEndLibsCert: PropTypes.bool, - isFullStackCert: PropTypes.bool, - isHonest: PropTypes.bool, - isInfosecQaCert: PropTypes.bool, - isQaCertV7: PropTypes.bool, - isInfosecCertV7: PropTypes.bool, - isJsAlgoDataStructCert: PropTypes.bool, - isRelationalDatabaseCertV8: PropTypes.bool, - isRespWebDesignCert: PropTypes.bool, - isSciCompPyCertV7: PropTypes.bool, - isDataAnalysisPyCertV7: PropTypes.bool, - isMachineLearningPyCertV7: PropTypes.bool, - linkedin: PropTypes.string, - location: PropTypes.string, - name: PropTypes.string, - picture: PropTypes.string, - points: PropTypes.number, - portfolio: PropTypes.arrayOf( - PropTypes.shape({ - id: PropTypes.string.isRequired, - title: PropTypes.string, - url: PropTypes.string, - image: PropTypes.string, - description: PropTypes.string - }) - ), - savedChallenges: PropTypes.arrayOf( - PropTypes.shape({ - id: PropTypes.string, - challengeFiles: PropTypes.array - }) - ), - sendQuincyEmail: PropTypes.bool, - sound: PropTypes.bool, - theme: PropTypes.string, - keyboardShortcuts: PropTypes.bool, - twitter: PropTypes.string, - username: PropTypes.string, - website: PropTypes.string -}); - -export const CurrentCertsPropType = PropTypes.arrayOf( - PropTypes.shape({ - show: PropTypes.bool, - title: PropTypes.string, - certSlug: PropTypes.string - }) -); - export type Steps = { isHonest?: boolean; currentCerts?: Array; @@ -96,7 +26,7 @@ export type MarkdownRemark = { superBlock: SuperBlocks; // TODO: make enum like superBlock certification: string; - title: typeof certMap[number]['title']; + title: (typeof certMap)[number]['title']; }; headings: [ { @@ -117,7 +47,11 @@ export type MarkdownRemark = { }; }; -type Question = { text: string; answers: string[]; solution: number }; +type Question = { + text: string; + answers: string[]; + solution: number; +}; type Fields = { slug: string; blockName: string; tests: Test[] }; type Required = { link: string; @@ -185,6 +119,7 @@ export type ChallengeNode = { isPrivate: boolean; order: number; question: Question; + assignments: string[]; required: Required[]; solutions: { [T in FileKey]: FileKeyChallenge; diff --git a/client/src/redux/save-challenge-saga.js b/client/src/redux/save-challenge-saga.js index be0ad140992..4c109abe4e7 100644 --- a/client/src/redux/save-challenge-saga.js +++ b/client/src/redux/save-challenge-saga.js @@ -17,7 +17,7 @@ import { import { saveChallengeComplete } from './actions'; import { savedChallengesSelector } from './selectors'; -export function* saveChallengeSaga() { +function* saveChallengeSaga() { const { id, challengeType } = yield select(challengeMetaSelector); const { challengeFiles } = yield select(challengeDataSelector); const savedChallenges = yield select(savedChallengesSelector); diff --git a/client/src/redux/selectors.js b/client/src/redux/selectors.js index e9a561d6067..9faca5b8eab 100644 --- a/client/src/redux/selectors.js +++ b/client/src/redux/selectors.js @@ -1,5 +1,4 @@ import { SuperBlocks } from '../../../config/certification-settings'; -import { emailToABVariant } from '../utils/A-B-tester'; import { ns as MainApp } from './action-types'; export const savedChallengesSelector = state => @@ -13,13 +12,7 @@ export const currentChallengeIdSelector = state => state[MainApp].currentChallengeId; export const emailSelector = state => userSelector(state).email; -export const isVariantASelector = state => { - const email = emailSelector(state); - // if the user is not signed in and the user info is not available. - // always return A the control variant - if (!email) return true; - return emailToABVariant(email).isVariantA; -}; + export const isDonatingSelector = state => userSelector(state).isDonating; export const isOnlineSelector = state => state[MainApp].isOnline; export const isServerOnlineSelector = state => state[MainApp].isServerOnline; @@ -217,5 +210,3 @@ export const userSelector = state => { return state[MainApp].user[username] || {}; }; - -export const sessionMetaSelector = state => state[MainApp].sessionMeta; diff --git a/client/src/redux/types.ts b/client/src/redux/types.ts index 0c56a1c4bd0..0288b1363b5 100644 --- a/client/src/redux/types.ts +++ b/client/src/redux/types.ts @@ -49,17 +49,3 @@ interface DefaultDonationFormState { success: boolean; error: null | string; } - -export const defaultFetchState = { - pending: true, - complete: false, - errored: false, - error: null -}; - -export const defaultDonationFormState = { - redirecting: false, - processing: false, - success: false, - error: '' -}; diff --git a/client/src/resources/cert-and-project-map.ts b/client/src/resources/cert-and-project-map.ts index 4e24655923a..a2f1772e698 100644 --- a/client/src/resources/cert-and-project-map.ts +++ b/client/src/resources/cert-and-project-map.ts @@ -727,7 +727,7 @@ function getJavaScriptAlgoPath(project: string) { } const titles = certMap.map(({ title }) => title); -type Title = typeof titles[number]; +type Title = (typeof titles)[number]; const legacyProjectMap: Partial> = {}; const projectMap: Partial> = {}; diff --git a/client/src/templates/Challenges/classic/editor.tsx b/client/src/templates/Challenges/classic/editor.tsx index e2e0c4ab33d..e3d63e528f0 100644 --- a/client/src/templates/Challenges/classic/editor.tsx +++ b/client/src/templates/Challenges/classic/editor.tsx @@ -1203,10 +1203,15 @@ const Editor = (props: EditorProps): JSX.Element => { }); } - const { theme } = props; - const editorTheme = theme === Themes.Night ? 'vs-dark-custom' : 'vs-custom'; + const { isSignedIn, theme } = props; + const preferDarkScheme = window.matchMedia( + '(prefers-color-scheme: dark)' + ).matches; + const isDarkTheme = + theme === Themes.Night || (preferDarkScheme && !isSignedIn); + const editorTheme = isDarkTheme ? 'vs-dark-custom' : 'vs-custom'; return ( - }> + }> )} void; - executeGA: (attributes: { type: string; data: string }) => void; + executeGA: (attributes: { event: string; pagePath: string }) => void; isOpen?: boolean; t: (attribute: string) => string; videoUrl?: string; @@ -28,7 +28,7 @@ const mapDispatchToProps = (dispatch: Dispatch) => dispatch ); -export function VideoModal({ +function VideoModal({ closeVideoModal, executeGA, isOpen, @@ -36,7 +36,7 @@ export function VideoModal({ videoUrl }: VideoModalProps): JSX.Element { if (isOpen) { - executeGA({ type: 'modal', data: '/completion-modal' }); + executeGA({ event: 'pageview', pagePath: '/completion-modal' }); } return ( diff --git a/client/src/templates/Challenges/odin/Show.tsx b/client/src/templates/Challenges/odin/Show.tsx new file mode 100644 index 00000000000..a57cd86fac2 --- /dev/null +++ b/client/src/templates/Challenges/odin/Show.tsx @@ -0,0 +1,427 @@ +// Package Utilities +import { Button, Grid, Col, Row } from '@freecodecamp/react-bootstrap'; +import { graphql } from 'gatsby'; +import React, { Component } from 'react'; +import Helmet from 'react-helmet'; +import { ObserveKeys } from 'react-hotkeys'; +import { TFunction, withTranslation } from 'react-i18next'; +import { connect } from 'react-redux'; +import { bindActionCreators } from 'redux'; +import type { Dispatch } from 'redux'; +import { createSelector } from 'reselect'; + +// Local Utilities +import Loader from '../../../components/helpers/loader'; +import Spacer from '../../../components/helpers/spacer'; +import LearnLayout from '../../../components/layouts/learn'; +import { ChallengeNode, ChallengeMeta } from '../../../redux/prop-types'; +import Hotkeys from '../components/Hotkeys'; +import VideoPlayer from '../components/VideoPlayer'; +import ChallengeTitle from '../components/challenge-title'; +import CompletionModal from '../components/completion-modal'; +import PrismFormatted from '../components/prism-formatted'; +import { + challengeMounted, + updateChallengeMeta, + openModal, + updateSolutionFormValues +} from '../redux/actions'; +import { isChallengeCompletedSelector } from '../redux/selectors'; + +// Styles +import './show.css'; +import '../video.css'; + +// Redux Setup +const mapStateToProps = createSelector( + isChallengeCompletedSelector, + (isChallengeCompleted: boolean) => ({ + isChallengeCompleted + }) +); +const mapDispatchToProps = (dispatch: Dispatch) => + bindActionCreators( + { + updateChallengeMeta, + challengeMounted, + updateSolutionFormValues, + openCompletionModal: () => openModal('completion') + }, + dispatch + ); + +// Types +interface ShowOdinProps { + challengeMounted: (arg0: string) => void; + data: { challengeNode: ChallengeNode }; + description: string; + isChallengeCompleted: boolean; + openCompletionModal: () => void; + pageContext: { + challengeMeta: ChallengeMeta; + }; + t: TFunction; + updateChallengeMeta: (arg0: ChallengeMeta) => void; + updateSolutionFormValues: () => void; +} + +interface ShowOdinState { + subtitles: string; + downloadURL: string | null; + selectedOption: number | null; + answer: number; + isWrongAnswer: boolean; + assignmentsCompleted: number; + allAssignmentsCompleted: boolean; + videoIsLoaded: boolean; +} + +// Component +class ShowOdin extends Component { + static displayName: string; + private _container: HTMLElement | null | undefined; + + constructor(props: ShowOdinProps) { + super(props); + this.state = { + subtitles: '', + downloadURL: null, + selectedOption: null, + answer: 1, + isWrongAnswer: false, + assignmentsCompleted: 0, + allAssignmentsCompleted: false, + videoIsLoaded: false + }; + + this.handleSubmit = this.handleSubmit.bind(this); + } + + componentDidMount(): void { + const { + challengeMounted, + data: { + challengeNode: { + challenge: { title, challengeType, helpCategory } + } + }, + pageContext: { challengeMeta }, + updateChallengeMeta + } = this.props; + updateChallengeMeta({ + ...challengeMeta, + title, + challengeType, + helpCategory + }); + challengeMounted(challengeMeta.id); + this._container?.focus(); + } + + componentDidUpdate(prevProps: ShowOdinProps): void { + const { + data: { + challengeNode: { + challenge: { title: prevTitle } + } + } + } = prevProps; + const { + challengeMounted, + data: { + challengeNode: { + challenge: { title: currentTitle, challengeType, helpCategory } + } + }, + pageContext: { challengeMeta }, + updateChallengeMeta + } = this.props; + if (prevTitle !== currentTitle) { + updateChallengeMeta({ + ...challengeMeta, + title: currentTitle, + challengeType, + helpCategory + }); + challengeMounted(challengeMeta.id); + } + } + + handleSubmit( + solution: number, + openCompletionModal: () => void, + assignments: string[] + ) { + const hasAssignments = assignments[0] != ''; + const completed = this.state.allAssignmentsCompleted; + const isCorrect = solution - 1 === this.state.selectedOption; + + if (isCorrect) { + this.setState({ + isWrongAnswer: false + }); + if (!hasAssignments || completed) openCompletionModal(); + } else { + this.setState({ + isWrongAnswer: true + }); + } + } + + handleOptionChange = ( + changeEvent: React.ChangeEvent + ): void => { + this.setState({ + isWrongAnswer: false, + selectedOption: parseInt(changeEvent.target.value, 10) + }); + }; + + handleAssignmentChange = ( + event: React.ChangeEvent, + totalAssignments: number + ): void => { + const assignmentsCompleted = event.target.checked + ? this.state.assignmentsCompleted + 1 + : this.state.assignmentsCompleted - 1; + const allAssignmentsCompleted = totalAssignments === assignmentsCompleted; + + this.setState({ + assignmentsCompleted, + allAssignmentsCompleted + }); + }; + + onVideoLoad = () => { + this.setState({ + videoIsLoaded: true + }); + }; + + render() { + const { + data: { + challengeNode: { + challenge: { + fields: { blockName }, + title, + description, + superBlock, + certification, + block, + translationPending, + videoId, + videoLocaleIds, + bilibiliIds, + question: { text, answers, solution }, + assignments + } + } + }, + openCompletionModal, + pageContext: { + challengeMeta: { nextChallengePath, prevChallengePath } + }, + t, + isChallengeCompleted + } = this.props; + + const blockNameTitle = `${t( + `intro:${superBlock}.blocks.${block}.title` + )} - ${title}`; + return ( + { + this.handleSubmit(solution, openCompletionModal, assignments); + }} + innerRef={(c: HTMLElement | null) => (this._container = c)} + nextChallengePath={nextChallengePath} + prevChallengePath={prevChallengePath} + > + + + + + + + {title} + + + +
+ {!this.state.videoIsLoaded ? ( +
+ +
+ ) : null} + +
+ + +

{title}

+ + + + {assignments[0] != '' && ( + <> +

Assignments

+
+ {assignments.map((assignment, index) => ( + + ))} +
{' '} + + )} + +

Question

+ +
+ {answers.map((option, index) => ( + + ))} +
+
+ +
+ {this.state.isWrongAnswer && ( + {t('learn.wrong-answer')} + )} + {!this.state.allAssignmentsCompleted && + assignments.length > 0 && ( + <> +
+ {t('learn.assignment-not-complete')} + + )} +
+ + + + + +
+
+
+
+ ); + } +} + +ShowOdin.displayName = 'ShowOdin'; + +export default connect( + mapStateToProps, + mapDispatchToProps +)(withTranslation()(ShowOdin)); + +export const query = graphql` + query TheOdinProject($slug: String!) { + challengeNode(challenge: { fields: { slug: { eq: $slug } } }) { + challenge { + videoId + videoLocaleIds { + espanol + italian + portuguese + } + bilibiliIds { + aid + bvid + cid + } + title + description + challengeType + helpCategory + superBlock + certification + block + fields { + blockName + slug + } + question { + text + answers + solution + } + translationPending + assignments + } + } + } +`; diff --git a/client/src/templates/Challenges/odin/show.css b/client/src/templates/Challenges/odin/show.css new file mode 100644 index 00000000000..c0357a51862 --- /dev/null +++ b/client/src/templates/Challenges/odin/show.css @@ -0,0 +1,28 @@ +input[type='checkbox'] { + display: grid; + place-content: center; + -webkit-appearance: none; + appearance: none; + background-color: #fff; + min-width: 1.15em; + min-height: 1.15em; + max-width: 1.15em; + max-height: 1.15em; + margin-right: 15px; + border: 2px solid black; + border-radius: 0.15em; + transform: translateY(-0.075em); +} + +input[type='checkbox']::before { + content: ''; + width: 0.65em; + height: 0.65em; + transform: scale(0); + transition: 120ms transform ease-in-out; + box-shadow: inset 1em 1em black; +} + +input[type='checkbox']:checked::before { + transform: scale(1); +} diff --git a/client/src/templates/Challenges/projects/tool-panel.tsx b/client/src/templates/Challenges/projects/tool-panel.tsx index 7cb402a04e5..46a1e3cb820 100644 --- a/client/src/templates/Challenges/projects/tool-panel.tsx +++ b/client/src/templates/Challenges/projects/tool-panel.tsx @@ -24,7 +24,7 @@ interface ToolPanelProps { t: TFunction; } -export function ToolPanel({ +function ToolPanel({ guideUrl, openHelpModal, t diff --git a/client/src/templates/Challenges/rechallenge/transformers.js b/client/src/templates/Challenges/rechallenge/transformers.js index 4abd8943a2e..ddc5ba1f7c1 100644 --- a/client/src/templates/Challenges/rechallenge/transformers.js +++ b/client/src/templates/Challenges/rechallenge/transformers.js @@ -99,9 +99,8 @@ const testJS = matchesProperty('ext', 'js'); const testJSX = matchesProperty('ext', 'jsx'); const testHTML = matchesProperty('ext', 'html'); const testHTML$JS$JSX = overSome(testHTML, testJS, testJSX); -export const testJS$JSX = overSome(testJS, testJSX); -export const replaceNBSP = cond([ +const replaceNBSP = cond([ [ testHTML$JS$JSX, partial(transformContents, contents => contents.replace(NBSPReg, ' ')) diff --git a/client/src/templates/Challenges/redux/action-types.js b/client/src/templates/Challenges/redux/action-types.js index caa4b98f5a0..9e2137bab75 100644 --- a/client/src/templates/Challenges/redux/action-types.js +++ b/client/src/templates/Challenges/redux/action-types.js @@ -14,7 +14,6 @@ export const actionTypes = createTypes( 'updateConsole', 'updateChallengeMeta', 'updateFile', - 'updateJSEnabled', 'updateSolutionFormValues', 'updateSuccessMessage', 'updateTests', diff --git a/client/src/templates/Challenges/redux/actions.js b/client/src/templates/Challenges/redux/actions.js index 5a488306546..8c8577dd8a6 100644 --- a/client/src/templates/Challenges/redux/actions.js +++ b/client/src/templates/Challenges/redux/actions.js @@ -31,7 +31,6 @@ export const updateChallengeMeta = createAction( export const updateFile = createAction(actionTypes.updateFile); export const updateConsole = createAction(actionTypes.updateConsole); export const updateLogs = createAction(actionTypes.updateLogs); -export const updateJSEnabled = createAction(actionTypes.updateJSEnabled); export const updateSolutionFormValues = createAction( actionTypes.updateSolutionFormValues ); diff --git a/client/src/templates/Challenges/redux/completion-epic.js b/client/src/templates/Challenges/redux/completion-epic.js index 337cd9f96e7..c9314cf09a0 100644 --- a/client/src/templates/Challenges/redux/completion-epic.js +++ b/client/src/templates/Challenges/redux/completion-epic.js @@ -62,6 +62,7 @@ function submitModern(type, state) { const tests = challengeTestsSelector(state); if ( challengeType === 11 || + challengeType === 15 || (tests.length > 0 && tests.every(test => test.pass && !test.err)) ) { if (type === actionTypes.checkChallenge) { diff --git a/client/src/templates/Challenges/redux/current-challenge-saga.js b/client/src/templates/Challenges/redux/current-challenge-saga.js index eb78a2f09f4..9e07be593b7 100644 --- a/client/src/templates/Challenges/redux/current-challenge-saga.js +++ b/client/src/templates/Challenges/redux/current-challenge-saga.js @@ -5,7 +5,7 @@ import { randomCompliment } from '../../../utils/get-words'; import { CURRENT_CHALLENGE_KEY } from './action-types'; import { updateSuccessMessage } from './actions'; -export function* currentChallengeSaga({ payload: id }) { +function* currentChallengeSaga({ payload: id }) { yield store.set(CURRENT_CHALLENGE_KEY, id); // // Temporarily removed to reduce calls to database // // will need to re-import things at the top @@ -26,7 +26,7 @@ export function* currentChallengeSaga({ payload: id }) { // } } -export function* updateSuccessMessageSaga() { +function* updateSuccessMessageSaga() { yield put(updateSuccessMessage(randomCompliment())); } diff --git a/client/src/templates/Challenges/redux/execute-challenge-saga.js b/client/src/templates/Challenges/redux/execute-challenge-saga.js index 4f009dd991d..f7449133fdb 100644 --- a/client/src/templates/Challenges/redux/execute-challenge-saga.js +++ b/client/src/templates/Challenges/redux/execute-challenge-saga.js @@ -57,7 +57,7 @@ import { const previewTimeout = 2500; // when 'run tests' is clicked, do this first -export function* executeCancellableChallengeSaga(payload) { +function* executeCancellableChallengeSaga(payload) { const { challengeType, id } = yield select(challengeMetaSelector); const { challengeFiles } = yield select(challengeDataSelector); @@ -84,7 +84,7 @@ export function* executeCancellableChallengeSaga(payload) { yield cancel(task); } -export function* executeChallengeSaga({ payload }) { +function* executeChallengeSaga({ payload }) { const isBuildEnabled = yield select(isBuildEnabledSelector); if (!isBuildEnabled) { return; diff --git a/client/src/templates/Challenges/redux/selectors.js b/client/src/templates/Challenges/redux/selectors.js index a5f9296223b..12d30ff54b4 100644 --- a/client/src/templates/Challenges/redux/selectors.js +++ b/client/src/templates/Challenges/redux/selectors.js @@ -2,7 +2,6 @@ import { challengeTypes } from '../../../../utils/challenge-types'; import { completedChallengesSelector } from '../../../redux/selectors'; import { ns } from './action-types'; -export const currentTabSelector = state => state[ns].currentTab; export const challengeFilesSelector = state => state[ns].challengeFiles; export const challengeMetaSelector = state => state[ns].challengeMeta; export const challengeTestsSelector = state => state[ns].challengeTests; diff --git a/client/src/templates/Challenges/utils/build.ts b/client/src/templates/Challenges/utils/build.ts index b902c8b635d..81d04296ab2 100644 --- a/client/src/templates/Challenges/utils/build.ts +++ b/client/src/templates/Challenges/utils/build.ts @@ -250,7 +250,7 @@ export function buildJSChallenge( } } -export function buildBackendChallenge({ url }: BuildChallengeData) { +function buildBackendChallenge({ url }: BuildChallengeData) { return { challengeType: challengeTypes.backend, build: concatHtml({ required: frameRunner }), diff --git a/client/src/templates/Challenges/video/show.css b/client/src/templates/Challenges/video.css similarity index 100% rename from client/src/templates/Challenges/video/show.css rename to client/src/templates/Challenges/video.css diff --git a/client/src/templates/Challenges/video/Show.tsx b/client/src/templates/Challenges/video/Show.tsx index 0f2d866c62a..db5cc4bbffb 100644 --- a/client/src/templates/Challenges/video/Show.tsx +++ b/client/src/templates/Challenges/video/Show.tsx @@ -30,7 +30,7 @@ import { import { isChallengeCompletedSelector } from '../redux/selectors'; // Styles -import './show.css'; +import '../video.css'; // Redux Setup const mapStateToProps = createSelector( diff --git a/client/src/templates/Introduction/components/block.tsx b/client/src/templates/Introduction/components/block.tsx index 30e4501ceb1..b1649130bd4 100644 --- a/client/src/templates/Introduction/components/block.tsx +++ b/client/src/templates/Introduction/components/block.tsx @@ -13,7 +13,6 @@ import DropDown from '../../../assets/icons/dropdown'; import GreenNotCompleted from '../../../assets/icons/green-not-completed'; import GreenPass from '../../../assets/icons/green-pass'; import { Link, Spacer } from '../../../components/helpers'; -import { executeGA } from '../../../redux/actions'; import { completedChallengesSelector } from '../../../redux/selectors'; import { ChallengeNode, CompletedChallenge } from '../../../redux/prop-types'; import { playTone } from '../../../utils/tone'; @@ -45,20 +44,18 @@ const mapStateToProps = ( }; const mapDispatchToProps = (dispatch: Dispatch) => - bindActionCreators({ toggleBlock, executeGA }, dispatch); + bindActionCreators({ toggleBlock }, dispatch); interface BlockProps { blockDashedName: string; challenges: ChallengeNode[]; completedChallengeIds: string[]; - executeGA: typeof executeGA; isExpanded: boolean; superBlock: SuperBlocks; t: TFunction; toggleBlock: typeof toggleBlock; } - -export class Block extends Component { +class Block extends Component { static displayName: string; constructor(props: BlockProps) { super(props); @@ -67,15 +64,8 @@ export class Block extends Component { } handleBlockClick(): void { - const { blockDashedName, toggleBlock, executeGA } = this.props; + const { blockDashedName, toggleBlock } = this.props; void playTone('block-toggle'); - executeGA({ - type: 'event', - data: { - category: 'Map Block Click', - action: blockDashedName - } - }); toggleBlock(blockDashedName); } diff --git a/client/src/templates/Introduction/components/cert-challenge.tsx b/client/src/templates/Introduction/components/cert-challenge.tsx index 58f57e949ef..ab5445713c6 100644 --- a/client/src/templates/Introduction/components/cert-challenge.tsx +++ b/client/src/templates/Introduction/components/cert-challenge.tsx @@ -34,7 +34,7 @@ interface CertChallengeProps { currentCerts: Steps['currentCerts']; superBlock: SuperBlocks; t: TFunction; - title: typeof certMap[number]['title']; + title: (typeof certMap)[number]['title']; user: User; verifyCert: typeof verifyCert; } @@ -130,7 +130,8 @@ const CertChallenge = ({ > {isCertified && userLoaded ? t('buttons.show-cert') - : t('buttons.go-to-settings')} + : t('buttons.go-to-settings')}{' '} + {title} )}
@@ -139,8 +140,6 @@ const CertChallenge = ({ CertChallenge.displayName = 'CertChallenge'; -export { CertChallenge }; - export default connect( mapStateToProps, mapDispatchToProps diff --git a/client/src/templates/Introduction/components/challenges.tsx b/client/src/templates/Introduction/components/challenges.tsx index 6686cf863f7..0e28ae01529 100644 --- a/client/src/templates/Introduction/components/challenges.tsx +++ b/client/src/templates/Introduction/components/challenges.tsx @@ -9,7 +9,6 @@ import GreenNotCompleted from '../../../assets/icons/green-not-completed'; import GreenPass from '../../../assets/icons/green-pass'; import { executeGA } from '../../../redux/actions'; import { SuperBlocks } from '../../../../../config/certification-settings'; -import { ExecuteGaArg } from '../../../pages/donate'; import { ChallengeWithCompletedNode } from '../../../redux/prop-types'; import { isNewJsCert, isNewRespCert } from '../../../utils/is-a-cert'; @@ -18,7 +17,6 @@ const mapDispatchToProps = (dispatch: Dispatch) => interface Challenges { challengesWithCompleted: ChallengeWithCompletedNode[]; - executeGA: (payload: ExecuteGaArg) => void; isProjectBlock: boolean; superBlock: SuperBlocks; blockTitle?: string | null; @@ -26,20 +24,11 @@ interface Challenges { function Challenges({ challengesWithCompleted, - executeGA, isProjectBlock, superBlock, blockTitle }: Challenges): JSX.Element { const { t } = useTranslation(); - const handleChallengeClick = (slug: string) => - executeGA({ - type: 'event', - data: { - category: 'Map Challenge Click', - action: slug - } - }); const renderCheckMark = (isCompleted: boolean) => isCompleted ? : ; @@ -60,9 +49,6 @@ function Challenges({
- handleChallengeClick(firstIncompleteChallenge.fields.slug) - } to={firstIncompleteChallenge.fields.slug} > {!isChallengeStarted @@ -88,7 +74,6 @@ function Challenges({ > {!isProjectBlock ? ( handleChallengeClick(challenge.fields.slug)} to={challenge.fields.slug} className={`map-grid-item ${ +challenge.isCompleted ? 'challenge-completed' : '' @@ -103,10 +88,7 @@ function Challenges({ ) : ( - handleChallengeClick(challenge.fields.slug)} - to={challenge.fields.slug} - > + {challenge.title} {renderCheckMark(challenge.isCompleted)} @@ -129,20 +111,14 @@ function Challenges({ key={'map-challenge' + challenge.fields.slug} > {!isProjectBlock ? ( - handleChallengeClick(challenge.fields.slug)} - to={challenge.fields.slug} - > + {renderCheckMark(challenge.isCompleted)} {challenge.title} ) : ( - handleChallengeClick(challenge.fields.slug)} - to={challenge.fields.slug} - > + {challenge.title} {renderCheckMark(challenge.isCompleted)} diff --git a/client/src/utils/A-B-tester.test.ts b/client/src/utils/A-B-tester.test.ts deleted file mode 100644 index df932ff6abd..00000000000 --- a/client/src/utils/A-B-tester.test.ts +++ /dev/null @@ -1,32 +0,0 @@ -import faker from 'faker'; -import { emailToABVariant } from './A-B-tester'; - -describe('client/src is-email-variation-a', () => { - it('Consistently returns the same result for the same input', () => { - const preSavedResult = { - hash: '23e3cacb302b0c759531faa8b414b23709c26029', - isVariantA: true, - hashInt: 2 - }; - const result = emailToABVariant('foo@freecodecamp.org'); - expect(result).toEqual(preSavedResult); - }); - it('Distributes A and B variations equaly for 100K random emails', () => { - let A = 0; - let B = 0; - const sampleSize = 100000; - faker.seed(123); - - for (let i = 0; i < sampleSize; i++) { - if (emailToABVariant(faker.internet.email()).isVariantA) A++; - else B++; - } - - const isBucketWellDistributed = (variant: number): boolean => - variant > 0.99 * (sampleSize / 2); - - expect(isBucketWellDistributed(A) && isBucketWellDistributed(B)).toEqual( - true - ); - }); -}); diff --git a/client/src/utils/A-B-tester.ts b/client/src/utils/A-B-tester.ts deleted file mode 100644 index d78141ebad8..00000000000 --- a/client/src/utils/A-B-tester.ts +++ /dev/null @@ -1,21 +0,0 @@ -import sha1 from 'sha-1'; - -// This function turns an email to a hash and decides if it should be -// an A or B variant for A/B testing - -export function emailToABVariant(email: string): { - hash: string; - isVariantA: boolean; - hashInt: number; -} { - // turn the email into a number - const hash: string = sha1(email); - const hashInt = parseInt(hash.slice(0, 1), 16); - // turn the number to A or B variant - const isVariantA = hashInt % 2 === 0; - return { - hash, - isVariantA, - hashInt - }; -} diff --git a/client/src/utils/path-parsers.ts b/client/src/utils/path-parsers.ts index 587606f409c..11f23e452db 100644 --- a/client/src/utils/path-parsers.ts +++ b/client/src/utils/path-parsers.ts @@ -31,6 +31,3 @@ export const isLocationSuperBlock = ( ): boolean => { return /^\/learn\/[\w-]+\/$/.test(location?.pathname ?? ''); }; - -const pathParsers = { isLanding, isChallenge }; -export default pathParsers; diff --git a/client/src/utils/tone/index.ts b/client/src/utils/tone/index.ts index e146073809e..103ea6c46d2 100644 --- a/client/src/utils/tone/index.ts +++ b/client/src/utils/tone/index.ts @@ -62,20 +62,16 @@ type ToneStates = keyof typeof toneUrls; export async function playTone(state: ToneStates): Promise { const playSound = !!store.get('fcc-sound'); if (playSound && toneUrls[state]) { - const tone = await import('tone'); + const Tone = await import('tone'); - if (tone.context.state !== 'running') { - tone.context.resume().catch(err => { - console.error('Error resuming audio context', err); - }); - } - const player = new tone.Player(toneUrls[state]).toDestination(); + const player = new Tone.Player(toneUrls[state]).toDestination(); const storedVolume = (store.get('soundVolume') as number) ?? 50; const calculateDecibel = -60 * (1 - storedVolume / 100); player.volume.value = calculateDecibel; - player.autostart = true; + await Tone.loaded(); + player.start(); } } diff --git a/client/utils/challenge-types.js b/client/utils/challenge-types.js index 5cbc1d59f66..d0c665e1ade 100644 --- a/client/utils/challenge-types.js +++ b/client/utils/challenge-types.js @@ -14,6 +14,7 @@ const video = 11; const codeAllyPractice = 12; const codeAllyCert = 13; const multifileCertProject = 14; +const theOdinProject = 15; // individual exports exports.backend = backend; @@ -38,7 +39,8 @@ exports.challengeTypes = { video, codeAllyPractice, codeAllyCert, - multifileCertProject + multifileCertProject, + theOdinProject }; exports.isFinalProject = challengeType => { @@ -60,12 +62,6 @@ exports.isCodeAllyPractice = challengeType => { return challengeType === codeAllyPractice; }; -// turn challengeType to file ext -exports.pathsMap = { - [html]: 'html', - [js]: 'js', - [jsProject]: 'js' -}; // determine the component view for each challenge exports.viewTypes = { [html]: 'classic', @@ -81,7 +77,8 @@ exports.viewTypes = { [video]: 'video', [codeAllyPractice]: 'codeAlly', [codeAllyCert]: 'codeAlly', - [multifileCertProject]: 'classic' + [multifileCertProject]: 'classic', + [theOdinProject]: 'odin' }; // determine the type of submit function to use for the challenge on completion @@ -103,7 +100,8 @@ exports.submitTypes = { [modern]: 'tests', [video]: 'tests', [codeAllyCert]: 'project.frontEnd', - [multifileCertProject]: 'tests' + [multifileCertProject]: 'tests', + [theOdinProject]: 'tests' }; // determine which help forum questions should be posted to diff --git a/client/utils/gatsby/challenge-page-creator.js b/client/utils/gatsby/challenge-page-creator.js index bcc334f56ec..13fdefe5116 100644 --- a/client/utils/gatsby/challenge-page-creator.js +++ b/client/utils/gatsby/challenge-page-creator.js @@ -32,13 +32,19 @@ const video = path.resolve( '../../src/templates/Challenges/video/Show.tsx' ); +const odin = path.resolve( + __dirname, + '../../src/templates/Challenges/odin/Show.tsx' +); + const views = { backend, classic, modern: classic, frontend, video, - codeAlly + codeAlly, + odin // quiz: Quiz }; diff --git a/client/utils/help-category-map.json b/client/utils/help-category-map.json index 2452d3146bb..0a7f4eac9d0 100644 --- a/client/utils/help-category-map.json +++ b/client/utils/help-category-map.json @@ -42,6 +42,7 @@ "algorithms": "JavaScript", "data-structures": "JavaScript", "take-home-projects": "JavaScript", + "the-odin-project": "JavaScript", "rosetta-code": "JavaScript", "project-euler": "JavaScript", "scientific-computing-with-python": "Python", diff --git a/config/analytics-settings.js b/config/analytics-settings.js index 106725cc3b6..68f63dba39b 100644 --- a/config/analytics-settings.js +++ b/config/analytics-settings.js @@ -1,2 +1,5 @@ -exports.prodAnalyticsId = 'UA-55446531-10'; -exports.devAnalyticsId = 'UA-55446531-19'; +exports.prodAnalyticsId = 'GTM-57R6KJM'; +exports.devAnalyticsId = 'GTM-WSS47LM'; + +// this id includes a stream for the spanish learn platform +exports.prodAnalyticsESId = 'GTM-KCS6GSD'; diff --git a/config/knip/knip.dev.json b/config/knip/knip.dev.json deleted file mode 100644 index 7970a93f047..00000000000 --- a/config/knip/knip.dev.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "client":{ - "dev": true, - "exclude": ["dependencies"], - "entryFiles": [ - "gatsby-*.js", - "src/pages/*.tsx", - "src/templates/Challenges/**/{s,S}how.tsx", - "src/templates/Introduction/**/{intro,super-block-intro}.tsx", - "src/**/*.test.{js,ts,tsx}" - ], - "projectFiles": [ - "src/**/*.{js,ts,tsx}", - "!static/misc/*.js", - "!i18n/schema-validation.ts", - "!plugins/**", - "!postcss.config.js", - "!src/client/frame-runner.ts", - "!src/client/workers/**", - "!webpack-workers.js", - "!**/i18n/config-for-tests.ts", - "!**/__mocks__/**", - "!**/__fixtures/**", - "!**/node_modules/**" - ] - } -} diff --git a/config/knip/knip.json b/config/knip/knip.json deleted file mode 100644 index cdb79eb4b6c..00000000000 --- a/config/knip/knip.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "client":{ - "exclude": ["dependencies"], - "entryFiles": [ - "gatsby-*.js", - "src/html.tsx", - "src/pages/*.tsx", - "src/templates/Challenges/**/{s,S}how.tsx", - "src/templates/Introduction/**/{intro,super-block-intro}.tsx" - ], - "projectFiles": [ - "**/*.{js,ts,tsx}", - "!static/misc/*.js", - "!i18n/schema-validation.ts", - "!plugins/**", - "!postcss.config.js", - "!src/client/frame-runner.ts", - "!src/client/workers/**", - "!webpack-workers.js", - "!**/*.test.{js,ts,tsx}", - "!**/i18n/config-for-tests.ts", - "!**/__mocks__/**", - "!**/__fixtures/**", - "!**/node_modules/**", - "!**/*.d.ts" - ] - } -} diff --git a/curriculum/challenges/_meta/learn-typography-by-building-a-nutrition-label/meta.json b/curriculum/challenges/_meta/learn-typography-by-building-a-nutrition-label/meta.json index cf0d7d963a4..a647ab21730 100644 --- a/curriculum/challenges/_meta/learn-typography-by-building-a-nutrition-label/meta.json +++ b/curriculum/challenges/_meta/learn-typography-by-building-a-nutrition-label/meta.json @@ -135,144 +135,148 @@ "Step 31" ], [ - "615f5486b8fd4b71633f69b0", + "6395d33ab5d91bf317107c48", "Step 32" ], [ - "615f575b50b91e72af079480", + "615f5486b8fd4b71633f69b0", "Step 33" ], [ - "615f5af373a68e744a3c5a76", + "6396e33fe478dd264ebbf278", "Step 34" ], [ - "615f5c1cb7575c7551ed8a40", + "615f575b50b91e72af079480", "Step 35" ], [ - "615f5fd85d0062761f288364", + "615f5af373a68e744a3c5a76", "Step 36" ], [ - "615f61338c8ca176d6445574", + "615f5fd85d0062761f288364", "Step 37" ], [ - "615f666ac5edea782feb7e75", + "615f61338c8ca176d6445574", "Step 38" ], [ - "615f671b6d1919792745aa5d", + "615f666ac5edea782feb7e75", "Step 39" ], [ - "615f6823d0815b7a991f2a75", + "615f671b6d1919792745aa5d", "Step 40" ], [ - "615f6a7d4ba8037bc086c2c7", + "635bde33c91c80540eae239b", "Step 41" ], [ - "615f6b2d164f81809efd9bdc", + "615f6823d0815b7a991f2a75", "Step 42" ], [ - "615f6cc778f7698258467596", + "615f6b2d164f81809efd9bdc", "Step 43" ], [ - "615f6fddaac1e083502d3e6a", + "615f6cc778f7698258467596", "Step 44" ], [ - "615f70077a4ff98424236c1e", + "615f6fddaac1e083502d3e6a", "Step 45" ], [ - "615f72a872354a850d4f533e", + "615f70077a4ff98424236c1e", "Step 46" ], [ - "615f74a71f1e498619e38ee8", + "615f72a872354a850d4f533e", "Step 47" ], [ - "615f7ad94380408d971d14f6", + "615f74a71f1e498619e38ee8", "Step 48" ], [ - "615f7bc680f7168ea01ebf99", + "615f7ad94380408d971d14f6", "Step 49" ], [ - "615f7c71eab8218f846e4503", + "615f7bc680f7168ea01ebf99", "Step 50" ], [ - "615f7d489a581590d1350288", + "615f7c71eab8218f846e4503", "Step 51" ], [ - "615f7de4487b64919bb4aa5e", + "615f7d489a581590d1350288", "Step 52" ], [ - "615f7e7281626a92bbd62da8", + "615f7de4487b64919bb4aa5e", "Step 53" ], [ - "615f7ecb09de9a938ef94756", + "615f7e7281626a92bbd62da8", "Step 54" ], [ - "615f7fa959ab75948f96a0d6", + "615f7ecb09de9a938ef94756", "Step 55" ], [ - "615f808d85793195b0f53be9", + "615f7fa959ab75948f96a0d6", "Step 56" ], [ - "615f829d07b18f96f6f6684b", + "615f808d85793195b0f53be9", "Step 57" ], [ - "615f83ef928ec9982b785b6a", + "615f829d07b18f96f6f6684b", "Step 58" ], [ - "615f84f246e8ba98e3cd97be", + "615f83ef928ec9982b785b6a", "Step 59" ], [ - "615f887466db4ba14b5342cc", + "615f84f246e8ba98e3cd97be", "Step 60" ], [ - "615f89e055040ba294719d2f", + "615f887466db4ba14b5342cc", "Step 61" ], [ - "615f8bfe0f30a1a3c340356b", + "615f89e055040ba294719d2f", "Step 62" ], [ - "615f8f1223601fa546e93f31", + "615f8bfe0f30a1a3c340356b", "Step 63" ], [ - "615f905fbd1017a65ca224eb", + "615f8f1223601fa546e93f31", "Step 64" ], [ - "615f94786869e1a7fec54375", + "615f905fbd1017a65ca224eb", "Step 65" ], [ - "615f951dff9317a900ef683f", + "615f94786869e1a7fec54375", "Step 66" + ], + [ + "615f951dff9317a900ef683f", + "Step 67" ] ] -} +} \ No newline at end of file diff --git a/curriculum/challenges/_meta/the-odin-project/meta.json b/curriculum/challenges/_meta/the-odin-project/meta.json new file mode 100644 index 00000000000..a3f85b99c98 --- /dev/null +++ b/curriculum/challenges/_meta/the-odin-project/meta.json @@ -0,0 +1,124 @@ +{ + "name": "The Odin Project", + "isUpcomingChange": true, + "dashedName": "the-odin-project", + "order": 5, + "time": "", + "template": "", + "required": [], + "superBlock": "coding-interview-prep", + "challengeOrder": [ + [ + "6374f208de18c50e48ba767b", + "Introduction To HTML and CSS Question A" + ], + [ + "6376327e2724a688c04636e3", + "Introduction To HTML and CSS Question B" + ], + [ + "637633162724a688c04636e4", + "Introduction To HTML and CSS Question C" + ], + [ + "637633672724a688c04636e5", + "Introduction To HTML and CSS Question D" + ], + [ + "637f4e0e72c65bc8e73dfe1e", + "Elements and Tags Question A" + ], + [ + "637f4e1672c65bc8e73dfe1f", + "Elements and Tags Question B" + ], + [ + "637f4e1c72c65bc8e73dfe20", + "HTML Boilerplate Question A" + ], + [ + "637f4e2872c65bc8e73dfe21", + "HTML Boilerplate Question B" + ], + [ + "637f4e2f72c65bc8e73dfe22", + "HTML Boilerplate Question C" + ], + [ + "637f4e3672c65bc8e73dfe23", + "HTML Boilerplate Question D" + ], + [ + "637f4e5872c65bc8e73dfe27", + "Working With Text Question A" + ], + [ + "637f4e5f72c65bc8e73dfe28", + "Working With Text Question B" + ], + [ + "637f4e6672c65bc8e73dfe29", + "Working With Text Question C" + ], + [ + "637f4e6e72c65bc8e73dfe2a", + "Working With Text Question D" + ], + [ + "637f4e7972c65bc8e73dfe2b", + "Working With Text Question E" + ], + [ + "637f4e8072c65bc8e73dfe2c", + "Working With Text Question F" + ], + [ + "637f4e8772c65bc8e73dfe2d", + "Working With Text Question G" + ], + [ + "637f4e3e72c65bc8e73dfe24", + "Understand Ordered and Unordered List Question A" + ], + [ + "637f4e4672c65bc8e73dfe25", + "Understand Ordered and Unordered List Question B" + ], + [ + "637f4e5172c65bc8e73dfe26", + "Understand ordered and Unordered List Question C" + ], + [ + "637f704072c65bc8e73dfe36", + "Links and Images Question A" + ], + [ + "637f703572c65bc8e73dfe35", + "Links and Images Question B" + ], + [ + "637f703072c65bc8e73dfe34", + "Links and Images Question C" + ], + [ + "637f702872c65bc8e73dfe33", + "Links and Images Question D" + ], + [ "637f702372c65bc8e73dfe32", + "Links and Images Question E" + ], + [ "637f701c72c65bc8e73dfe31", + "Links and Images Question F" + ], + [ "637f701572c65bc8e73dfe30", + "Links and Images Question G" + ], + [ "637f700b72c65bc8e73dfe2f", + "Links and Images Question D" + ], + [ + "6391d1a4f7ac71efd0621380", + "Build a Recipe Page Project" + ] + ] +} \ No newline at end of file diff --git a/curriculum/challenges/arabic/00-certifications/front-end-development-libraries-certification/front-end-development-libraries-certification.yml b/curriculum/challenges/arabic/00-certifications/front-end-development-libraries-certification/front-end-development-libraries-certification.yml index e00138af76c..b65e0f5cbfe 100644 --- a/curriculum/challenges/arabic/00-certifications/front-end-development-libraries-certification/front-end-development-libraries-certification.yml +++ b/curriculum/challenges/arabic/00-certifications/front-end-development-libraries-certification/front-end-development-libraries-certification.yml @@ -13,10 +13,10 @@ tests: title: بناء عارض Markdown - id: 587d7dbc367417b2b2512bae - title: بناء آلة الدرامز + title: أنشئ آلة الطبول - id: bd7158d8c442eddfaeb5bd17 - title: بناء آلة حاسبة بإستخدام JavaScript + title: ابن آلة حاسبة باستخدام JavaScript - id: bd7158d8c442eddfaeb5bd0f title: بناء ساعة 25 + 5 diff --git a/curriculum/challenges/arabic/00-certifications/javascript-algorithms-and-data-structures-certification/javascript-algorithms-and-data-structures-certification.yml b/curriculum/challenges/arabic/00-certifications/javascript-algorithms-and-data-structures-certification/javascript-algorithms-and-data-structures-certification.yml index 3349d7cd478..dbfa713d1db 100644 --- a/curriculum/challenges/arabic/00-certifications/javascript-algorithms-and-data-structures-certification/javascript-algorithms-and-data-structures-certification.yml +++ b/curriculum/challenges/arabic/00-certifications/javascript-algorithms-and-data-structures-certification/javascript-algorithms-and-data-structures-certification.yml @@ -7,16 +7,16 @@ isPrivate: true tests: - id: aaa48de84e1ecc7c742e1124 - title: فاحص الـ Palindrome + title: مدقق لمعاكس المقطع النصي - id: a7f4d8f2483413a6ce226cac - title: محول الأرقام الرومانية + title: محول للأرقام الرومانية - id: 56533eb9ac21ba0edf2244e2 - title: شفرة قيصر (Caesars Cipher) + title: شفرة قيصر - id: aff0395860f5d3034dc0bfc9 - title: مدقق رقم الهاتف + title: مدقق لرقم الهاتف - id: aa2e6f85cab2ab736c9a9b24 - title: ماكينة تسجيل المدفوعات النقدية + title: مكنة لتسجيل النقود diff --git a/curriculum/challenges/arabic/00-certifications/legacy-front-end-certification/legacy-front-end-certification.yml b/curriculum/challenges/arabic/00-certifications/legacy-front-end-certification/legacy-front-end-certification.yml index 41c89333ec8..25e29896e5d 100644 --- a/curriculum/challenges/arabic/00-certifications/legacy-front-end-certification/legacy-front-end-certification.yml +++ b/curriculum/challenges/arabic/00-certifications/legacy-front-end-certification/legacy-front-end-certification.yml @@ -1,13 +1,13 @@ --- id: 561add10cb82ac38a17513be -title: شهادة الواجهة الأمامية القديمة +title: شهادة الواجهة الأمامية التراثية certification: legacy-front-end challengeType: 7 isPrivate: true tests: - id: bd7158d8c242eddfaeb5bd13 - title: قم ببناء صفحة ويب لعرض نماذج الأعمال الشخصية + title: أنشئ معرضا لأعمالك الخاصة - id: bd7158d8c442eddfaeb5bd13 title: قم ببناء آلة عرض اقتباسات عشوائية @@ -16,7 +16,7 @@ tests: title: قم ببناء ساعة 25 + 5 - id: bd7158d8c442eddfaeb5bd17 - title: بناء آلة حاسبة بإستخدام JavaScript + title: بناء آلة حاسبة باستخدام JavaScript - id: bd7158d8c442eddfaeb5bd10 title: إظهار الطقس المحلي diff --git a/curriculum/challenges/arabic/00-certifications/legacy-full-stack-certification/legacy-full-stack-certification.yml b/curriculum/challenges/arabic/00-certifications/legacy-full-stack-certification/legacy-full-stack-certification.yml index e9ca5686706..d22c82b228b 100644 --- a/curriculum/challenges/arabic/00-certifications/legacy-full-stack-certification/legacy-full-stack-certification.yml +++ b/curriculum/challenges/arabic/00-certifications/legacy-full-stack-certification/legacy-full-stack-certification.yml @@ -1,6 +1,6 @@ --- id: 561add10cb82ac38a17213bd -title: شهادة الـ Full Stack القديمة +title: شهادة الـ Full Stack التراثية certification: legacy-full-stack challengeType: 7 isPrivate: true @@ -13,13 +13,13 @@ tests: title: شهادة الخوارزميات وهياكل البيانات في JavaScript - id: 561acd10cb82ac38a17513bc - title: شهادة مكتبات تطوير واجهة المستخدم (Front End Libraries) + title: شهادة مكتبات Front End - id: 5a553ca864b52e1d8bceea14 - title: شهادة Data Visualization + title: شهادة التصور المرئي للبيانات - id: 561add10cb82ac38a17523bc - title: شهادة API's and Microservice + title: شهادة واجهة برمجة التطبيقات (API) والخدمات المصغّرة - id: 561add10cb82ac38a17213bc - title: شهادة أمن المعلومات القديمة وشهادة ضمان الجودة + title: شهادة أمن المعلومات التراثية وشهادة ضمان الجودة diff --git a/curriculum/challenges/arabic/00-certifications/legacy-information-security-and-quality-assurance-certification/legacy-information-security-and-quality-assurance-certification.yml b/curriculum/challenges/arabic/00-certifications/legacy-information-security-and-quality-assurance-certification/legacy-information-security-and-quality-assurance-certification.yml index 66f533142b3..60777ae9607 100644 --- a/curriculum/challenges/arabic/00-certifications/legacy-information-security-and-quality-assurance-certification/legacy-information-security-and-quality-assurance-certification.yml +++ b/curriculum/challenges/arabic/00-certifications/legacy-information-security-and-quality-assurance-certification/legacy-information-security-and-quality-assurance-certification.yml @@ -1,6 +1,6 @@ --- id: 561add10cb82ac38a17213bc -title: شهادة أمن المعلومات القديمة وشهادة ضمان الجودة +title: شهادة أمن المعلومات التراثية وشهادة ضمان الجودة certification: legacy-information-security-and-quality-assurance challengeType: 7 isPrivate: true diff --git a/curriculum/challenges/arabic/00-certifications/responsive-web-design-certification/responsive-web-design-certification.yml b/curriculum/challenges/arabic/00-certifications/responsive-web-design-certification/responsive-web-design-certification.yml index 341301ba269..e8e2df55dc5 100644 --- a/curriculum/challenges/arabic/00-certifications/responsive-web-design-certification/responsive-web-design-certification.yml +++ b/curriculum/challenges/arabic/00-certifications/responsive-web-design-certification/responsive-web-design-certification.yml @@ -7,7 +7,7 @@ isPrivate: true tests: - id: bd7158d8c442eddfaeb5bd18 - title: بناء صفحة تحية + title: أنشئ مشروع صفحة الثناء - id: 587d78af367417b2b2512b03 title: بناء نموذج استطلاع رأي @@ -16,7 +16,7 @@ tests: title: بناء الصفحة الرئيسة لمنتج - id: 587d78b0367417b2b2512b05 - title: أنشئ صفحة التوثيق الفني + title: أنشئ صفحة التوثيق التقنية - id: bd7158d8c242eddfaeb5bd13 - title: قم ببناء مشروع صفحة ويب لعرض نماذج الاعمال الشخصية + title: أنشئ معرضا لأعمالك الخاصة diff --git a/curriculum/challenges/arabic/01-responsive-web-design/applied-accessibility/give-links-meaning-by-using-descriptive-link-text.md b/curriculum/challenges/arabic/01-responsive-web-design/applied-accessibility/give-links-meaning-by-using-descriptive-link-text.md index 91ab935f674..f282a55ad02 100644 --- a/curriculum/challenges/arabic/01-responsive-web-design/applied-accessibility/give-links-meaning-by-using-descriptive-link-text.md +++ b/curriculum/challenges/arabic/01-responsive-web-design/applied-accessibility/give-links-meaning-by-using-descriptive-link-text.md @@ -11,11 +11,11 @@ dashedName: give-links-meaning-by-using-descriptive-link-text 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. +قارئ الشاشة يفعل ذلك بقراءة نص الرابط، أو ما بين علامات الرابط (`a`). 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`. +The link text that Camper Cat is using is not very descriptive without the surrounding context. انقل علامات الرابط (`a`) بحيث تلتف حول النص `information about batteries` بدلاً من `Click here`. # --hints-- diff --git a/curriculum/challenges/arabic/01-responsive-web-design/applied-visual-design/adjust-the-hover-state-of-an-anchor-tag.md b/curriculum/challenges/arabic/01-responsive-web-design/applied-visual-design/adjust-the-hover-state-of-an-anchor-tag.md index 02f09a4e0b0..eba7cc36171 100644 --- a/curriculum/challenges/arabic/01-responsive-web-design/applied-visual-design/adjust-the-hover-state-of-an-anchor-tag.md +++ b/curriculum/challenges/arabic/01-responsive-web-design/applied-visual-design/adjust-the-hover-state-of-an-anchor-tag.md @@ -1,6 +1,6 @@ --- id: 587d781d367417b2b2512ac8 -title: Adjust the Hover State of an Anchor Tag +title: اضبط حالة التأشير بالحوم في علامة الرابط challengeType: 0 videoUrl: 'https://scrimba.com/c/cakRGcm' forumTopicId: 301035 @@ -25,7 +25,7 @@ The code editor has a CSS rule to style all `a` tags black. Add a rule so that w # --hints-- -يجب أن تبقى علامة الرابط `color` سوداء, أضف الفئة الزائفة `:hover` من قواعد CSS فقط. +علامة الرابط `color` يجب أن تبقى سوداء. فقط أضف قواعد CSS لدولة `:hover`. ```js assert($('a').css('color') == 'rgb(0, 0, 0)'); diff --git a/curriculum/challenges/arabic/01-responsive-web-design/basic-html-and-html5/fill-in-the-blank-with-placeholder-text.md b/curriculum/challenges/arabic/01-responsive-web-design/basic-html-and-html5/fill-in-the-blank-with-placeholder-text.md index b9a9509f8ea..e48285eea70 100644 --- a/curriculum/challenges/arabic/01-responsive-web-design/basic-html-and-html5/fill-in-the-blank-with-placeholder-text.md +++ b/curriculum/challenges/arabic/01-responsive-web-design/basic-html-and-html5/fill-in-the-blank-with-placeholder-text.md @@ -13,7 +13,7 @@ Web developers traditionally use lorem ipsum text as placeholder text Lorem ipsum text has been used as placeholder text by typesetters since the 16th century, and this tradition continues on the web. -Well, 5 centuries is long enough. Since we're building a CatPhotoApp, let's use something called "kitty ipsum" text. +Well, 5 centuries is long enough. بما أنك تنشئ برنامج CatPhotoApp، استخدم نص "kitty ipsum". # --instructions-- diff --git a/curriculum/challenges/arabic/01-responsive-web-design/basic-html-and-html5/link-to-external-pages-with-anchor-elements.md b/curriculum/challenges/arabic/01-responsive-web-design/basic-html-and-html5/link-to-external-pages-with-anchor-elements.md index 73a3eaed90b..b9d927d2707 100644 --- a/curriculum/challenges/arabic/01-responsive-web-design/basic-html-and-html5/link-to-external-pages-with-anchor-elements.md +++ b/curriculum/challenges/arabic/01-responsive-web-design/basic-html-and-html5/link-to-external-pages-with-anchor-elements.md @@ -1,6 +1,6 @@ --- id: bad87fee1348bd9aedf08816 -title: Link to External Pages with Anchor Elements +title: الربط بصفحات خارجية بواسطة العناصر Anchor challengeType: 0 videoUrl: 'https://scrimba.com/p/pVMPUv/c8EkncB' forumTopicId: 18226 @@ -11,7 +11,7 @@ dashedName: link-to-external-pages-with-anchor-elements You can use `a` (*anchor*) elements to link to content outside of your web page. -`a` elements need a destination web address called an `href` attribute. They also need anchor text. Here's an example: +عناصر `a` تتطلّب عنوان وب للوجهة يسمّى: `href`. وتتطلّب أيضا نصّ رابط anchor. Here's an example: ```html this links to freecodecamp.org @@ -21,11 +21,11 @@ Then your browser will display the text `this links to freecodecamp.org` as a li # --instructions-- -Create an `a` element that links to `https://www.freecatphotoapp.com` and has "cat photos" as its anchor text. +قم بإنشاء عنصر `a` الذي يربط بـ `https://www.freecatphotoapp.com` والذي يحتوي على "صور قطط" كنص الرابط. # --hints-- -Your `a` element should have the anchor text of `cat photos`. +يجب أن يحتوي عنصر `a` الخاص بك على نص الرابط `cat photos`. ```js assert(/cat photos/gi.test($('a').text())); diff --git a/curriculum/challenges/arabic/01-responsive-web-design/basic-html-and-html5/turn-an-image-into-a-link.md b/curriculum/challenges/arabic/01-responsive-web-design/basic-html-and-html5/turn-an-image-into-a-link.md index 94fd61e4930..5fd409a9ced 100644 --- a/curriculum/challenges/arabic/01-responsive-web-design/basic-html-and-html5/turn-an-image-into-a-link.md +++ b/curriculum/challenges/arabic/01-responsive-web-design/basic-html-and-html5/turn-an-image-into-a-link.md @@ -21,7 +21,7 @@ Remember to use `#` as your `a` element's `href` property in order to turn it in # --instructions-- -Place the existing image element within an `a` (*anchor*) element. +ضع عنصر الصورة داخل عنصر `a` (*anchor*) الحالي. Once you've done this, hover over your image with your cursor. Your cursor's normal pointer should become the link clicking pointer. The photo is now a link. diff --git a/curriculum/challenges/arabic/01-responsive-web-design/responsive-web-design-projects/build-a-personal-portfolio-webpage.md b/curriculum/challenges/arabic/01-responsive-web-design/responsive-web-design-projects/build-a-personal-portfolio-webpage.md index afe98f114e4..4050a8f54d5 100644 --- a/curriculum/challenges/arabic/01-responsive-web-design/responsive-web-design-projects/build-a-personal-portfolio-webpage.md +++ b/curriculum/challenges/arabic/01-responsive-web-design/responsive-web-design-projects/build-a-personal-portfolio-webpage.md @@ -1,6 +1,6 @@ --- id: bd7158d8c242eddfaeb5bd13 -title: Build a Personal Portfolio Webpage +title: أنشئ معرضا لأعمالك الخاصة challengeType: 14 forumTopicId: 301143 dashedName: build-a-personal-portfolio-webpage diff --git a/curriculum/challenges/arabic/01-responsive-web-design/responsive-web-design-projects/build-a-product-landing-page.md b/curriculum/challenges/arabic/01-responsive-web-design/responsive-web-design-projects/build-a-product-landing-page.md index 1dbc840e0bb..a36f6c5daf1 100644 --- a/curriculum/challenges/arabic/01-responsive-web-design/responsive-web-design-projects/build-a-product-landing-page.md +++ b/curriculum/challenges/arabic/01-responsive-web-design/responsive-web-design-projects/build-a-product-landing-page.md @@ -1,6 +1,6 @@ --- id: 587d78af367417b2b2512b04 -title: Build a Product Landing Page +title: أنشئ صفحة لعرض المنتج challengeType: 14 forumTopicId: 301144 dashedName: build-a-product-landing-page diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-algorithm-scripting/convert-celsius-to-fahrenheit.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-algorithm-scripting/convert-celsius-to-fahrenheit.md index a4f5d5ea085..eb80337ecab 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-algorithm-scripting/convert-celsius-to-fahrenheit.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-algorithm-scripting/convert-celsius-to-fahrenheit.md @@ -10,7 +10,7 @@ dashedName: convert-celsius-to-fahrenheit معادلة تحويل درجة الحرارة من الدرجة المئوية إلى درجة فهرنهايت هي: درجة الحرارة المئوية مضروبة في `9/5`, مضاف إليها `32`. -لديك المتغير `celsius` ويمثل درجة الحرارة المئوية. استخدم المتغير `fahrenheit` الذي سبق تعريفه وعيّن درجة حرارة فهرنهايت المعادلة لدرجة الحرارة المئوية المعطاة. استخدم المعادلة في السطر الأول، لتحويل درجة الحرارة المئوية إلى فهرنهايت. +لديك المتغير `celsius` ويمثل درجة الحرارة المئوية. استخدم المتغير `fahrenheit` الذي سبق أعلانه وعيّن درجة حرارة فهرنهايت المعادلة لدرجة الحرارة المئوية المعطاة. استخدم المعادلة في السطر الأول، لتحويل درجة الحرارة المئوية إلى فهرنهايت. # --hints-- diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-data-structures/access-an-arrays-contents-using-bracket-notation.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-data-structures/access-an-arrays-contents-using-bracket-notation.md index 7b6010e1202..6c2adb2f176 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-data-structures/access-an-arrays-contents-using-bracket-notation.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-data-structures/access-an-arrays-contents-using-bracket-notation.md @@ -1,6 +1,6 @@ --- id: 5a661e0f1068aca922b3ef17 -title: الوصول إلى محتويات القائمة (Array) باستخدام رمز القوس (Bracket Notation) +title: الوصول إلى محتويات القائمة (Array) باستخدام علامات الأقواس (Bracket Notation) challengeType: 1 forumTopicId: 301149 dashedName: access-an-arrays-contents-using-bracket-notation @@ -16,7 +16,7 @@ dashedName: access-an-arrays-contents-using-bracket-notation let ourArray = ["a", "b", "c"]; ``` -في القائمة، يحتوي كل عنصر على ترتيب index. هذا الترتيب يتضاعف كموقع ذلك العنصر في القائمة، وكيف تشير إليه. ومع ذلك، من المهم ملاحظة أن القائمات JavaScript هي قائمات مترتبة من الصفر، بمعنى أن العنصر الأول للقائمة هو في الواقع في موضع ***صفر*** وليس الأول. من أجل استرجاع عنصر من قائمة يمكننا إرفاق ترتيب بين قوسين وإلحاقه إلى نهاية القائمة، أو أكثر شيوعاً، إلى متغير يشير إلى كائن من نوع قائمة. هذا معروف باسم رمز الاقواس bracket notation. على سبيل المثال، إذا أردنا استرداد `a` من `ourArray`و تعيينه إلى متغير، يمكننا أن نفعل ذلك بواسطة التعليمات البرمجية التالية: +في القائمة، يحتوي كل عنصر على ترتيب index. هذا الترتيب يتضاعف كموقع ذلك العنصر في القائمة، وكيف تشير إليه. ومع ذلك، من المهم ملاحظة أن القائمات JavaScript هي قائمات مترتبة من الصفر، بمعنى أن العنصر الأول للقائمة هو في الواقع في موضع ***صفر*** وليس الأول. من أجل استرجاع عنصر من قائمة يمكننا إرفاق ترتيب بين قوسين وإلحاقه إلى نهاية القائمة، أو أكثر شيوعاً، إلى متغير يشير إلى كائن من نوع قائمة. هذا معروف باسم علامات الأقواس bracket notation. على سبيل المثال، إذا أردنا استرداد `a` من `ourArray`و تعيينه إلى متغير، يمكننا أن نفعل ذلك بواسطة التعليمات البرمجية التالية: ```js let ourVariable = ourArray[0]; @@ -30,7 +30,7 @@ let ourVariable = ourArray[0]; ourArray[1] = "not b anymore"; ``` -باستخدام رمز الأقواس، قمنا الآن بإعادة تعيين العنصر في الترتيب 1 من السلسلة `b`، إلى `not b anymore`. الآن `ourArray` هو `["a", "not b anymore", "c"]`. +باستخدام علامات الأقواس، قمنا الآن بإعادة تعيين العنصر في الترتيب 1 من المقطع النصي `b`، إلى `not b anymore`. الآن `ourArray` هو `["a", "not b anymore", "c"]`. # --instructions-- diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-data-structures/access-property-names-with-bracket-notation.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-data-structures/access-property-names-with-bracket-notation.md index 194fd0634aa..4a3264ba55a 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-data-structures/access-property-names-with-bracket-notation.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-data-structures/access-property-names-with-bracket-notation.md @@ -8,7 +8,7 @@ dashedName: access-property-names-with-bracket-notation # --description-- -في تحدي الكائن الأول ذكرنا استخدام رمز القوس كوسيلة للوصول إلى قيم الخاصية باستخدام تقييم متغير. على سبيل المثال، تخيل أن كائن `foods` الخاص بنا يتم استخدامه في برنامَج لتسجيل النقود في محل تجارة. لدينا وظيفة ما و التي تعين `selectedFood` ونحن نريد التحقق من كائن `foods` للتأكد من وجود ذلك الطعام. وقد يبدو ذلك كالتالي: +في تحدي الكائن الأول ذكرنا استخدام علامات الأقواس كوسيلة للوصول إلى قيم الخاصية باستخدام تقييم متغير. على سبيل المثال، تخيل أن كائننا `foods` يستخدمه مكنة لتسجيل النقود في محل تجارة. لدينا وظيفة ما و التي تعين `selectedFood` ونحن نريد التحقق من كائن `foods` للتأكد من وجود ذلك الطعام. وقد يبدو ذلك كالتالي: ```js let selectedFood = getCurrentFood(scannedItem); diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-data-structures/add-key-value-pairs-to-javascript-objects.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-data-structures/add-key-value-pairs-to-javascript-objects.md index a7f3d0e66ea..3a5ec8d77c0 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-data-structures/add-key-value-pairs-to-javascript-objects.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-data-structures/add-key-value-pairs-to-javascript-objects.md @@ -81,7 +81,7 @@ assert(foods.grapes === 35); assert(foods.strawberries === 27); ``` -يجب تعيين أزواج key-value باستخدام dot او bracket notation. +يجب تعيين أزواج key-value باستخدام dot او علامات الأقواس. ```js assert( diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-data-structures/create-complex-multi-dimensional-arrays.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-data-structures/create-complex-multi-dimensional-arrays.md index 6dbf7852374..af68bb2ae75 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-data-structures/create-complex-multi-dimensional-arrays.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-data-structures/create-complex-multi-dimensional-arrays.md @@ -8,7 +8,7 @@ dashedName: create-complex-multi-dimensional-arrays # --description-- -رائع! لقد تعلمت للتو طناً من المعلومات عن القوائم (arrays)! لقد كانت هذه النِّظْرة عامة عالية المستوى إلى حد ما، وهناك الكثير لتتعلمه حول العمل مع القائمات، التي سترى الكثير منها في الأقسام اللاحقة. ولكن قبل الانتقال إلى كائنات (Objects)، دعنا نلقي النِّظْرة أخرى ونرى كيف يمكن أن تصبح القوائم (arrays) أكثر تعقيدًا قليلاً مما رأيناه في التحديات السابقة. +رائع! لقد تعلمت للتو طناً من المعلومات عن القوائم (arrays)! لقد كانت هذه النِّظْرة عامة عالية المستوى إلى حد ما، وهناك الكثير لتتعلمه حول العمل مع القوائم، التي سترى الكثير منها في الأقسام اللاحقة. ولكن قبل الانتقال إلى كائنات (Objects)، دعنا نلقي النِّظْرة أخرى ونرى كيف يمكن أن تصبح القوائم (arrays) أكثر تعقيدًا قليلاً مما رأيناه في التحديات السابقة. واحدة من أقوى السمات عند التفكير في القوائم كهياكل للبيانات، هو أن القوائم يمكن أن تحتوي، أو حتى إن تكون مكونة بالكامل من قوائم أخرى. ورأيت القوائم التي تحتوي على قوائم في تحديات سابقة، ولكنها بسيطة إلى حد ما. ومع ذلك، فإن القوائم يمكن أن تحتوي على عمق لا حدود له من القوائم التي يمكن أن تحتوي على قوائم أخرى، لكل منها مستويات عشوائية من العمق وما إلى ذلك. بهذه الطريقة، يمكن للقائمة أن تصبح بسرعة هيكل بيانات معقد جداً، يعرف باسم عديد الأبعاد (multi-dimensional) أو قائمة متداخلة (nested array). انظر إلى المثال التالي: @@ -33,7 +33,7 @@ let nestedArray = [ قائمة `deep` متداخلة على مستويين عميقين. قوائم `deeper` بعمق 3 مستويات. قوائم `deepest` هي 4 مستويات، و `deepest-est?` هي 5 مستويات. -وفي حين أن هذا المثال قد يبدو متشابكا فإن هذا المستوى من التعقيد ليس مستغربا أو غير عادي عند التعامل مع كميات كبيرة من البيانات. ومع ذلك، لا يزال بإمكاننا الوصول بسهولة إلى أعمق مستويات قائمة بهذا التعقيد باستخدام رمز القوس: +وفي حين أن هذا المثال قد يبدو متشابكا فإن هذا المستوى من التعقيد ليس مستغربا أو غير عادي عند التعامل مع كميات كبيرة من البيانات. ومع ذلك، لا يزال بإمكاننا الوصول بسهولة إلى أعمق مستويات قائمة بهذا التعقيد علامات الأقواس: ```js console.log(nestedArray[2][1][0][0][0]); @@ -51,7 +51,7 @@ console.log(nestedArray[2][1][0][0][0]); # --instructions-- -لقد حددنا متغير `myNestedArray`، يساويا لقائمة. عدل `myNestedArray` باستخدام أي مجموعة من مقاطع نصية (strings)، و أرقام (numbers)، و حالات (booleans) لعناصر البيانات، بحيث يكون لديها على وجه التحديد خمس مستويات من العمق (تذكر، أن القائمة الخارجية هي المستوى 1). في مكان ما على المستوى الثالث ضف المقطع `deep`, وعلى المستوى الرابع ضف المقطع `deeper`, وعلى المستوى الخامس ضف المقطع `deepest`. +لقد أعلنا متغير `myNestedArray`، مساويا لقائمة. عدل `myNestedArray` باستخدام أي مجموعة من مقاطع نصية (strings)، و أرقام (numbers)، و حالات (booleans) لعناصر البيانات، بحيث يكون لديها على وجه التحديد خمس مستويات من العمق (تذكر، أن القائمة الخارجية هي المستوى 1). في مكان ما على المستوى الثالث ضف المقطع `deep`, وعلى المستوى الرابع ضف المقطع `deeper`, وعلى المستوى الخامس ضف المقطع `deepest`. # --hints-- diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-data-structures/modify-an-object-nested-within-an-object.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-data-structures/modify-an-object-nested-within-an-object.md index f3a9f1376c7..8a43399533e 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-data-structures/modify-an-object-nested-within-an-object.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-data-structures/modify-an-object-nested-within-an-object.md @@ -58,7 +58,7 @@ assert('totalUsers' in userActivity.data && 'online' in userActivity.data); assert(userActivity.data.online === 45); ``` -يجب تعيين خاصية `online` باستخدام dot او bracket notation. +يجب تعيين خاصية `online` باستخدام dot او علامات الأقواس. ```js assert.strictEqual(code.search(/online: 45/), -1); diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-data-structures/use-an-array-to-store-a-collection-of-data.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-data-structures/use-an-array-to-store-a-collection-of-data.md index ef3dbe392a7..6c7c2515bec 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-data-structures/use-an-array-to-store-a-collection-of-data.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-data-structures/use-an-array-to-store-a-collection-of-data.md @@ -46,7 +46,7 @@ let complexArray = [ # --instructions-- -لقد حددنا متغير يسمى `yourArray`. أكمل البيان بتعيين array من 5 عناصر في الأقل في الطول لمتغير `yourArray`. يجب أن تحتوي array على stringواحد علي الأفل و number واحد و boolean واحد. +لقد أعلنا متغير يسمى `yourArray`. أكمل البيان بتعيين array من 5 عناصر في الأقل في الطول لمتغير `yourArray`. يجب أن تحتوي array على stringواحد علي الأفل و number واحد و boolean واحد. # --hints-- diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/access-array-data-with-indexes.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/access-array-data-with-indexes.md index f7ec3c9a182..e396699f03a 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/access-array-data-with-indexes.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/access-array-data-with-indexes.md @@ -1,6 +1,6 @@ --- id: 56bbb991ad1ed5201cd392ca -title: الوصول إلى بيانات القائمة باستخدام الترتيب (Access Array Data with Indexes) +title: الوصول إلى بيانات القائمة باستخدام الترتيب challengeType: 1 videoUrl: 'https://scrimba.com/c/cBZQbTz' forumTopicId: 16158 diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/access-multi-dimensional-arrays-with-indexes.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/access-multi-dimensional-arrays-with-indexes.md index b0449ba0401..3124db6d016 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/access-multi-dimensional-arrays-with-indexes.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/access-multi-dimensional-arrays-with-indexes.md @@ -1,6 +1,6 @@ --- id: 56592a60ddddeae28f7aa8e1 -title: الوصول إلى القائمات المتعددة الأبعاد باستخدام الترتيب (Access Multi-Dimensional Arrays With Indexes) +title: الوصول إلى القائمات المتعددة الأبعاد باستخدام الترتيب challengeType: 1 videoUrl: 'https://scrimba.com/c/ckND4Cq' forumTopicId: 16159 @@ -32,7 +32,7 @@ const element = arr[3][0][1]; # --instructions-- -باستخدام bracket notation، اختر عنصرا من `myArray` بحيث أن `myData` يساوي `8`. +اختر عنصرا من `myArray` باستخدام علامات الأقواس بحيث أن `myData` يساوي `8`. # --hints-- @@ -42,7 +42,7 @@ const element = arr[3][0][1]; assert(myData === 8); ``` -يجب أن تستخدم bracket notation لقراءة القيمة الصحيحة من `myArray`. +يجب أن تستخدم علامات الأقواس لقراءة القيمة الصحيحة من `myArray`. ```js assert(/myData=myArray\[2\]\[1\]/.test(__helpers.removeWhiteSpace(code))); diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-nested-arrays.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-nested-arrays.md index 5e9191d2f49..622ba4ba131 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-nested-arrays.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-nested-arrays.md @@ -1,6 +1,6 @@ --- id: 56533eb9ac21ba0edf2244cd -title: الوصول إلى القائمات المتداخلة (Accessing Nested Arrays) +title: الوصول إلى القائمات المتداخلة challengeType: 1 videoUrl: 'https://scrimba.com/c/cLeGDtZ' forumTopicId: 16160 @@ -41,7 +41,7 @@ ourPets[1].names[0]; # --instructions-- -باستخدام dot و bracket notation، وعيّن المتغير `secondTree` إلى العنصر الثاني في قائمة `trees` من object باسم `myPlants`. +استخدم dot و علامات الأقواس, لتعيّن المتغير `secondTree` إلى العنصر الثاني في قائمة `trees` من object باسم `myPlants`. # --hints-- diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-object-properties-with-bracket-notation.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-object-properties-with-bracket-notation.md index 095d4fe8801..0d152807800 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-object-properties-with-bracket-notation.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-object-properties-with-bracket-notation.md @@ -1,6 +1,6 @@ --- id: 56533eb9ac21ba0edf2244c8 -title: الوصول خصائص (Properties) الكائن (Object) بواسطة Bracket Notation +title: الوصول لخصائص (Properties) الكائن (Object) بواسطة استخدام dot و علامات الأقواس challengeType: 1 videoUrl: 'https://scrimba.com/c/cBvmEHP' forumTopicId: 16163 @@ -9,11 +9,11 @@ dashedName: accessing-object-properties-with-bracket-notation # --description-- -الطريقة الثانية للوصول إلى خصائص الكائن هي القوسان المعكوفان (`[]`). في حال إن خاصية الكائن الذي تحاول الوصول إليه يحتوي على مسافة في اسمه, سوف تحتاج إلى استخدام القوسان المعكوفان (bracket notation). +الطريقة الثانية للوصول إلى خصائص الكائن هي استخدام علامات الأقواس (`[]`). في حال إن خاصية الكائن الذي تحاول الوصول إليه يحتوي على مسافة في اسمه, سوف تحتاج إلى استخدام علامات الأقواس (bracket notation). على أية حال, فانه يمكنك أستخدام bracket notation على خصائص الكائن من دون مسافات. -هذا مثال على استخدام bracket notation لقراءة خاصية الكائن: +هذا مثال على استخدام علامات الأقواس لقراءة خاصية الكائن: ```js const myObj = { @@ -33,7 +33,7 @@ myObj["NoSpace"]; # --instructions-- -أقراء قيم خصائص `an entree` و `the drink` في `testObj` باستخدام القوسان المعكوفان وتعينهم إلى `entreeValue` و `drinkValue` على التوالي. +أقراء قيم خصائص `an entree` و `the drink` في `testObj` باستخدام علامات الأقواس وعينهم إلى `entreeValue` و `drinkValue` على التوالي. # --hints-- @@ -61,7 +61,7 @@ assert(typeof drinkValue === 'string'); assert(drinkValue === 'water'); ``` -يجب عليك أستخدام القوسان المعكوفان مرتين +يجب عليك أستخدام علامات الأقواس مرتين ```js assert(code.match(/testObj\s*?\[('|")[^'"]+\1\]/g).length > 1); diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-object-properties-with-dot-notation.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-object-properties-with-dot-notation.md index 140c7560b18..431232abff1 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-object-properties-with-dot-notation.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-object-properties-with-dot-notation.md @@ -9,7 +9,7 @@ dashedName: accessing-object-properties-with-dot-notation # --description-- -هناك طريقتان للوصول إلى خصائص الكائن: نقطة التأشير (`.`) وتدوين الأقواس (`[]`)، على غرار القائمة. +هناك طريقتان للوصول إلى خصائص الكائن: نقطة التأشير (`.`) و علامات الأقواس (`[]`)، على غرار القائمة. ترميز النقطة هو ما تستخدمه عندما تعرف اسم الخاصية التي تحاول الوصول إليها مسبقاً. diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-object-properties-with-variables.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-object-properties-with-variables.md index 37c8d3ad711..53bde20f3e3 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-object-properties-with-variables.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/accessing-object-properties-with-variables.md @@ -9,7 +9,7 @@ dashedName: accessing-object-properties-with-variables # --description-- -وثمة استخدام آخر لترميز آلأقواس للوصول إلى الخصائص المخزنة كقيمة للمتغير. يمكن أن يكون هذا مفيداً جداً خلال تكرار خصائص الكائن أو عند الوصول إلى جدول البحث. +وثمة استخدام آخر لعلامات الأقواس للوصول إلى الخصائص المخزنة كقيمة للمتغير. يمكن أن يكون هذا مفيداً جداً خلال تكرار خصائص الكائن أو عند الوصول إلى جدول البحث. فيما يلي, مثال على استخدام متغير للوصول إلى خاصية ما: @@ -53,7 +53,7 @@ assert(typeof player === 'string'); assert(player === 'Montana'); ``` -يجب عليك استخدام ترميز ألأقواس للوصول إلى `testObj` +يجب عليك استخدام علامات الأقواس للوصول إلى `testObj` ```js assert(/testObj\s*?\[.*?\]/.test(code)); @@ -65,7 +65,7 @@ assert(/testObj\s*?\[.*?\]/.test(code)); assert(!code.match(/player\s*=\s*"|\'\s*Montana\s*"|\'\s*;/gi)); ``` -يجب أن تستخدم المتغير `playerNumber` في رمز القوس +يجب أن تستخدم المتغير `playerNumber` في علامات الأقواس ```js assert(/testObj\s*?\[\s*playerNumber\s*\]/.test(code)); diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/assigning-the-value-of-one-variable-to-another.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/assigning-the-value-of-one-variable-to-another.md index 534e1c7c510..d757a010d3a 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/assigning-the-value-of-one-variable-to-another.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/assigning-the-value-of-one-variable-to-another.md @@ -1,6 +1,6 @@ --- id: 5ee127a03c3b35dd45426493 -title: تعيين قيمة متغير إلى متغير آخر (Assigning the Value of One Variable to Another) +title: تعيين قيمة متغير إلى متغير آخر challengeType: 1 videoUrl: '' forumTopicId: 418265 @@ -9,7 +9,7 @@ dashedName: assigning-the-value-of-one-variable-to-another # --description-- -بعد تعيين قيمة إلى متغير باستخدام عملية تكليف (=)، يمكنك تعيين قيمة هذا المتغير إلى متغير آخر باستخدام عمليةتكليف (=) ذاتها. +بعد تعيين قيمة إلى متغير باستخدام مشغل التعيين (=)، يمكنك تعيين قيمة هذا المتغير إلى متغير آخر باستخدام مشغل التعيين (=) ذاتها. ```js var myVar; @@ -18,7 +18,7 @@ var myNum; myNum = myVar; ``` -ما ورد أعلنه يظهر تعريف المتغير `myVar` دون قيمة، ثم يخصص له قيمة `5`. بعد ذلك، يتم إعلان متغير آخر يدعى `myNum` دون قيمة. ثم يتم تعيين قيمة المتغير `myVar` (التي تساوي `5`) إلى المتغير `myNum`. الآن المتغير `myNum` لديه القيمة `5`. +ما ورد أعلى يعلن المتغير `myVar` دون قيمة، ثم يخصص له قيمة `5`. بعد ذلك، يتم إعلان متغير آخر يدعى `myNum` دون قيمة. ثم يتم تعيين قيمة المتغير `myVar` (التي تساوي `5`) إلى المتغير `myNum`. الآن المتغير `myNum` لديه القيمة `5`. # --instructions-- diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/comment-your-javascript-code.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/comment-your-javascript-code.md index 9e9f0282e7e..99b48c6e4c4 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/comment-your-javascript-code.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/comment-your-javascript-code.md @@ -1,6 +1,6 @@ --- id: bd7123c9c441eddfaeb4bdef -title: التعليق علي تعليماتك البرمجية في JavaScript +title: التعليق (Comment) في كودك من JavaScript challengeType: 1 removeComments: false videoUrl: 'https://scrimba.com/c/c7ynnTp' @@ -10,7 +10,7 @@ dashedName: comment-your-javascript-code # --description-- -التعليقات هي أسطر من التعليمات البرمجية التي سيتجاهلها JavaScript عمداً. التعليقات هي طريقة رائعة لترك الملاحظات لنفسك وللأشخاص الآخرين الذين سيحتاجون لاحقاً إلى معرفة ما تفعله تلك التعليمات البرمجية. +إن التعليقات أسطر من الكود التي سيتجاهلها JavaScript عمداً. إن التعليقات طريقة رائعة لترك الملاحظات لنفسك وللأشخاص الآخرين الذين سيحتاجون لاحقاً إلى معرفة ما يفعله ذلك الكود. هناك طريقتان لكتابة التعليقات في JavaScript: @@ -27,7 +27,7 @@ dashedName: comment-your-javascript-code multi-line comment */ ``` -**ملاحظة:** عند كتابة التعليمات البرمجية، يجب عليك إضافة تعليقات بانتظام لتوضيح وظيفة أجزاء من التعليمات البرمجية الخاص بك. التعليق الجيد يمكن أن يساعد على إيصال المغزى من التعليمات البرمجية الخاص بك - للآخرين *و* لنفسك في المستقبل. +**ملاحظة:** عند كتابة الكود، يجب عليك إضافة تعليقات بانتظام لتوضيح وظيفة أجزاء من كودك. التعليق الجيد يمكن أن يساعد على إيصال المغزى من كودك - للآخرين *و* لنفسك في المستقبل. # --instructions-- diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-equality-operator.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-equality-operator.md index ba99c3632e3..96d0c55b7ad 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-equality-operator.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-equality-operator.md @@ -22,7 +22,7 @@ function equalityTest(myVal) { } ``` -إذا كانت قيمة `myVal` تساوي `10`، عملية المساواة تعيد `true`، و بهذا سيتم تنفيذ التعليمات البرمجية في الأقواس، وستعيد الدالة `Equal`. وإلا فإن الوظيفة ستعيد `Not Equal`. لكي تقوم JavaScript بمقارنة نوعين مختلفين في ا نوع البيانات (على سبيل المثال، مقارنة بين نوع `numbers` و نوع `strings`)، يجب أن تحول احدمها إلى نوع الآخر. هذا يُعرف بالقسر النوع (Type Coercion). بمجرد فعل ذلك، يتمكن Javascript من المقارنة بين المصطلحات التالية: +إذا كانت قيمة `myVal` تساوي `10`، عملية المساواة تعيد `true`، و بهذا سيتم تنفيذ التعليمات البرمجية في الأقواس، وستعيد الوظيفة `Equal`. وإلا فإن الوظيفة ستعيد `Not Equal`. لكي تقوم JavaScript بمقارنة نوعين مختلفين في ا نوع البيانات (على سبيل المثال، مقارنة بين نوع `numbers` و نوع `strings`)، يجب أن تحول احدمها إلى نوع الآخر. هذا يُعرف بالقسر النوع (Type Coercion). بمجرد فعل ذلك، يتمكن Javascript من المقارنة بين المصطلحات التالية: ```js 1 == 1 // true diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/count-backwards-with-a-for-loop.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/count-backwards-with-a-for-loop.md index 8640a6e7e2e..98eb93fd0cb 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/count-backwards-with-a-for-loop.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/count-backwards-with-a-for-loop.md @@ -23,7 +23,7 @@ for (let i = 10; i > 0; i -= 2) { } ``` -سوف تحتوي `ourArray` الآن على `[10, 8, 6, 4, 2]`. غير التغيير البادئ (initialization) و التعبير الأخير (final expression) حتى نتمكن من العد إلى الوراء بمقدار اثنين لإنشاء قائمة (array) من الأعداد التنازلية الفردية. +سوف تحتوي `ourArray` الآن على `[10, 8, 6, 4, 2]`. غير التعبير البادئ (initialization) و التعبير الأخير (final expression) حتى نتمكن من العد إلى الوراء بمقدار اثنين لإنشاء قائمة (array) من الأعداد التنازلية الفردية. # --instructions-- diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/declare-javascript-variables.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/declare-javascript-variables.md index 15f138dc17b..c72cab26475 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/declare-javascript-variables.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/declare-javascript-variables.md @@ -1,6 +1,6 @@ --- id: bd7123c9c443eddfaeb5bdef -title: أعلان متغيرات في JavaScript +title: أعلان المتغيرات في JavaScript challengeType: 1 videoUrl: 'https://scrimba.com/c/cNanrHq' forumTopicId: 17556 @@ -9,21 +9,21 @@ dashedName: declare-javascript-variables # --description-- -في علوم الحاسب، تكون البيانات أي شيء ذو معني للحواسيب. يوفر JavaScript ثماني أنواع بيانات مختلفة و هي كالآتي `undefined`, و`null`, و`boolean`, و`string`, و`symbol`, و`bigint`, و`number`, و `object`. +في علم الحاسوب (computer science)، تكون البيانات أي شيء ذو معني للحاسوب. يوفر JavaScript ثماني أنواع بيانات مختلفة و هي كالآتي `undefined`, و`null`, و`boolean`, و`string`, و`symbol`, و`bigint`, و`number`, و `object`. -على سبيل المثال، تقوم الحاسوب بالتمييز بين الأرقام، مثل الرَّقَم `12` و `strings` مثل `"12"` و `"dog"` أو `"123 cats"`, وهي مجموعات من الرموز. يمكن للحواسيب عمليات رياضية على الأعداد، ولكن ليس على المقاطع النصية (strings). +على سبيل المثال، يقوم الحاسوب بالتمييز بين الأرقام، مثل الرَّقَم `12` و `strings` مثل `"12"` و `"dog"` أو `"123 cats"`, وهي مجموعات من الرموز. يمكن للحواسيب عمليات رياضية على الأعداد، ولكن ليس على المقاطع النصية (strings). -تسمح المتغيرات للحواسيب بتخزين البيانات ومعالجتها بطريقة ديناميكية. وهم يفعلون ذلك باستخدام "تسمية" للإشارة إلى البيانات بدلاً من استخدام البيانات نفسها. ويمكن تخزين أي نوع من أنواع البيانات الثمانية في متغير. +تسمح المتغيرات للحواسيب بتخزين البيانات ومعالجتها بطريقة ديناميكية. ويفعلوا ذلك باستخدام "المسمى" للإشارة إلى البيانات بدلاً من استخدام البيانات نفسها. ويمكن تخزين أي نوع من أنواع البيانات الثمانية في متغير. المتغيرات مشابهة للمتغيرات x و y التي تستخدمها في الرياضيات، مما يعني أنهم اسم بسيط لتمثيل البيانات التي نريد الرجوع إليها. وتختلف متغيرات الحاسوب عن المتغيرات الرياضية من حيث أنها تستطيع تخزين قيم مختلفة في أوقات مختلفة. -نحن نطلب من JavaScript إنشاء أو تعلن متغير عن طريق وضع الكلمة `var` أمامه، مثل ذلك: +نطلب من JavaScript إنشاء أو أعلان متغير عن طريق وضع الكلمة `var` أمامه، مثل ذلك: ```js var ourName; ``` -هذا ينشئ متغير يسمى `ourName`. في JavaScript تنهي التعبيرات باستخدام الفاصلة المنقوطة (;). أسماء المتغيرات يمكن أن تتكون من أرقام وحروف و `$` أو `_`، ولكن قد لا تحتوي على مسافات أو تبدأ برقم. +هذا ينشئ متغير يسمى `ourName`. في JavaScript, تنهي التعبيرات باستخدام الفاصلة المنقوطة (;). يمكن أن تتكون أسماء المتغيرات من أرقام وحروف و `$` أو `_`، ولكن قد لا تحتوي على مسافات أو تبدأ برقم. # --instructions-- diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/declare-string-variables.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/declare-string-variables.md index 7897e7bf9d5..94856f2d23b 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/declare-string-variables.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/declare-string-variables.md @@ -1,6 +1,6 @@ --- id: bd7123c9c444eddfaeb5bdef -title: إعلان متغيرات المقاطع نصية (Declare String Variables) +title: إعلان متغيرات المقاطع النصية challengeType: 1 videoUrl: 'https://scrimba.com/c/c2QvWU6' forumTopicId: 17557 @@ -21,15 +21,15 @@ var myName; var myName = "your name"; ``` -`"your name"` يسمي مقطع حرفي. المقطع النصي أو مقطع هي مقطع تتكون من رمز أو أكثر، مرفقين في علامات اقتباس (Quotes) مفردة أو مزدوجة. +يسمي`"your name"` المقطع موضوعي. يتكون المقطع الموضوعي أو المقطع النصي من رمز أو رموز، مرفقين في علامات اقتباس (quotes) مفردة أو مزدوجة. # --instructions-- -إنشاء متغيرين مقطعين جديدين: `myFirstName` و `myLastName` وعيين قيم الاسم الأول والاسم الأخير على التوالي. +إنشاء متغيرين مقطعين جديدين: وعين `myFirstName` و `myLastName` بقيم اسمك والاسم عائلتك على التوالي. # --hints-- -يجب أن يحتوي مقطع `myFirstName` على حرف واحد في الأقل. +يجب أن يحتوي مقطع `myFirstName` على رمز واحد في الأقل. ```js assert( @@ -47,7 +47,7 @@ assert( ); ``` -يجب أن يحتوي مقطع `myLastName` على حرف واحد في الأقل. +يجب أن يحتوي مقطع `myLastName` على رمز واحد في الأقل. ```js assert( diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/delete-properties-from-a-javascript-object.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/delete-properties-from-a-javascript-object.md index 985e3c80dde..1a4f25f7689 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/delete-properties-from-a-javascript-object.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/delete-properties-from-a-javascript-object.md @@ -42,7 +42,7 @@ delete ourDog.bark; # --instructions-- -احذف خاصية `tails` من `myDog`. يمكنك استخدام النقطة (dot) أو الأقواس المربعة (bracket notation). +احذف خاصية `tails` من `myDog`. يمكنك استخدام النقطة (dot) أو علامات الأقواس (bracket notation). # --hints-- diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md index 53a1021b42f..f327967b92a 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings.md @@ -1,6 +1,6 @@ --- id: 56533eb9ac21ba0edf2244b6 -title: تسلسلات الهروب في المقاطع (Escape Sequences in Strings) +title: تسلسلات الإخراج في المقاطع النصية challengeType: 1 videoUrl: 'https://scrimba.com/c/cvmqRh6' forumTopicId: 17567 @@ -9,26 +9,26 @@ dashedName: escape-sequences-in-strings # --description-- -الاقتباسات (Quotes) ليست الرموز الوحيدة التي يمكن أن تكتب باحتياليه داخل المقطع (string). وهناك سببان لاستخدام رموز احتيالية (escaping characters): +الاقتباسات (Quotes) ليست الرموز الوحيدة التي يمكن أن تكتب مخرَّجة داخل المقطع النصي (string). وهناك سببان لاستخدام رموز احتيالية (escaping characters): 1. للسماح لك باستخدام الرموز التي قد لا تتمكن من استخدامها، مثل سطر جديد (newline). -2. للسماح لك بتمثيل الاقتباسات (Quotes) متعددة في مقطع دون أن يسيء JavaScript فهم ما تعنيه. +2. للسماح لك بتمثيل الاقتباسات (Quotes) متعددة في مقطع نصي دون أن يسيء JavaScript فهم ما تعنيه. وقد تعلمنا ذلك في التحدي السابق.
الكودالناتج
\'single quote
\"double quote
\\backslash
\nnewline
\ttab
\rcarriage return
\bword boundary
\fform feed
-*لاحظ أن يجب أن تكون الخط المائل (backslash) نفسه أحتيالي (escaped) ليتم عرضها كخط مائل backslash.* +*لاحظ أن يجب أن يكون الخط المائل (backslash) نفسه يخرَّج (escaped) ليتم عرضه كخط مائل backslash.* # --instructions-- -عيّن الأسطر الثلاثة التالية من النص في المتغير `myStr` الوحيد باستخدام تسلسل احتيالي (escape sequences). +عيّن الأسطر الثلاثة التالية من النص في المتغير `myStr` الوحيد باستخدام تسلسل التخريج (escape sequences).
FirstLine
    \SecondLine
ThirdLine
-سوف تحتاج إلى استخدام تسلسل احتيالي لإدراج الرموز الخاصة (special characters) بشكل صحيح. ستحتاج أيضًا إلى اتباع التباعد كما هو موضح أعلاه، دون مسافات بين التسلسل الاحتيالي escape sequences أو الكلمات. +سوف تحتاج إلى استخدام تسلسل تخريج لإدراج الرموز الخاصة (special characters) بشكل صحيح. ستحتاج أيضًا إلى اتباع التباعد كما هو موضح أعلاه، دون مسافات بين تسلسل التخريج escape sequences أو الكلمات. -**ملاحظة:** يتم الحصول على التباعد (indentation) في `SecondLine` باستخدام رمز التحايل الشريط (tab escape character) وليس المسافة الفارغة (space). +**ملاحظة:** يتم الحصول على التباعد (indentation) في `SecondLine` باستخدام رمز التخريح الشريط (tab escape character) وليس المسافة الفارغة (space). # --hints-- diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/explore-differences-between-the-var-and-let-keywords.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/explore-differences-between-the-var-and-let-keywords.md index e45b50e28cc..38ee1bca4fb 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/explore-differences-between-the-var-and-let-keywords.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/explore-differences-between-the-var-and-let-keywords.md @@ -1,6 +1,6 @@ --- id: 587d7b87367417b2b2512b3f -title: استكشاف الاختلافات بين كلمتين var و let +title: استكشاف الاختلافات بين المصطلحين var و let challengeType: 1 forumTopicId: 301202 dashedName: explore-differences-between-the-var-and-let-keywords @@ -8,7 +8,7 @@ dashedName: explore-differences-between-the-var-and-let-keywords # --description-- -واحدة من أكبر مشكلات مع إعلان المتغيرات باستخدام كلمة `var` هي أنه يمكنك بسهولة تغيير الإعلانات للمتغيرات السابقة: +واحدة من أكبر المشكلات في إعلان المتغيرات بكلمة `var` هي أنه يمكنك بسهولة إلغاء الإعلانات السابقة للمتغيرات: ```js var camper = "James"; @@ -16,11 +16,11 @@ var camper = "David"; console.log(camper); ``` -في الكود أعلاه، أعلن متغير `camper` بقيمة `James` في الأصل، وغير بعد ذلك ليصبح `David`. ثم يعرض وحدة التحكم المقطع (string) الآتي `David`. +في الكود أعلاه، أعطى متغير `camper` قيمة `James` في الإعلان الأصلي، ثم ألغيَ عند إعادة إعلانه ليصبح `David`. ولذلك يعرض الكونسول (console) المقطع النصي (string) الآتي `David`. -في تطبيق صغير، قد لا تواجه هذا النوع من المشاكل. لكن كلما أصبح الكود الخاص بك أكبر، قد تغير المتغير عن طريق الخطأ الذي لم تكن تنوي تغييره. ولأذن هذا السلوك لا يوقع خطأ، يصبح البحث عن الأخطاء وإصلاحها أكثر صعوبة. +في تطبيق صغير، قد لا تواجه هذه المشكلة. لكن إذا أصبح الكود الخاص بك أكبر، قد تلغي متغير دون وعي. ولأن هذا السلوك لا يوقع خطأ، يصبح البحث عن الأخطاء وإصلاحها أكثر صعوبة. -تم تقديم كلمة `let` في ES6، وهو تحديث رئيس JavaScript، لحل هذه المشكلة المحتملة باستخدام `var`. ستتعرف إلى ميزات ES6 الأخرى في التحديات اللاحقة. +تم تقديم كلمة `let` في ES6، وهو تحديث رئيسي في الجافاسكريبت (JavaScript)، لحل هذه المشكلة المحتملة باستخدام `var`. ستتعرف على ميزات ES6 الأخرى في التحديات اللاحقة. إذا استبدلت `var` إلى `let` في الكود أعلاه، فإنه يؤدي إلى خطأ: @@ -29,13 +29,13 @@ let camper = "James"; let camper = "David"; ``` -يمكن رؤية الخطأ في وحدة تحكم المتصفح الخاص بك. +يمكن رؤية الخطأ في الكونسول (console) المتصفح الخاص بك. لذلك على خلاف `var`، عندما تستعمل `let`، يمكن إعلان متغير بنفس الاسم مرة واحدة فقط. # --instructions-- -حديث الكود بحيث يستخدم فقط كلمة `let`. +حدِّث الكود بحيث يستخدم فقط كلمة `let`. # --hints-- @@ -45,13 +45,13 @@ let camper = "David"; assert.notMatch(code, /var/g); ``` -يجب أن تساوي `catName` المقطع (string) الآتي `Oliver`. +يجب أن تساوي `catName` المقطع النصي الآتي `Oliver`. ```js assert.equal(catName, 'Oliver'); ``` -يجب أن تساوي `catSound` المقطع (string) الآتي `Meow!` +يجب أن تساوي `catSound` المقطع النصي الآتي `Meow!` ```js assert.equal(catSound, 'Meow!'); diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/find-the-length-of-a-string.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/find-the-length-of-a-string.md index 141ba2afc0c..b2faae6839a 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/find-the-length-of-a-string.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/find-the-length-of-a-string.md @@ -1,6 +1,6 @@ --- id: bd7123c9c448eddfaeb5bdef -title: العثور على طول مقطع نصي (Find the Length of a String) +title: العثور عن عدد الرموز أو الطول لمقطع نصي challengeType: 1 videoUrl: 'https://scrimba.com/c/cvmqEAd' forumTopicId: 18182 @@ -9,7 +9,7 @@ dashedName: find-the-length-of-a-string # --description-- -يمكنك العثور على قيمة طول `String` بكتابة `.length` بعد متغير المقطع (string) أو المقطع النصي (string literal). +يمكنك العثور على الطول أو عدد الرموز في `String` بكتابة `.length` بعد متغير المقطع النصي أو بعد مقطع حرفي (string literal). ```js console.log("Alan Peter".length); @@ -17,11 +17,11 @@ console.log("Alan Peter".length); سوف يتم عرض القيمة `10` في وحدة التحكم. لاحظ أن رمز المسافة بين "Alan" و "Peter" يتم حسابه أيضا. -على سبيل المثال، إذا أنشئت متغير `const firstName = "Ada"`، يمكننا معرفة طول المقطع (string) الآتي `Ada` باستخدام `firstName.length`. +على سبيل المثال، إذا أنشئت متغير `const firstName = "Ada"`، يمكننا معرفة طول المقطع النصي (string) الآتي `Ada` باستخدام `firstName.length`. # --instructions-- -استخدم خاصية `.length` لتعيين `lastNameLength` إلى عدد الأحرف في `lastName`. +استخدم خاصية `.length` لتعيين `lastNameLength` إلى عدد الرموز في `lastName`. # --hints-- diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/global-scope-and-functions.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/global-scope-and-functions.md index 922ffb963ce..d9ddc87a327 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/global-scope-and-functions.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/global-scope-and-functions.md @@ -9,9 +9,9 @@ dashedName: global-scope-and-functions # --description-- -في JavaScript، يشير النطاق إلى رؤية المتغيرات. يكون إلى المتغيرات التي تم تعريفها خارج الوظيفة نطاق يسمي شامل. وهذا يعني أنه يمكن رؤيتها في كل مكان في التعليمات البرمجية JavaScript الخاص بك. +في JavaScript، يشير النطاق إلى رؤية المتغيرات. يكون إلى المتغيرات التي تم تعريفها خارج الوظيفة مجال شامل (Global scope). وهذا يعني أنه يمكن رؤيتها في كل مكان في التعليمات البرمجية JavaScript الخاص بك. -تعلن المتغيرات دون استخدام المصطلحات الآتية `let` أو `const` وتنشئ تلقائيًا في نطاق `global`. هذا يمكن أن يؤدي إلى عواقب غير مقصودة في مكان آخر من التعليمات البرمجية الخاص بك أو عند تشغيل الوظيفة مرة أخرى. يجب عليك دائماً إعلان متغيراتك باستخدام `let` أو `const`. +تعلن المتغيرات دون استخدام المصطلحات الآتية `let` أو `const` وتنشئ تلقائيًا في مجال شامل `global`. هذا يمكن أن يؤدي إلى عواقب غير مقصودة في مكان آخر من التعليمات البرمجية الخاص بك أو عند تشغيل الوظيفة مرة أخرى. يجب عليك دائماً إعلان متغيراتك باستخدام `let` أو `const`. # --instructions-- diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/global-vs.-local-scope-in-functions.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/global-vs.-local-scope-in-functions.md index efc9557e8b7..b62dab7e6d0 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/global-vs.-local-scope-in-functions.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/global-vs.-local-scope-in-functions.md @@ -1,6 +1,6 @@ --- id: 56533eb9ac21ba0edf2244c0 -title: النطاق العام مقابل النطاق المحلي في الوظائف (Global vs. Local Scope in Functions) +title: المجال الشامل مقابل النطاق المحدد في الوظائف challengeType: 1 videoUrl: 'https://scrimba.com/c/c2QwKH2' forumTopicId: 18194 @@ -9,7 +9,7 @@ dashedName: global-vs--local-scope-in-functions # --description-- -من الممكن الحصول على متغيرات محالية (Local) و عامة (Global) بنفس الاسم. عندما تقوم ذلك، يكون المتغير المحالي (local) له الأسبقية على المتغير العام (global). +من الممكن الحصول على متغيرات محدودة (local) و شاملة (global) بنفس الاسم. عندما تقوم ذلك، يكون المتغير المحدود (local) له الأسبقية على المتغير الشامل (global). وفي هذا المثال: @@ -22,15 +22,15 @@ function myFun() { } ``` -سوف تنتج الوظيفة `myFun` السلسلة `Head` لأن النسخة المحالية (local) من المتغير موجودة. +سوف تنتج الوظيفة `myFun` المقطع النصي `Head` لأن النسخة المحدودة (local) من المتغير موجودة. # --instructions-- -أضف متغير محالي (local) إلى وظيفة `myOutfit` لتجاوز قيمة `outerWear` بالمقطع `sweater`. +أضف متغير محدود (local) إلى وظيفة `myOutfit` لتجاوز قيمة `outerWear` بالمقطع النصي `sweater`. # --hints-- -لا يجب عليك تغيير قيمة العام (global) الآتي `outerWear`. +لا يجب عليك تغيير قيمة المتغير الشامل (global) الآتي `outerWear`. ```js assert(outerWear === 'T-Shirt'); diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/initializing-variables-with-the-assignment-operator.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/initializing-variables-with-the-assignment-operator.md index 7400e13c985..6a1b80fc4f9 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/initializing-variables-with-the-assignment-operator.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/initializing-variables-with-the-assignment-operator.md @@ -1,6 +1,6 @@ --- id: 56533eb9ac21ba0edf2244a9 -title: تهيئة المتغيرات باستخدام مشغل التعيين (Initializing Variables with the Assignment Operator) +title: تهيئة المتغيرات باستخدام مشغل التعيين challengeType: 1 videoUrl: 'https://scrimba.com/c/cWJ4Bfb' forumTopicId: 301171 @@ -19,7 +19,7 @@ var myVar = 0; # --instructions-- -عرّف متغير `a` باستخدام `var` و عيّن له قيمة `9`. +أعلن متغير `a` باستخدام `var` و هيئ له قيمة `9`. # --hints-- diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/iterate-with-javascript-for-loops.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/iterate-with-javascript-for-loops.md index bce01c3e9ef..6f9323f4a62 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/iterate-with-javascript-for-loops.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/iterate-with-javascript-for-loops.md @@ -15,9 +15,9 @@ dashedName: iterate-with-javascript-for-loops تعريف حلَقات For مع ثلاث عبارات اختيارية تفصل بينها الفاصلات المنقوطة (semicolons): -`for (a; b; c)`، حيث ان `a` هي عبارة التهيئة، `b` هي عبارة الشرط، و `c` هي العبارة النهائية. +`for (a; b; c)`، حيث ان `a` هي تعبير التهيئة، `b` هي تعبير الشرط، و `c` هي العبارة النهائية. -يتم تنفيذ عبارة التهيئة مرة واحدة فقط قبل بَدْء الحلقة. يستخدم عادة لتحديد وإعداد متغير الحلقة الخاص بك. +يتم تنفيذ عبارة التهيئة مرة واحدة فقط قبل بَدْء الحلقة. يستخدم عادة لإعلان وإعداد متغير الحلقة الخاص بك. يتم تقييم عبارة الشرط في بداية كل حلقة وسوف يستمر مادام أنه يقيّم إلى `true`. عندما يكون الشرط `false` في بداية الحلقة سوف تتوقف الحلقة عن التنفيذ. هذا يعني أن إذا بدأ الشرط كزائف (false)، لن تنفذ الحلقة (loop) الخاصة بك أبدا. diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/local-scope-and-functions.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/local-scope-and-functions.md index 7cfaff9aad8..e5a2570a887 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/local-scope-and-functions.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/local-scope-and-functions.md @@ -9,9 +9,9 @@ dashedName: local-scope-and-functions # --description-- -المتغيرات التي المعلنا داخل وظيفة (function)، وكذلك الوسائط (parameters) للوظيفة لديها نطاق و يكون محلي (local). وهذا يعني أنها لا تبد مرئية إلا في إطار الوظيفة. +المتغيرات التي أعلنة داخل وظيفة (function)، وكذلك الوسائط (parameters) للوظيفة لديها مجال محدود (local). وهذا يعني أنها لا تبد مرئية إلا في إطار الوظيفة. -هذه وظيفة `myTest` مع متغير محلي يسمى `loc`. +هذه وظيفة `myTest` مع متغير محدود يسمى `loc`. ```js function myTest() { @@ -27,13 +27,13 @@ console.log(loc); # --instructions-- -يحتوي المحرر على اثنين `console.log` لمساعدتك على رؤية ما يحدث. تحقق من وحدة التحكم خلال كتابة الكود لترى كيف يتغير. اعلن متغير محلي اسمه `myVar` داخل `myLocalScope` وفعّل الاختبارات. +يحتوي المحرر على اثنين `console.log` لمساعدتك على رؤية ما يحدث. تحقق من وحدة التحكم خلال كتابة الكود لترى كيف يتغير. اعلن متغير محدود اسمه `myVar` داخل `myLocalScope` وفعّل الاختبارات. **ملاحظة:** وحدة التحكم ستظل تعرض `ReferenceError: myVar is not defined`، ولكن هذا لن يتسبب في فشل الاختبارات. # --hints-- -لا ينبغي أن يحتوي الكود على متغير عام يدعي `myVar`. +لا ينبغي أن يحتوي الكود على متغير شامل يدعي `myVar`. ```js function declared() { @@ -43,7 +43,7 @@ function declared() { assert.throws(declared, ReferenceError); ``` -يجب عليك إضافة متغير محلي يدعي `myVar`. +يجب عليك إضافة متغير محدود يدعي `myVar`. ```js assert( diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/modify-array-data-with-indexes.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/modify-array-data-with-indexes.md index dfa6cf54e9b..59938a84f1b 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/modify-array-data-with-indexes.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/modify-array-data-with-indexes.md @@ -9,7 +9,7 @@ dashedName: modify-array-data-with-indexes # --description-- -على عكس المقاطع، عناصر القائمة هي قابلة للتغيير ويمكن تغييرها بحرية، حتى لو تم تعريف القائمة بواسطة `const`. +على عكس المقاطع النصية، عناصر القائمة هي قابلة للتغيير (mutable) ويمكن تغييرها بحرية، حتى لو تم تعريف القائمة بواسطة `const`. **مثال** diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/quoting-strings-with-single-quotes.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/quoting-strings-with-single-quotes.md index fc86bbac9ec..ab7db64af61 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/quoting-strings-with-single-quotes.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/quoting-strings-with-single-quotes.md @@ -1,6 +1,6 @@ --- id: 56533eb9ac21ba0edf2244b4 -title: اقتباس مقاطع بعلامات اقتباس منفردة (Quoting Strings with Single Quotes) +title: اقتباس مقاطع بعلامات اقتباس منفردة challengeType: 1 videoUrl: 'https://scrimba.com/c/cbQmnhM' forumTopicId: 18260 @@ -31,15 +31,15 @@ const badStr = 'Finn responds, "Let's go!"'; هنا `badStr` سوف تسبب بخطأ. -في goodStr أعلاه، يمكنك استخدام أي من علامات الاقتباس بأمان باستخدام الخط المائل (backslash) الآتية `\` كرمز متحايل (escape character). +في goodStr أعلاه، يمكنك استخدام أي من علامات الاقتباس بأمان باستخدام الخط المائل (backslash) الآتية `\` كرمز التخريج (escape character). **ملاحظة:** يجب عدم الخلط بين الخط المائل (blackslash) الآتية `\` والخط المائل للأمام (forward slash) الآتية `/`. إنهم لا يفعلون الشيء نفسه. # --instructions-- -غيّر المقطع المقدم إلى مقطع مع اقتباسات فردية في البداية والنهاية وبدون رموز متحايلة (escape characters). +غيّر المقطع المقدم إلى مقطع مع اقتباسات فردية في البداية والنهاية وبدون رموز التخريج (escape characters). -الآن، العلامة `` في المقطع تستخدم اقتباسات مزدوجة في كل مكان. سوف تحتاج إلى تغيير الاقتباسات الخارجية إلى اقتباسات فردية حتى تتمكن من إزالة الرموز متحايلة (escape characters). +الآن، العلامة `` في المقطع تستخدم اقتباسات مزدوجة في كل مكان. سوف تحتاج إلى تغيير الاقتباسات الخارجية إلى اقتباسات فردية حتى تتمكن من إزالة رموز التخريج (escape characters). # --hints-- diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md index d305f50923e..5c5aa16eb7c 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md @@ -8,9 +8,9 @@ dashedName: record-collection # --description-- -لديك object literal يمثل جزءا من مجموعة سجلات موسيقية الخاصة بك. يحتوي كل سجل على رقم معرف فريد يعدّ الهُوِيَّة والعديد من الخصائص الأخرى. ليست كل السجلات لديها معلومات كاملة. +لديك حروف الكائن التي تمثل جزء من مجموعة سجلاتك الموسيقية. يحتوي كل سجل على رقم معرف فريد يعدّ الهُوِيَّة والعديد من الخصائص الأخرى. ليست كل السجلات لديها معلومات كاملة. -أنت تبدأ بالوظيفة `updateRecords` التي تأخذ object literal يدعي `records`، يحتوي على مجموعة ألبومات موسيقية. و `id`, و `prop` (مثل `artist` أو `tracks`)، و `value`. أكمل الوظيفة باستخدام القواعد أدناه لتعديل الكائن الممرر إلى الوظيفة. +أنت تبدأ بالوظيفة `updateRecords` التي تأخذ الكائن حرفي يدعي `records`، يحتوي على مجموعة ألبومات موسيقية. و `id`, و `prop` (مثل `artist` أو `tracks`)، و `value`. أكمل الوظيفة باستخدام القواعد أدناه لتعديل الكائن الممرر إلى الوظيفة. - الوظيفة الخاص بك يجب أن يرجع دائما كائن مجموعة السجلات بِرُمَّته. - إذا كان `prop` ليس `tracks` و `value` ليس مقطع فارغ، حديث أو تعيين `prop` السجلات إلى `value`. diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/return-early-pattern-for-functions.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/return-early-pattern-for-functions.md index 83f0157139c..7aec83fa65f 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/return-early-pattern-for-functions.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/return-early-pattern-for-functions.md @@ -29,7 +29,7 @@ myFun(); عدّل الوظيفة `abTest` بحيث إذا كان `a` أو `b` أقل من `0` ستنتج الوظيفة قيمة `undefined` فوراً. **تلميح** -تذكر أن تكون undefined كلمة وليست مقتطع. +تذكر أن تكون undefined مصطلح وليست مقطع نصي. # --hints-- diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/selecting-from-many-options-with-switch-statements.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/selecting-from-many-options-with-switch-statements.md index d81cc2da545..6daec49af61 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/selecting-from-many-options-with-switch-statements.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/selecting-from-many-options-with-switch-statements.md @@ -36,25 +36,25 @@ switch (lowercaseLetter) { # --hints-- -`caseInSwitch(1)` يجب أن يكون له قيمة السلسلة (string) النصية `alpha` +`caseInSwitch(1)` يجب أن يكون له قيمة المقطع (string) النصي `alpha` ```js assert(caseInSwitch(1) === 'alpha'); ``` -`caseInSwitch(2)` يجب أن يكون له قيمة السلسلة (string) النصية `beta` +`caseInSwitch(2)` يجب أن يكون له قيمة المقطع (string) النصي `beta` ```js assert(caseInSwitch(2) === 'beta'); ``` -`caseInSwitch(3)` يجب أن يكون له قيمة السلسلة (string) النصية `gamma` +`caseInSwitch(3)` يجب أن يكون له قيمة المقطع (string) النصي `gamma` ```js assert(caseInSwitch(3) === 'gamma'); ``` -`caseInSwitch(4)` يجب أن يكون له قيمة السلسلة (string) النصية `delta` +`caseInSwitch(4)` يجب أن يكون له قيمة المقطع (string) النصي `delta` ```js assert(caseInSwitch(4) === 'delta'); diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/storing-values-with-the-assignment-operator.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/storing-values-with-the-assignment-operator.md index e0180d01f20..2502ed5accb 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/storing-values-with-the-assignment-operator.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/storing-values-with-the-assignment-operator.md @@ -1,6 +1,6 @@ --- id: 56533eb9ac21ba0edf2244a8 -title: تخزين القيم مع مشغل التعيين (Storing Values with the Assignment Operator) +title: تخزين القيم مع مشغل التعيين (=) challengeType: 1 videoUrl: 'https://scrimba.com/c/cEanysE' forumTopicId: 18310 @@ -17,7 +17,7 @@ myVariable = 5; هذا يعين `Number` بقيمة `5` إلى `myVariable`. -إذا كانت هناك أي حسابات إلى يمين مشغل `=`، يتم أداء هذه حسابات قبل تعيين القيمة إلى المتغير الموجود على يسار المشغل. +إذا كانت هناك أي حسابات إلى يمين مشغل `=`، يتم أداء هذه الحسابات قبل تعيين القيمة إلى المتغير الموجود على يسار المشغل. ```js var myVar; diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/subtract-one-number-from-another-with-javascript.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/subtract-one-number-from-another-with-javascript.md index 9614b3609db..5656103ee81 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/subtract-one-number-from-another-with-javascript.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/subtract-one-number-from-another-with-javascript.md @@ -1,6 +1,6 @@ --- id: cf1111c1c11feddfaeb4bdef -title: طرح رقم من الآخر باستخدام JavaScript +title: طرح رَقَم من رَقَم آخر باستخدام JavaScript challengeType: 1 videoUrl: 'https://scrimba.com/c/cP3yQtk' forumTopicId: 18314 @@ -9,7 +9,7 @@ dashedName: subtract-one-number-from-another-with-javascript # --description-- -يمكننا أيضا أن نطرح رقما من الآخر. +يمكننا أيضا أن نطرح رقما من رقما آخر. يستخدم JavaScript رمز `-` للطرح. @@ -26,13 +26,13 @@ const myVar = 12 - 6; # --hints-- -يجب أن يساوي `difference` قيمة 12. +يجب أن يساوى المتغير `difference` لقيمة `12`. ```js assert(difference === 12); ``` -يجب عليك طرح رَقَم واحد فقط من 45. +يجب أن تطرح رَقَم واحد فقط من `45`. ```js assert(/difference=45-33;?/.test(__helpers.removeWhiteSpace(code))); diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-boolean-values.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-boolean-values.md index 5df0a28bef3..b3220d4f94d 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-boolean-values.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-boolean-values.md @@ -1,6 +1,6 @@ --- id: bd7123c9c441eddfaeb5bdef -title: فهم الحالات المنطقية (Understanding Boolean Values) +title: فهم الحالات المنطقية challengeType: 1 videoUrl: 'https://scrimba.com/c/c9Me8t4' forumTopicId: 301176 diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-case-sensitivity-in-variables.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-case-sensitivity-in-variables.md index 1ba75aab9cd..29ec1dd4870 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-case-sensitivity-in-variables.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-case-sensitivity-in-variables.md @@ -1,6 +1,6 @@ --- id: 56533eb9ac21ba0edf2244ab -title: فهم حساسية الحالة الحروف في المتغيرات (Understanding Case Sensitivity in Variables) +title: فهم حساسية الحالة الحروف في المتغيرات challengeType: 1 videoUrl: 'https://scrimba.com/c/cd6GDcD' forumTopicId: 18334 @@ -39,7 +39,7 @@ var thisVariableNameIsSoLong; assert(typeof studlyCapVar !== 'undefined' && studlyCapVar === 10); ``` -يجب أن يتم تعريف`properCamelCase` وأن تكون له قيمة `A String` بنوع مقطع. +يجب أن يتم تعريف`properCamelCase` وأن تكون له قيمة المقطع النصي `A String`. ```js assert( diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-undefined-value-returned-from-a-function.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-undefined-value-returned-from-a-function.md index bb19d74f0ba..0c6866e2ffe 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-undefined-value-returned-from-a-function.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-undefined-value-returned-from-a-function.md @@ -1,6 +1,6 @@ --- id: 598e8944f009e646fc236146 -title: فهم القيم غير المحددة المرتجعة من الوظيفة (Understanding Undefined Value returned from a Function) +title: فهم القيم غير المحددة المرتجعة من الوظيفة challengeType: 1 videoUrl: 'https://scrimba.com/c/ce2p7cL' forumTopicId: 301177 @@ -23,7 +23,7 @@ function addSum(num) { addSum(3); ``` -تكون `addSum` وظيفة دون `return`. سيغير وظيفة المتغير `sum` العالمي الآتي, ولكن تكون القيمة المرتجعة للوظيفة `undefined`. +تكون `addSum` وظيفة دون `return`. ستغير الوظيفة المتغير الشامل `sum`، ولكن تكون القيمة المرتجعة للوظيفة `undefined`. # --instructions-- diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-uninitialized-variables.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-uninitialized-variables.md index acc2aeea56c..d29ad8efa70 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-uninitialized-variables.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-uninitialized-variables.md @@ -1,6 +1,6 @@ --- id: 56533eb9ac21ba0edf2244aa -title: فهم المتغيرات غير المهيأة (Understanding Uninitialized Variables) +title: فهم المتغيرات غير المهيأة challengeType: 1 videoUrl: 'https://scrimba.com/c/cBa2JAL' forumTopicId: 18335 @@ -9,7 +9,7 @@ dashedName: understanding-uninitialized-variables # --description-- -عند الإعلان المتغيرات في JavaScript، يكون لها قيمة أولية وهي `undefined`. إذا قمت بعملية رياضية على متغير `undefined` ستكون نتيجتك `NaN` مما يعني "Not a Number" إي "ليس رقما". إذا ربط مقطع مع متغير `undefined`، فستحصل على مقطع بقيمة `undefined`. +عند إعلان المتغيرات في JavaScript، يكون لها قيمة أولية وهي `undefined`. إذا قمت بعملية رياضية على متغير قيمته `undefined` ستكون نتيجتك `NaN` مما يعني "Not a Number" إي "ليس رقما". إذا ربط مقطع نصي مع متغير `undefined`، فستحصل على مقطع نصي بقيمة `undefined`. # --instructions-- diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/updating-object-properties.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/updating-object-properties.md index 4bd3ae7b170..9c4f3faf517 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/updating-object-properties.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/updating-object-properties.md @@ -9,7 +9,7 @@ dashedName: updating-object-properties # --description-- -بعد إنشاء كائن JavaScript، يمكنك تحديث خصائصه في أي وقت كما يمكنك تحديث أي متغير آخر. يمكنك استخدام أي من تدوين النِّقَاط أو تدوين الأقواس المعكوفان (dot or bracket notation). +بعد إنشاء كائن JavaScript، يمكنك تحديث خصائصه في أي وقت كما يمكنك تحديث أي متغير آخر. يمكنك استخدام أي من رمز النقطة أو علامات الأقواس (dot or bracket notation). على سبيل المثال، دعونا ننظر إلى `ourDog`: @@ -26,7 +26,7 @@ const ourDog = { # --instructions-- -حدث خاصية اسم الكائن `myDog`. غيّر اسمه من `Coder` إلى `Happy Coder`. يمكنك استخدام أي من تدوين النِّقَاط أو تدوين الأقواس المعكوفان (dot or bracket notation). +حدث خاصية اسم الكائن `myDog`. غيّر اسمه من `Coder` إلى `Happy Coder`. يمكنك استخدام أي من رمز النقطة أو علامات الأقواس (dot or bracket notation). # --hints-- diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-first-character-in-a-string.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-first-character-in-a-string.md index a28608ed664..46e3b43b08e 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-first-character-in-a-string.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-first-character-in-a-string.md @@ -1,6 +1,6 @@ --- id: bd7123c9c549eddfaeb5bdef -title: استخدم رمز الاقواس للعثور على اول حرف في مقطع (Use Bracket Notation to Find the First Character in a String) +title: استخدم علامات الأقواس للعثور على اول حرف في مقطع challengeType: 1 videoUrl: 'https://scrimba.com/c/ca8JwhW' forumTopicId: 18341 @@ -9,7 +9,7 @@ dashedName: use-bracket-notation-to-find-the-first-character-in-a-string # --description-- -القوسان المعكوفان هي طريقة للحصول على رمز في ترتيب معين داخل المقطع. +القوسان المعكوفان هي طريقة للحصول على رمز في ترتيب معين داخل مقطع نصي. معظم لغات البرمجة الحديثة، مثل JavaScript، لا تبدأ في العد من 1 كما يفعل البشر. إنهم يبدؤون عند الصفر. يشار إلى هذا بالترتيب مبني على الصفر. @@ -38,7 +38,7 @@ const firstLetter = firstName[0]; assert(firstLetterOfLastName === 'L'); ``` -يجب عليك استخدام رمز الأقواس المعكوفان. +يجب عليك استخدام علامات الأقواس. ```js assert(code.match(/firstLetterOfLastName\s*=\s*lastName\s*\[\s*\d\s*\]/)); diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-last-character-in-a-string.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-last-character-in-a-string.md index 12d33734835..229a4c6c1f3 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-last-character-in-a-string.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-last-character-in-a-string.md @@ -1,6 +1,6 @@ --- id: bd7123c9c451eddfaeb5bdef -title: استخدم رمز آلأقواس (Bracket Notation) للعثور على آخر حرف في سلسلة (String) +title: استخدم علامات الأقواس (Bracket Notation) للعثور على آخر حرف في مقطع نصي (String) challengeType: 1 videoUrl: 'https://scrimba.com/c/cBZQGcv' forumTopicId: 18342 @@ -9,7 +9,7 @@ dashedName: use-bracket-notation-to-find-the-last-character-in-a-string # --description-- -للحصول على آخر حرف من سلسلة (String)، يمكنك طرح واحد من طول السلسلة (String). +للحصول على آخر حرف من المقطع النصي (String)، يمكنك طرح واحد من طوله. على سبيل المثال، إذا `const firstName = "Ada"`، يمكنك الحصول على قيمة الحرف الأخير من السلسلة باستخدام `firstName[firstName.length - 1]`. @@ -24,7 +24,7 @@ const lastLetter = firstName[firstName.length - 1]; # --instructions-- -استخدم رمز الأقواس للعثور على الحرف الأخير في المتغير `lastName`. +استخدم علامات الأقواس للعثور على الحرف الأخير في المتغير `lastName`. **تلميح:** حاول النظر إلى المثال أعلاه إذا كنت عالق. diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-nth-character-in-a-string.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-nth-character-in-a-string.md index df2d282fa50..2090c7ed513 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-nth-character-in-a-string.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-nth-character-in-a-string.md @@ -1,6 +1,6 @@ --- id: bd7123c9c450eddfaeb5bdef -title: استخدم رمز آلأقواس المعكوفان للعثور على حرف معين في مقطع +title: استخدم علامات الأقواس للعثور على حرف معين في مقطع challengeType: 1 videoUrl: 'https://scrimba.com/c/cWPVJua' forumTopicId: 18343 @@ -9,7 +9,7 @@ dashedName: use-bracket-notation-to-find-the-nth-character-in-a-string # --description-- -يمكنك أيضًا استخدام رمز الأقواس المعكوفان للحصول على الحرف في مواقع أخرى داخل مقطع. +يمكنك أيضًا استخدام علامات الأقواس للحصول على الحرف في مواقع أخرى داخل مقطع. تذكر أن أجهزة الكمبيوتر تبدأ في العد في `0`، لذا فإن الحرف الأول هو في الواقع الحرف صفر. @@ -24,7 +24,7 @@ const secondLetterOfFirstName = firstName[1]; # --instructions-- -دعونا نحاول تعيين `thirdLetterOfLastName` مساوية للحرف الثالث من متغير `lastName` باستخدام رمز آلأقواس المعكوفان. +دعونا نحاول تعيين `thirdLetterOfLastName` مساوية للحرف الثالث من متغير `lastName` باستخدام علامات الأقواس. **تلميح:** حاول النظر إلى المثال أعلاه إذا كنت عالق. @@ -36,7 +36,7 @@ const secondLetterOfFirstName = firstName[1]; assert(thirdLetterOfLastName === 'v'); ``` -يجب عليك استخدام رمز آلأقواس المعكوفان. +يجب عليك استخدام علامات الأقواس. ```js assert(code.match(/thirdLetterOfLastName\s*=\s*lastName\s*\[\s*\d\s*\]/)); diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-nth-to-last-character-in-a-string.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-nth-to-last-character-in-a-string.md index d1054668e31..1c74d73de88 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-nth-to-last-character-in-a-string.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-nth-to-last-character-in-a-string.md @@ -1,6 +1,6 @@ --- id: bd7123c9c452eddfaeb5bdef -title: استخدم رمز آلأقواس المعكوفان للعثور على حرف معين قبل الأخر في مقطع +title: استخدم علامات الأقواس للعثور على رمز معين قبل الأخر في المقطع النصي challengeType: 1 videoUrl: 'https://scrimba.com/c/cw4vkh9' forumTopicId: 18344 @@ -24,7 +24,7 @@ const thirdToLastLetter = firstName[firstName.length - 3]; # --instructions-- -استخدم رمز آلأقواس المعكوفان للعثور على الحرف الثاني إلى الأخير في مقطع `lastName`. +استخدم علامات الأقواس للعثور على الحرف الثاني إلى الأخير في مقطع `lastName`. **تلميح:** حاول النظر إلى المثال أعلاه إذا كنت عالق. diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/use-multiple-conditional-ternary-operators.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/use-multiple-conditional-ternary-operators.md index 4253e56fa1a..c092d0dc54d 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/use-multiple-conditional-ternary-operators.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/use-multiple-conditional-ternary-operators.md @@ -37,7 +37,7 @@ function findGreaterOrEqual(a, b) { } ``` -ويعدّ من أفضل الممارسات تشكيل متعهدين شرطيين متعددين، بحيث يكون كل شرط على خط منفصل، كما هو مبين أعلاه. استخدام عدة مشغلين مشروطين دون إهدار مناسب قد يجعل من الصعب قراءة التعليمات البرمجية الخاصة بك. على سبيل المثال: +ويعدّ من أفضل الممارسات تشكيل متعهدين شرطيين متعددين، بحيث يكون كل شرط على خط منفصل، كما هو مبين أعلاه. استخدام عدة مشغلين مشروطين دون إهدار مناسب قد يجعل من الصعب قراءة الكود الخاص بك. على سبيل المثال: ```js function findGreaterOrEqual(a, b) { diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/use-recursion-to-create-a-countdown.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/use-recursion-to-create-a-countdown.md index 73a20dc54bb..83e94e1dbc6 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/use-recursion-to-create-a-countdown.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/use-recursion-to-create-a-countdown.md @@ -71,7 +71,7 @@ assert( ); ``` -لا ينبغي استخدام المتغيرات العالمية (Global variables) للتخزين المؤقت القائمة (array). +لا ينبغي استخدام المتغيرات الشاملة (Global variables) للتخزين المؤقت للقائمة (array). ```js countdown(1) diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/use-recursion-to-create-a-range-of-numbers.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/use-recursion-to-create-a-range-of-numbers.md index 924c8b46b5b..833632939db 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/use-recursion-to-create-a-range-of-numbers.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/use-recursion-to-create-a-range-of-numbers.md @@ -56,7 +56,7 @@ assert.deepStrictEqual(rangeOfNumbers(6, 9), [6, 7, 8, 9]); assert.deepStrictEqual(rangeOfNumbers(4, 4), [4]); ``` -لا ينبغي استخدام المتغيرات العالمية (Global variables) للتخزين المؤقت القائمة (array). +لا ينبغي استخدام المتغيرات الشاملة (Global variables) للتخزين المؤقت للقائمة (array). ```js rangeOfNumbers(1, 3) diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/debugging/catch-mixed-usage-of-single-and-double-quotes.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/debugging/catch-mixed-usage-of-single-and-double-quotes.md index cb9774663ee..d465c870265 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/debugging/catch-mixed-usage-of-single-and-double-quotes.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/debugging/catch-mixed-usage-of-single-and-double-quotes.md @@ -1,6 +1,6 @@ --- id: 587d7b84367417b2b2512b37 -title: إدراك الاستخدام المختلط لعلامات التنصيص الفردية والزوجية (Catch Mixed Usage of Single and Double Quotes) +title: إدراك الاستخدام المختلط لعلامات التنصيص الفردية والزوجية challengeType: 1 forumTopicId: 301188 dashedName: catch-mixed-usage-of-single-and-double-quotes @@ -10,7 +10,7 @@ dashedName: catch-mixed-usage-of-single-and-double-quotes يسمح JavaScript باستخدام كلا علامات التنصيص، الفردية (`'`) والزوجية (`"`) لإعلان المقطع النصي (string). انتقاء أحد الخيارين هو تفضيل شخصي، مع بعض الاستثناءات. -وجدود الخيارين مجدٍ عندما يحوي المقطع اختصارات أو نص آخر داخل علامات تنصيص. فقط كن حذراً من إغلاق المقطع مبكراً، مما يسبب خطأ في تركيب الجملة. +وجدود الخيارين مجدٍ عندما يحوي المقطع النصي اختصارات أو نص آخر داخل علامات تنصيص. فقط كن حذراً من إغلاق المقطع مبكراً، مما يسبب خطأ في تركيب الجملة. فيما يلي بعض الأمثلة على خلط علامات التنصيص: @@ -22,7 +22,7 @@ const uhOhGroucho = 'I've had a perfectly wonderful evening, but this wasn't it. أما الاثنان الأولان فهما صحيحان، ولكن الثالث غير صحيح. -وبطبيعة الحال، لا بأس من الاستمرار على نوع واحد من علامات التنصيص. يمكنك التعامل مع علامات التنصيص داخل المقطع باستخدام رمز التحايل (`\`): +وبطبيعة الحال، لا بأس من الاستمرار على نوع واحد من علامات التنصيص. يمكنك التعامل مع علامات التنصيص داخل المقطع النصي باستخدام رمز التخريج (`\`): ```js const allSameQuotes = 'I\'ve had a perfectly wonderful evening, but this wasn\'t it.'; @@ -30,11 +30,11 @@ const allSameQuotes = 'I\'ve had a perfectly wonderful evening, but this wasn\'t # --instructions-- -أصلح المقطع بحيث يستخدم علامات تنصيص مختلفة لقيمة `href` أو تحايل على علامات التنصيص الموجودة. حافظ على علامات التنصيص المزدوجة حول المقطع كُلََّه. +أصلح المقطع النصي بحيث يستخدم علامات تنصيص مختلفة لقيمة `href` أو أخرج علامات التنصيص الموجودة. حافظ على علامات التنصيص المزدوجة حول المقطع كُلََّه. # --hints-- -يجب أن يصلح الكود الخاص بك علامات التنصيص حول قيمة `href` وهي `#Home` إما بتغييرها أو معالجتها برمز التحايل (\). +يجب أن يصلح الكود الخاص بك علامات التنصيص حول قيمة `href` وهي `#Home` إما بتغييرها أو معالجتها برمز التخريج (\). ```js assert(code.match(//g)); diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/debugging/catch-unclosed-parentheses-brackets-braces-and-quotes.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/debugging/catch-unclosed-parentheses-brackets-braces-and-quotes.md index 78f9424726d..5f122ece22f 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/debugging/catch-unclosed-parentheses-brackets-braces-and-quotes.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/debugging/catch-unclosed-parentheses-brackets-braces-and-quotes.md @@ -1,6 +1,6 @@ --- id: 587d7b84367417b2b2512b36 -title: 'التقاط الاقواس و الاقتباسات الغير مغلقة (Catch Unclosed Parentheses, Brackets, Braces and Quotes)' +title: 'التقاط الاقواس و الاقتباسات الغير مغلقة' challengeType: 1 forumTopicId: 301190 dashedName: catch-unclosed-parentheses-brackets-braces-and-quotes @@ -8,7 +8,7 @@ dashedName: catch-unclosed-parentheses-brackets-braces-and-quotes # --description-- -يجب أن تكون على علم بخطأ آخر في بناء الجملة, هو أن جميع الأقواس الافتتاحية، والأقواس المعقوفة، والاقتباسات تحتوي على زوج إقفال. يحدث نسيان قطعة ما عندما تحرير كود موجود وإدخال عناصر بأحد أنواع الأزواج. أيضًا، كن حذرًا عند دمج مجموعة الكود في أخري، مثل إضافة وظيفة تعيد التفعيل كحجة إلى طريقة. +يجب أن تكون على علم بخطأ آخر في بناء الجملة, هو أن جميع الأقواس الافتتاحية، والأقواس المعكوفة، والاقتباسات تحتوي على زوج إقفال. يحدث نسيان قطعة ما عندما تحرير كود موجود وإدخال عناصر بأحد أنواع الأزواج. أيضًا، كن حذرًا عند دمج مجموعة الكود في أخري، مثل إضافة وظيفة تعيد التفعيل كحجة إلى طريقة. إحدى الطرق لتجنب هذا الخطأ هي بمجرد كتابة الرمز الافتتاحي، قم على الفور بكتابة رمز الإغلاق، ثم قم بتحريك المؤشر مرة أخرى بينهما، ثم استمر في البرمجة. لحسن الحظ، فإن معظم برامج تحرير الكود الحديثة تولد النصف الثاني من الزوج تلقائيًا. diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/debugging/catch-use-of-assignment-operator-instead-of-equality-operator.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/debugging/catch-use-of-assignment-operator-instead-of-equality-operator.md index ca6cc699cf2..b5237232346 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/debugging/catch-use-of-assignment-operator-instead-of-equality-operator.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/debugging/catch-use-of-assignment-operator-instead-of-equality-operator.md @@ -10,7 +10,7 @@ dashedName: catch-use-of-assignment-operator-instead-of-equality-operator البرامج المتفرعة، أي تلك الذي تقوم بأشياء مختلفة إذا تم الوفاء بشروط معينة، تعتمد على بيانات `if`, و `else if`, و `else` في JavaScript. يأخذ الشرط أحيانًا شكل اختبار ما إذا كانت النتيجة مساوية لقيمة. -هذا المنطق ينطق (باللغة الإنجليزية، على الأقل) كـ "... if x equals y, then" الذي يمكن ترجمته حرفيا إلى كود باستخدام `=` أو مشغل التعيين. هذا يؤدي إلى جعل برنامجك يعمل بشكل غير متوقع. +هذا المنطق ينطق (باللغة الإنجليزية، على الأقل) كـ "... if x equals y, then" الذي يمكن ترجمته حرفية إلى كود باستخدام `=` أو مشغل التعيين. هذا يؤدي إلى جعل برنامجك يعمل بشكل غير متوقع. كما تم تغطيته في التحديات السابقة، يقوم مشغل التعيين (`=`) في JavaScript بإسناد قيمة إلى اسم متغير. و يقوم المشغلون `==` و `===` بالتحقق من المساواة (الثلاثية `===` تتحقق من المساواة الصارمة بمعنى أن كل من القيمة والنوع يطبقان). diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/compare-scopes-of-the-var-and-let-keywords.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/compare-scopes-of-the-var-and-let-keywords.md index 97c526e1997..31f80c53dc6 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/compare-scopes-of-the-var-and-let-keywords.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/compare-scopes-of-the-var-and-let-keywords.md @@ -10,7 +10,7 @@ dashedName: compare-scopes-of-the-var-and-let-keywords إذا كانت `let` غير مألوف، تحقق هذا التحدي عن أختلاف بين كلمة (let) وكلمة (var). -عندما تعلن متغير باستخدام كلمة `var`، يتم الإعلان عنه عالميًا (declared globally)، أو محليًا (locally) إذا تم الإعلان عنه داخل وظيفة (function). +عندما تعلن متغير باستخدام كلمة `var`، يكون للمتغير مجال شامل (global scope)، أو إذا تم الإعلان عنه داخل وظيفة (function) فمجاله محدد (local scope). كلمة `let` تتصرف بالمثل، ولكن مع بعض الميزات الإضافية. عندما تعلن متغير باستخدام `let` داخل الكتلة أو تعبير أو عبارة، فنطاق المتغير يقتصر على تلك الكتلة (block) أو التعبير (statement) أو العبارة (expression). @@ -27,7 +27,7 @@ console.log(i); هنا ستعرض وحدة التحكم القيم `[0, 1, 2]` و `3`. -مع كلمة `var`، يتم الإعلان عن `i` عالميا. لذلك عندما يتم تنفيذ `i++`، فإنه يحدث المتغير العالمي. وهذا الكود مماثل لما يلي: +مع كلمة `var`، يتم الإعلان الشامل عن `i`. لذلك عندما يتم تنفيذ `i++`، فإنه يحدث المتغير الشامل. وهذا الكود مماثل لما يلي: ```js var numArray = []; @@ -41,7 +41,7 @@ console.log(i); هنا ستعرض وحدة التحكم القيم `[0, 1, 2]` و `3`. -هذا السلوك سوف يسبب مشكلات إذا كنت تريد إنشاء وظيفة وتخزينها لاستخدامها لاحقاً داخل حلقة `for` تستخدم متغير `i`. هذا لأن الوظيفة المخزنة سوف تشير دائما إلى قيمة متغير `i` العالمي المحدث. +هذا السلوك سوف يسبب مشكلات إذا كنت تريد إنشاء وظيفة وتخزينها لاستخدامها لاحقاً داخل حلقة `for` تستخدم متغير `i`. هذا لأن الوظيفة المخزنة سوف تشير دائما إلى قيمة متغير `i` الشامل المحدث. ```js var printNumTwo; @@ -57,7 +57,7 @@ console.log(printNumTwo()); هنا ستعرض وحدة التحكم القيمة `3`. -كما تري، `printNumTwo()` يطبع 3 وليس 2. هذا لأن القيمة التي تم تعيينها إلى `i` تم تحديثها و `printNumTwo()` يرجع القيمة `i` العالمية وليس القيمة التي احتواها `i` عندما تم إنشاء الوظيفة في حلقة التكرار. لا تتبع كلمة `let` هذا السلوك: +كما تري، `printNumTwo()` يطبع 3 وليس 2. هذا لأن القيمة التي تم تعيينها إلى `i` تم تحديثها و `printNumTwo()` يرجع القيمة الشاملة `i` وليس القيمة التي احتواها `i` عندما تم إنشاء الوظيفة في حلقة التكرار. لا تتبع كلمة `let` هذا السلوك: ```js let printNumTwo; @@ -74,7 +74,7 @@ console.log(i); هنا ستعرض وحدة التحكم القيمة `2`، وخطأ `i is not defined`. -`i` غير معرف لأنه لم يتم إعلانه في النطاق العالمي (global scope). تم الإعلان عنه فقط ضمن حلقة `for`. أنتج `printNumTwo()` القيمة الصحيحة لأن ثلاث متغيرات `i` مختلفة مع قيم فريدة (0, 1, و 2) تم إنشاؤها بواسطة `let` داخل كود الحلقة التكرارية. +`i` غير معروف لأنه لم يتم إعلانه في المجال الشامل (global scope). تم الإعلان عنه فقط ضمن حلقة `for`. أنتج `printNumTwo()` القيمة الصحيحة لأن ثلاث متغيرات `i` مختلفة مع قيم فريدة (0, 1, و 2) تم إنشاؤها بواسطة `let` داخل كود الحلقة التكرارية. # --instructions-- @@ -90,7 +90,7 @@ console.log(i); assert(!code.match(/var/g)); ``` -المتغير `i` المعلن عنه في `if` يجب أن يساوي المقطع `block scope`. +المتغير `i` المعلن عنه في `if` يجب أن يساوي المقطع النصي `block scope`. ```js assert(code.match(/(i\s*=\s*).*\s*.*\s*.*\1('|")block\s*scope\2/g)); diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/complete-a-promise-with-resolve-and-reject.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/complete-a-promise-with-resolve-and-reject.md index dc36332f1b1..489ce5d4552 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/complete-a-promise-with-resolve-and-reject.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/complete-a-promise-with-resolve-and-reject.md @@ -24,7 +24,7 @@ const myPromise = new Promise((resolve, reject) => { # --instructions-- -اجعل كائن promise يتعامل مع النجاح والفشل. إذا كان `responseFromServer` صحيحاً `true`، ففعيل طريقة `resolve` لإكمال كائن promise بنجاح. مرر `resolve` إلى سلسلة (string) نصية بقيمة `We got the data`. إذا كانت حالة `responseFromServer` بنوع `false`، استخدم طريقة `reject` كبديل و مررها المقطع النصي (string) الآتي: `Data not received`. +اجعل كائن promise يتعامل مع النجاح والفشل. إذا كان `responseFromServer` صحيحاً `true`، ففعيل طريقة `resolve` لإكمال كائن promise بنجاح. مرر `resolve` مقطع نصي بقيمة `We got the data`. إذا كانت حالة `responseFromServer` بقيمة `false`، استخدم طريقة `reject` كبديل و مررها المقطع النصي (string) الآتي: `Data not received`. # --hints-- diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/create-an-export-fallback-with-export-default.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/create-an-export-fallback-with-export-default.md index 8ea2178925a..dbe392ddf58 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/create-an-export-fallback-with-export-default.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/create-an-export-fallback-with-export-default.md @@ -30,7 +30,7 @@ export default function(x, y) { # --instructions-- -الدالة التالية يجب أن تكون القيمة الاحتياطية للـ module. الرجاء إضافة الكود اللازم للقيام بذلك. +الوظيفة التالية يجب أن تكون القيمة الاحتياطية للـ module. الرجاء إضافة الكود اللازم للقيام بذلك. # --hints-- diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/create-strings-using-template-literals.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/create-strings-using-template-literals.md index 8231fc497e4..7888fc820cc 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/create-strings-using-template-literals.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/create-strings-using-template-literals.md @@ -1,6 +1,6 @@ --- id: 587d7b8a367417b2b2512b4e -title: Create Strings using Template Literals +title: إنشاء المقاطع النصية باستخدام قوالب النصوص challengeType: 1 forumTopicId: 301200 dashedName: create-strings-using-template-literals @@ -28,7 +28,7 @@ console.log(greeting); ستعرض وحدة التحكم السلاسل `Hello, my name is Zodiac Hasbro!` و `I am 56 years old.`. -لقد حدث الكثير من الأشياء هنا. أولاً، يستخدم المثال الـ backticks الآتية (`` ` ``)، وليس علامات الاقتباس (`'` أو `"`) لاحتواء الـ string. ثانياً، لاحظ أن الـ string متعدد الأسطر في كل من الكود والناتج. هذا يوفر من إدخال `\n` داخل الـ strings. بناء الجملة `${variable}` المستخدم أعلاه هو placeholder. بشكل أساسي، لن تضطر إلى استخدام التسلسل مع عامل التشغيل `+` بعد الآن. لإضافة متغيرات إلى الـ strings، فقط قم بإسقاط المتغير في template string و حاوطه بـ `${` و `}`. وبالمثل، يمكنك تضمين عبارات أخرى في الـ string literal، على سبيل المثال `${a + b}`. هذه الطريقة الجديدة لإنشاء الـ strings تمنحك المزيد من المرونة لإنشاء strings قوية. +لقد حدث الكثير من الأشياء هنا. أولاً، يستخدم المثال الـ backticks الآتية (`` ` ``)، وليس علامات الاقتباس (`'` أو `"`) لاحتواء المقطع النصي. ثانياً، لاحظ أن الـ string متعدد الأسطر في كل من الكود والناتج. هذا يوفر من إدخال `\n` داخل الـ strings. بناء الجملة `${variable}` المستخدم أعلاه هو placeholder. بشكل أساسي، لن تضطر إلى استخدام التسلسل مع عامل التشغيل `+` بعد الآن. لإضافة متغيرات إلى الـ strings، فقط قم بإسقاط المتغير في template string و حاوطه بـ `${` و `}`. وبالمثل، يمكنك تضمين عبارات أخرى في الـ string literal، على سبيل المثال `${a + b}`. هذه الطريقة الجديدة لإنشاء الـ strings تمنحك المزيد من المرونة لإنشاء strings قوية. # --instructions-- @@ -66,7 +66,7 @@ assert( ); ``` -وينبغي استخدام Template strings و expression interpolation. +وينبغي استخدام template strings و expression interpolation. ```js (getUserInput) => assert(getUserInput('index').match(/(`.*\${.*}.*`)/)); diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/reuse-javascript-code-using-import.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/reuse-javascript-code-using-import.md index b82f70a7ae6..9736be2f19e 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/reuse-javascript-code-using-import.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/reuse-javascript-code-using-import.md @@ -14,7 +14,7 @@ dashedName: reuse-javascript-code-using-import import { add } from './math_functions.js'; ``` -هنا ، `import` سوف تجد `add` في `math_functions.js`، قم باستيراد هذه الدالة فقط لاستخدامها، وتجاهل البقية. الكود `./` يخبر الـ import بالبحث عن ملف `math_functions.js` في نفس المجلد مثل الملف الحالي. مسار الملف النسبي (`./`) وملحق الملف (`.js`) مطلوبين عند استخدام الاستيراد بهذه الطريقة. +هنا ، `import` سوف تجد `add` في `math_functions.js`، قم باستيراد هذه الوظيفة فقط لاستخدامها، وتجاهل البقية. الكود `./` يخبر الـ import بالبحث عن ملف `math_functions.js` في نفس المجلد مثل الملف الحالي. مسار الملف النسبي (`./`) وملحق الملف (`.js`) مطلوبين عند استخدام الاستيراد بهذه الطريقة. يمكنك استيراد أكثر من عنصر واحد من الملف عن طريق إضافته في بيان `import` مثل هذا: @@ -24,7 +24,7 @@ import { add, subtract } from './math_functions.js'; # --instructions-- -أضف بيان `import` المناسب الذي سيسمح للملف الحالي باستخدام الدوال `uppercaseString` و `lowercaseString` التي قمت بتصديرها في الدرس السابق. هذه الدوال موجودة في ملف يسمى `string_functions.js`، وهو في نفس المجلد مثل الملف الحالي. +أضف بيان `import` المناسب الذي سيسمح للملف الحالي باستخدام الوظائف `uppercaseString` و `lowercaseString` التي قمت بتصديرها في الدرس السابق. هذه الوظائف موجودة في ملف يسمى `string_functions.js`، وهو في نفس المجلد مثل الملف الحالي. # --hints-- diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/use-arrow-functions-to-write-concise-anonymous-functions.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/use-arrow-functions-to-write-concise-anonymous-functions.md index 0f42e31706b..09e37c61eaa 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/use-arrow-functions-to-write-concise-anonymous-functions.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/use-arrow-functions-to-write-concise-anonymous-functions.md @@ -1,6 +1,6 @@ --- id: 587d7b87367417b2b2512b43 -title: استخدام Arrow Functions لكتابة الدوال المجهولة الموجزة (Use Arrow Functions to Write Concise Anonymous Functions) +title: استخدام Arrow Functions لكتابة الوظائف المجهولة الموجزة challengeType: 1 forumTopicId: 301211 dashedName: use-arrow-functions-to-write-concise-anonymous-functions diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/use-the-spread-operator-to-evaluate-arrays-in-place.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/use-the-spread-operator-to-evaluate-arrays-in-place.md index 86753be22b5..8fb930aa580 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/use-the-spread-operator-to-evaluate-arrays-in-place.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/use-the-spread-operator-to-evaluate-arrays-in-place.md @@ -8,7 +8,7 @@ dashedName: use-the-spread-operator-to-evaluate-arrays-in-place # --description-- -يقدم ES6 مشغل الانتشار (spread operator)، الذي يسمح لنا بتوسيع القوائم (arrays) وغيرها من التعبيرات في الأماكن التي يتوقع أن تكون فيها وسائط (parameters) أو عناصر متعددة. +يقدم ES6 مشغل الانتشار (spread operator)، الذي يسمح لنا بتوسيع القوائم (arrays) وغيرها من العبارات في الأماكن التي يتوقع أن تكون فيها وسائط (parameters) أو عناصر متعددة. كود ES5 أدناه يستخدم `apply()` لحساب القيمة القصوى في الـ array: diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/write-concise-object-literal-declarations-using-object-property-shorthand.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/write-concise-object-literal-declarations-using-object-property-shorthand.md index dc73482bf70..34f8eb6c31b 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/write-concise-object-literal-declarations-using-object-property-shorthand.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/write-concise-object-literal-declarations-using-object-property-shorthand.md @@ -8,7 +8,7 @@ dashedName: write-concise-object-literal-declarations-using-object-property-shor # --description-- -يضيف ES6 بعض الدعم اللطيف لتعريف الـ objects بسهولة. +يضيف ES6 بعض الدعم اللطيف لتعريف الكائنات بسهولة. ضع في اعتبارك الكود التالي: @@ -27,7 +27,7 @@ const getMousePosition = (x, y) => ({ x, y }); # --instructions-- -قم باستخدام خاصية الـ object القصير مع object literals لإنشاء وإرجاع object بخصائص `name` و `age` و `gender`. +استخدم خاصية الكائن المختصرة مع حروف الكائن لإنشاء كائن بخصائص `name`, و `age`, و `gender`. # --hints-- diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/avoid-mutations-and-side-effects-using-functional-programming.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/avoid-mutations-and-side-effects-using-functional-programming.md index de8bd07cca8..f4ecfcd7f32 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/avoid-mutations-and-side-effects-using-functional-programming.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/avoid-mutations-and-side-effects-using-functional-programming.md @@ -8,13 +8,13 @@ dashedName: avoid-mutations-and-side-effects-using-functional-programming # --description-- -إذا لم تكتشف ذلك سلفًا، المشكلة في التحدي السابق كانت مع استدعاء `splice` في وظيفة `tabClose()`. لسوء الحظ، يغير `splice` القائمة (array) الأصلية عند تفعيل الوظيفة، لذا ففي التفعيل الثاني لها استخدمت القائمة (array) المعدلة، وأعطت نتائج غير متوقعة. +إذا لم تكتشف ذلك سلفًا، المشكلة في التحدي السابق كانت مع استدعاء `splice` في وظيفة `tabClose()`. لسوء الحظ، `splice` يغير القائمة (array) الأصلية التي فُعِل عليها، لذا التفعيل الثاني له استخدم القائمة (array) المعدلة، وأعطى نتائج غير متوقعة. -هذا مثال صغير لنمط أكبر بكثير- يمكنك تفعيل وظيفة (function) للتأثير على متغير (variable)، أو قائمة (array)، أو كائن(object)، وتغير الوظيفة المتغير أو شيء ما في الكائن. +هذا مثال صغير لنمط أكبر بكثير- يمكنك تفعيل وظيفة (function) للتأثير على متغير (variable)، أو قائمة (array)، أو كائن (object). وتغير الوظيفة المتغير أو شيء ما في الكائن. -وأحد المبادئ الأساسية للبرمجة الوظيفية هو عدم تغيير الأشياء. التغييرات تؤدي إلى أعطال. من الأسهل منع الأعطال علما بأن وظائفك (functions) لا تغير أي شيء، بما في ذلك معطيات (arguments) الوظيفة أو أي متغير (variable) عام. +وأحد المبادئ الأساسية للبرمجة الوظيفية هو عدم تغيير الأشياء. التغييرات تؤدي إلى أعطال. من الأسهل منع الأعطال علما بأن وظائفك (functions) لا تغير أي شيء، بما في ذلك معطيات (arguments) الوظيفة أو أي متغير (variable) شامل. -المثال السابق لم يكن به أي عمليات معقدة ولكن طريقة (method) مسمى `splice` غيرت القائمة (array) الأصلية، وأسفرت عن حدوث خطأ. +المثال السابق لم يكن به أي عمليات معقدة ولكن `splice` غيرت القائمة (array) الأصلية، وأسفرت عن حدوث خطأ. تذكر أنه في البرمجة الوظيفية، تغيير الأشياء يسمى طفرة mutation، وتسمى النتيجة تأثير جانبي side effect. من الناحية المثالية، يجب أن تكون الوظيفة خالصة (pure function)، مما يعني أنها لا تسبب أي تأثيرات جانبية. @@ -22,7 +22,7 @@ dashedName: avoid-mutations-and-side-effects-using-functional-programming # --instructions-- -اكتب الكود للوظيفة `incrementer` حتي تنتج قيمة المتغير العام `fixedValue` بعد زيادة قيمته بواحد. +اكتب الكود للوظيفة `incrementer` حتي تنتج قيمة المتغير الشامل `fixedValue` بعد زيادة قيمته بواحد. # --hints-- @@ -40,7 +40,7 @@ const __newValue = incrementer(); assert(__newValue === 5); ``` -يجب أن تنتج الوظيفة `incrementer` قيمة استناداً إلى قيمة المتغير العام `fixedValue`. +يجب أن تنتج الوظيفة `incrementer` قيمة استناداً إلى قيمة المتغير الشامل `fixedValue`. ```js (function () { diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/learn-about-functional-programming.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/learn-about-functional-programming.md index 67c15cc6680..cb50314acba 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/learn-about-functional-programming.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/learn-about-functional-programming.md @@ -12,7 +12,7 @@ dashedName: learn-about-functional-programming تتعلق البرمجة الوظيفية (Functional) بما يلي: -1) وظائف منعزلة (Isolated functions) - لا تعتمد على حالة البرنامَج، الذي يشمل المتغيرات العامة (global) القابلة للتغيير +1) وظائف منعزلة (Isolated functions) - لا تعتمد على حالة البرنامَج، الذي يشمل المتغيرات الشاملة (global) القابلة للتغيير 2) الوظائف الخالصة (Pure functions) - نفس الإدخال يعطي دائمًا نفس الإخراج diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/pass-arguments-to-avoid-external-dependence-in-a-function.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/pass-arguments-to-avoid-external-dependence-in-a-function.md index cb28c538ff1..2ac83581024 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/pass-arguments-to-avoid-external-dependence-in-a-function.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/pass-arguments-to-avoid-external-dependence-in-a-function.md @@ -10,7 +10,7 @@ dashedName: pass-arguments-to-avoid-external-dependence-in-a-function التحدي الأخير كان يقترب خطوة من مبادئ الـ functional programming، ولكن لا يزال هناك شيء مفقود. -لم نقم بتغيير قيمة المتغير الـ global، ولكن الدالة `incrementer` لن تعمل بدون وجود المتغير الـ global و هو `fixedValue`، هناك. +لم نقم بتغيير قيمة المتغير الشامل (global)، ولكن الوظيفة `incrementer` لن تعمل بدون وجود المتغير الـشامل و هو `fixedValue`، هناك. وهناك مبدأ آخر للبرمجة الوظيفية (functional programming) وهو إعلان تبعياتك (dependencies) بشكل صريح. هذا يعني إذا كان الـ function يعتمد على متغير أو object موجود، قم بتمرير هذا المتغير أو الـ object مباشرة إلى الـ function كـ argument. diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/refactor-global-variables-out-of-functions.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/refactor-global-variables-out-of-functions.md index 1a272d05998..eb8a48ed65b 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/refactor-global-variables-out-of-functions.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/refactor-global-variables-out-of-functions.md @@ -1,6 +1,6 @@ --- id: 587d7b8f367417b2b2512b60 -title: تعديل المتغيرات العالمية (Global Variables) لأخراجهم من الوظائف (Functions) +title: تعديل المتغيرات الشاملة (Global Variables) لأخراجهم من الوظائف (Functions) challengeType: 1 forumTopicId: 301235 dashedName: refactor-global-variables-out-of-functions @@ -12,7 +12,7 @@ dashedName: refactor-global-variables-out-of-functions 1) لا تغير متغير (variable) أو كائن (object) - أنشئ متغيرات و كائنات (objects) جديدة و منشئا من الوظيفة (function) إذا لزم الأمر. تلميح: باستخدام شيء مثل `const newArr = arrVar`، حيث `arrVar` هو array، سوف يقوم ببساطة بإنشاء مرجع إلى المتغير الحالي وليس نسخة. لذا فإن تغيير قيمة في `newArr` سيغير القيمة في `arrVar`. -2) إعلان وسائط الوظيفة (function parameters) - يعتمد حسابات داخل الوظيفة (function) فقط على المعطيات (arguments) التي تمر إلى الوظيفة (function)، ولا تعتمد على أي كائن (object) أو متغير (variable) عام (global). +2) أعلن وسائط الوظيفة (function parameters) - تعتمد الحسابات داخل الوظيفة (function) فقط على المعطيات (arguments) التي تعطى إلى الوظيفة (function)، ولا تعتمد على أي كائن (object) أو متغير (variable) شامل (global). إن إضافة واحد إلى رقما ليس مثيراً جداً، ولكن يمكننا تطبيق هذه المبادئ عند العمل مع arrays أو objects أكثر تعقيداً. diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md index 8c811a875a6..39f2c35a806 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md @@ -21,7 +21,7 @@ cities.splice(3, 1); # --instructions-- -أعّد كتابة الوظيفة `nonMutatingSplice` باستخدام `slice` بدلاً من `splice`. يجب أن يقصر طول مصفوفة `cities` المقدمة على 3، ويعيد array جديدة تحتوي على العناصر الثلاثة الأولى فقط. +أعّد كتابة الوظيفة `nonMutatingSplice` باستخدام `slice` بدلاً من `splice`. يجب أن يقصر طول القائمة `cities` المقدمة على 3، ويعيد array جديدة تحتوي على العناصر الثلاثة الأولى فقط. لا تغيّر القائمة (array) الأصلية المقدمة للوظيفة (function). diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/return-a-sorted-array-without-changing-the-original-array.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/return-a-sorted-array-without-changing-the-original-array.md index cc07df5eb51..5be68a28d76 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/return-a-sorted-array-without-changing-the-original-array.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/return-a-sorted-array-without-changing-the-original-array.md @@ -1,6 +1,6 @@ --- id: 587d7da9367417b2b2512b6a -title: Return a Sorted Array Without Changing the Original Array +title: أرجع قائمة مفرزة دون تغير القائمة الأصلية challengeType: 1 forumTopicId: 301237 dashedName: return-a-sorted-array-without-changing-the-original-array @@ -8,15 +8,15 @@ dashedName: return-a-sorted-array-without-changing-the-original-array # --description-- -التأثير الجانبي لـ `sort` هو أنه يغير ترتيب العناصر في ال array الأصلية. وبعبارة أخرى، فإنه يغير ال array في مكانها. إحدى الطرق لتجنب ذلك هي أن تقوم أولاً بلزق array فارغة إلى ال array التي يتم فرزها (تذكر أن `slice` و `concat` تعيد array جديدة)، ثم قم بتشغيل `sort`. +التأثير الجانبي لطريقة `sort` هو أنخها تغير ترتيب العناصر في القائمة (array) الأصلية. وبعبارة أخرى، فإنه يغير ال array في مكانها. إحدى الطرق لتجنب ذلك هي أن تقوم أولاً بلزق array فارغة إلى ال array التي يتم فرزها (تذكر أن `slice` و `concat` تعيد array جديدة)، ثم قم بتشغيل `sort`. # --instructions-- -استخدم `sort` في الدالة `nonMutatingSort` لفرز عناصر array بالترتيب التصاعدي. يجب أن تعيد الدالة array جديدا، وليس تغيير متغير `globalArray`. +استخدم `sort` في الوظيفة `nonMutatingSort` لفرز عناصر array بالترتيب التصاعدي. يجب أن تعيد الوظيفة array جديدا، وليس تغيِّر متغير `globalArray`. # --hints-- -يجب أن يستخدم الكود الخاص بك دالة `sort`. +يجب أن يستخدم الكود الخاص بك طريقة `sort`. ```js assert(nonMutatingSort.toString().match(/\.sort/g)); @@ -37,26 +37,26 @@ assert( ); ``` -`nonMutatingSort(globalArray)` لا ينبغي أن تكون hard coded. +`nonMutatingSort(globalArray)` لا ينبغي أن تكون قيمها مثبتة (hard-coded). ```js assert(!nonMutatingSort.toString().match(/\[.*?[23569].*?\]/gs)); ``` -وينبغي أن تعيد الدالة array جديدا، وليس ال array التي تمرر إليها. +وينبغي أن تعيد الوظيفة array جديدا، وليس ال array التي أعطت ها. ```js assert(nonMutatingSort(globalArray) !== globalArray); ``` -`nonMutatingSort([1, 30, 4, 21, 100000])` يجب ان يعيد `[1, 4, 21, 30, 100000]`. +`nonMutatingSort([1, 30, 4, 21, 100000])` يجب ان تعيد `[1, 4, 21, 30, 100000]`. ```js assert(JSON.stringify(nonMutatingSort([1, 30, 4, 21, 100000])) === JSON.stringify([1, 4, 21, 30, 100000])) ``` -`nonMutatingSort([140000, 104, 99])` يجب ان يعيد `[99, 104, 140000]`. +`nonMutatingSort([140000, 104, 99])` يجب ان تعيد `[99, 104, 140000]`. ```js assert(JSON.stringify(nonMutatingSort([140000, 104, 99])) === diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/return-part-of-an-array-using-the-slice-method.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/return-part-of-an-array-using-the-slice-method.md index 8880fc4cc50..e4377dd2e60 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/return-part-of-an-array-using-the-slice-method.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/return-part-of-an-array-using-the-slice-method.md @@ -21,7 +21,7 @@ const newArray = arr.slice(1, 3); # --instructions-- -استخدم طريقة `slice` في `sliceArray` لإرجاع جزء من مصفوفة `anim` بالنظر إلى مؤشري `beginSlice` و `endSlice`. يجب أن تعيد الدالة array. +استخدم طريقة `slice` في `sliceArray` لإرجاع جزء من مصفوفة `anim` بالنظر إلى مؤشري `beginSlice` و `endSlice`. يجب أن تعيد الوظيفة array. # --hints-- diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/understand-the-hazards-of-using-imperative-code.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/understand-the-hazards-of-using-imperative-code.md index 928431bbc65..ae98f8e66c9 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/understand-the-hazards-of-using-imperative-code.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/understand-the-hazards-of-using-imperative-code.md @@ -12,7 +12,7 @@ Functional programming هي عادة جيدة. إنها تجعل الكود ال في اللغة الإنجليزية (والعديد من اللغات الأخرى) ، يتم استخدام صيغة الأمر لإعطاء الأوامر. وبالمثل ، فإن أسلوب الأمر في البرمجة هو الذي يعطي الكمبيوتر مجموعة من العبارات لأداء مهمة ما. -غالبًا ما تغير البيانات حالة البرنامج ، مثل تحديث المتغيرات العالمية(global variables). المثال الكلاسيكي هو كتابة حلقة `for` تعطي توجيهات دقيقة للتكرار على فهارس ال array. +غالبًا ما تغير البيانات حالة البرنامج ، مثل تحديث المتغيرات الشاملة (global variables). المثال الكلاسيكي هو كتابة حلقة `for` تعطي توجيهات دقيقة للتكرار على فهارس ال array. في المقابل، تكون البرمجة الوظيفية (functional programming) من أشكال البرمجة المعلنة (declarative programming). أنت تخبر الكمبيوتر بما تريد فعله عن طريق استدعاء method أو function. diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/use-the-map-method-to-extract-data-from-an-array.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/use-the-map-method-to-extract-data-from-an-array.md index e9f557ab118..82e08157c9b 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/use-the-map-method-to-extract-data-from-an-array.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/functional-programming/use-the-map-method-to-extract-data-from-an-array.md @@ -12,7 +12,7 @@ dashedName: use-the-map-method-to-extract-data-from-an-array هذه هي البداية فقط. وكما يوحي اسمها، فإن ال functional programming تتمحور حول نظرية ال functions. -سيكون من المنطقي أن تكون قادرًا على تمريرها كـ arguments ل functions أخرى ، وإرجاع function من function أخر. تعتبر الدوال first class objects في جافا سكريبت، مما يعني أنه يمكن استخدامها مثل أي object آخر. يمكن حفظها في المتغيرات، أو تخزينها في object ما، أو تمريرها كـ function arguments. +سيكون من المنطقي أن تكون قادرًا على تمريرها كـ arguments ل functions أخرى ، وإرجاع function من function أخر. تعتبر الوظائف first class objects في جافا سكريبت، مما يعني أنه يمكن استخدامها مثل أي object آخر. يمكن حفظها في المتغيرات، أو تخزينها في object ما، أو تمريرها كـ function arguments. دعونا نبدأ ببعض الـ array functions البسيطة، التي هي methods على ال array object prototype. في هذا التمرين نحن ننظر إلى `Array.prototype.map()`أو ببساطة `map`. diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/drop-it.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/drop-it.md index 06b9b57d7db..399c4bd1bac 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/drop-it.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/drop-it.md @@ -8,7 +8,7 @@ dashedName: drop-it # --description-- -بالنظر إلى المصفوفة `arr` ، كرر وأزل كل عنصر بدءًا من العنصر الأول (الفهرس 0) حتى تعرض الدالة `func` القيمة `true` عندما يتم تمرير العنصر المتكرر من خلالها. +بالنظر إلى المصفوفة `arr` ، كرر وأزل كل عنصر بدءًا من العنصر الأول (الفهرس 0) حتى تعرض الوظيفة `func` القيمة `true` عندما يتم تمرير العنصر المتكرر من خلالها. ثم ارجع بقية ال array بمجرد استيفاء الشرط، وإلا ، يجب إرجاع `arr` كـ array فارغة. diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/search-and-replace.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/search-and-replace.md index 81a214a4046..095966de95d 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/search-and-replace.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/search-and-replace.md @@ -20,7 +20,7 @@ dashedName: search-and-replace # --hints-- -`myReplace("Let us go to the store", "store", "mall")` يجب أن يعيد السلسلة النصية `Let us go to the mall`. +`myReplace("Let us go to the store", "store", "mall")` يجب أن يعيد المقطع النصي `Let us go to the mall`. ```js assert.deepEqual( @@ -29,7 +29,7 @@ assert.deepEqual( ); ``` -`myReplace("He is Sleeping on the couch", "Sleeping", "sitting")` يجب أن يعيد السلسلة النصية `He is Sitting on the couch`. +`myReplace("He is Sleeping on the couch", "Sleeping", "sitting")` يجب أن يعيد المقطع النصي `He is Sitting on the couch`. ```js assert.deepEqual( @@ -38,7 +38,7 @@ assert.deepEqual( ); ``` -`myReplace("I think we should look up there", "up", "Down")` يجب أن يعيد السلسلة النصية `I think we should look down there`. +`myReplace("I think we should look up there", "up", "Down")` يجب أن يعيد المقطع النصي `I think we should look down there`. ```js assert.deepEqual( @@ -47,7 +47,7 @@ assert.deepEqual( ); ``` -`myReplace("This has a spellngi error", "spellngi", "spelling")` يجب أن يعيد السلسلة النصية `This has a spelling error`. +`myReplace("This has a spellngi error", "spellngi", "spelling")` يجب أن يعيد المقطع النصي `This has a spelling error`. ```js assert.deepEqual( @@ -56,7 +56,7 @@ assert.deepEqual( ); ``` -`myReplace("His name is Tom", "Tom", "john")` يجب أن يعيد السلسلة النصية `His name is John`. +`myReplace("His name is Tom", "Tom", "john")` يجب أن يعيد المقطع النصي `His name is John`. ```js assert.deepEqual( diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/steamroller.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/steamroller.md index 47943c19594..8dd6d0dcc28 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/steamroller.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/steamroller.md @@ -36,7 +36,7 @@ assert.deepEqual(steamrollArray([1, [], [3, [[4]]]]), [1, 3, 4]); assert.deepEqual(steamrollArray([1, {}, [3, [[4]]]]), [1, {}, 3, 4]); ``` -يجب ألا يستخدم الحل الخاص بك الدوال `Array.prototype.flat()` أو `Array.prototype.flatMap()`. +يجب ألا يستخدم الحل الخاص بك الوظائف `Array.prototype.flat()` أو `Array.prototype.flatMap()`. ```js assert(!code.match(/\.\s*flat\s*\(/) && !code.match(/\.\s*flatMap\s*\(/)); diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/caesars-cipher.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/caesars-cipher.md index 99d520c10a2..92b5a944b3d 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/caesars-cipher.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/caesars-cipher.md @@ -1,6 +1,6 @@ --- id: 56533eb9ac21ba0edf2244e2 -title: Caesars Cipher +title: شفرة قيصر challengeType: 5 forumTopicId: 16003 dashedName: caesars-cipher diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/cash-register.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/cash-register.md index b0b6a4a3b6d..e1bee22eedd 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/cash-register.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/cash-register.md @@ -1,6 +1,6 @@ --- id: aa2e6f85cab2ab736c9a9b24 -title: Cash Register +title: مكنة لتسجيل النقود challengeType: 5 forumTopicId: 16012 dashedName: cash-register @@ -8,11 +8,11 @@ dashedName: cash-register # --description-- -قم بتصميم دالة درج تسجيل المدفوعات `checkCashRegister()` التي تقبل سعر الشراء كـ argument أولى (`price`)، و الدفع كـ argument ثانية (`cash`) ، و cash-in-drawer اي النقود في الدرج (`cid`) كـ argument ثالثة. +صمم وظيفة درج لتسجيل النقود `checkCashRegister()` التي تقبل سعر الشراء كمعطى أولى (`price`)، و الدفع كمعطى ثاني (`cash`)، و cash-in-drawer أي النقود في الدرج (`cid`) كمعطى ثالث. `cid` عبارة عن array ثنائية الأبعاد للعملة المتاحة. -يجب أن تقوم دالة `checkCashRegister()` دائما بإرجاع object يحتوي على key الـ `status` و key الـ `change`. +يجب أن تقوم وظيفة `checkCashRegister()` دائما بإنتاج كائن يحتوي على الهوية (key) المسمى `status` و الهوية `change`. قم بإرجاع `{status: "INSUFFICIENT_FUNDS", change: []}` إذا كان cash-in-drawer أقل من الباقي المستحق، أو إذا كنت لا تستطيع إرجاع الباقي بالضبط. @@ -40,7 +40,7 @@ dashedName: cash-register # --hints-- -`checkCashRegister(19.5, 20, [["PENNY", 1.01], ["NICKEL", 2.05], ["DIME", 3.1], ["QUARTER", 4.25], ["ONE", 90], ["FIVE", 55], ["TEN", 20], ["TWENTY", 60], ["ONE HUNDRED", 100]])` يجب ان يرجع object. +يجب أن ينتج `checkCashRegister(19.5, 20, [["PENNY", 1.01], ["NICKEL", 2.05], ["DIME", 3.1], ["QUARTER", 4.25], ["ONE", 90], ["FIVE", 55], ["TEN", 20], ["TWENTY", 60], ["ONE HUNDRED", 100]])` كائن. ```js assert.deepEqual( @@ -61,7 +61,7 @@ assert.deepEqual( ); ``` -`checkCashRegister(19.5, 20, [["PENNY", 1.01], ["NICKEL", 2.05], ["DIME", 3.1], ["QUARTER", 4.25], ["ONE", 90], ["FIVE", 55], ["TEN", 20], ["TWENTY", 60], ["ONE HUNDRED", 100]])` يجب ان يرجع `{status: "OPEN", change: [["QUARTER", 0.5]]}`. +يجب أن ينتج `checkCashRegister(19.5, 20, [["PENNY", 1.01], ["NICKEL", 2.05], ["DIME", 3.1], ["QUARTER", 4.25], ["ONE", 90], ["FIVE", 55], ["TEN", 20], ["TWENTY", 60], ["ONE HUNDRED", 100]])` كائن `{status: "OPEN", change: [["QUARTER", 0.5]]}`. ```js assert.deepEqual( @@ -80,7 +80,7 @@ assert.deepEqual( ); ``` -`checkCashRegister(3.26, 100, [["PENNY", 1.01], ["NICKEL", 2.05], ["DIME", 3.1], ["QUARTER", 4.25], ["ONE", 90], ["FIVE", 55], ["TEN", 20], ["TWENTY", 60], ["ONE HUNDRED", 100]])` يجب ان يرجع `{status: "OPEN", change: [["TWENTY", 60], ["TEN", 20], ["FIVE", 15], ["ONE", 1], ["QUARTER", 0.5], ["DIME", 0.2], ["PENNY", 0.04]]}`. +يجب أن ينتج `checkCashRegister(3.26, 100, [["PENNY", 1.01], ["NICKEL", 2.05], ["DIME", 3.1], ["QUARTER", 4.25], ["ONE", 90], ["FIVE", 55], ["TEN", 20], ["TWENTY", 60], ["ONE HUNDRED", 100]])` كائن `{status: "OPEN", change: [["TWENTY", 60], ["TEN", 20], ["FIVE", 15], ["ONE", 1], ["QUARTER", 0.5], ["DIME", 0.2], ["PENNY", 0.04]]}`. ```js assert.deepEqual( @@ -110,7 +110,7 @@ assert.deepEqual( ); ``` -`checkCashRegister(19.5, 20, [["PENNY", 0.01], ["NICKEL", 0], ["DIME", 0], ["QUARTER", 0], ["ONE", 0], ["FIVE", 0], ["TEN", 0], ["TWENTY", 0], ["ONE HUNDRED", 0]])` يجب ان يرجع `{status: "INSUFFICIENT_FUNDS", change: []}`. +يجب أن ينتج `checkCashRegister(19.5, 20, [["PENNY", 0.01], ["NICKEL", 0], ["DIME", 0], ["QUARTER", 0], ["ONE", 0], ["FIVE", 0], ["TEN", 0], ["TWENTY", 0], ["ONE HUNDRED", 0]])` كائن `{status: "INSUFFICIENT_FUNDS", change: []}`. ```js assert.deepEqual( @@ -129,7 +129,7 @@ assert.deepEqual( ); ``` -`checkCashRegister(19.5, 20, [["PENNY", 0.01], ["NICKEL", 0], ["DIME", 0], ["QUARTER", 0], ["ONE", 1], ["FIVE", 0], ["TEN", 0], ["TWENTY", 0], ["ONE HUNDRED", 0]])` يجب ان يرجع `{status: "INSUFFICIENT_FUNDS", change: []}`. +يجب أن ينتج `checkCashRegister(19.5, 20, [["PENNY", 0.01], ["NICKEL", 0], ["DIME", 0], ["QUARTER", 0], ["ONE", 1], ["FIVE", 0], ["TEN", 0], ["TWENTY", 0], ["ONE HUNDRED", 0]])` كائن `{status: "INSUFFICIENT_FUNDS", change: []}`. ```js assert.deepEqual( @@ -148,7 +148,7 @@ assert.deepEqual( ); ``` -`checkCashRegister(19.5, 20, [["PENNY", 0.5], ["NICKEL", 0], ["DIME", 0], ["QUARTER", 0], ["ONE", 0], ["FIVE", 0], ["TEN", 0], ["TWENTY", 0], ["ONE HUNDRED", 0]])` يجب ان يرجع `{status: "CLOSED", change: [["PENNY", 0.5], ["NICKEL", 0], ["DIME", 0], ["QUARTER", 0], ["ONE", 0], ["FIVE", 0], ["TEN", 0], ["TWENTY", 0], ["ONE HUNDRED", 0]]}`. +يجب أن ينتج `checkCashRegister(19.5, 20, [["PENNY", 0.5], ["NICKEL", 0], ["DIME", 0], ["QUARTER", 0], ["ONE", 0], ["FIVE", 0], ["TEN", 0], ["TWENTY", 0], ["ONE HUNDRED", 0]])` كائن `{status: "CLOSED", change: [["PENNY", 0.5], ["NICKEL", 0], ["DIME", 0], ["QUARTER", 0], ["ONE", 0], ["FIVE", 0], ["TEN", 0], ["TWENTY", 0], ["ONE HUNDRED", 0]]}`. ```js assert.deepEqual( diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/palindrome-checker.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/palindrome-checker.md index 6d07135f341..3fd98aeadf1 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/palindrome-checker.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/palindrome-checker.md @@ -1,6 +1,6 @@ --- id: aaa48de84e1ecc7c742e1124 -title: Palindrome Checker +title: مدقق لمعاكس المقطع النصي challengeType: 5 forumTopicId: 16004 dashedName: palindrome-checker diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/roman-numeral-converter.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/roman-numeral-converter.md index cae6e022074..425b47c65b7 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/roman-numeral-converter.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/roman-numeral-converter.md @@ -1,6 +1,6 @@ --- id: a7f4d8f2483413a6ce226cac -title: Roman Numeral Converter +title: محول للأرقام الرومانية challengeType: 5 forumTopicId: 16044 dashedName: roman-numeral-converter diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/telephone-number-validator.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/telephone-number-validator.md index 2101560a450..a744f7215c4 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/telephone-number-validator.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/javascript-algorithms-and-data-structures-projects/telephone-number-validator.md @@ -1,6 +1,6 @@ --- id: aff0395860f5d3034dc0bfc9 -title: Telephone Number Validator +title: مدقق الأرقام الهواتف challengeType: 5 forumTopicId: 16090 dashedName: telephone-number-validator diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/object-oriented-programming/inherit-behaviors-from-a-supertype.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/object-oriented-programming/inherit-behaviors-from-a-supertype.md index 107f5f942bf..65e3159bfb7 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/object-oriented-programming/inherit-behaviors-from-a-supertype.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/object-oriented-programming/inherit-behaviors-from-a-supertype.md @@ -44,13 +44,13 @@ animal instanceof Animal; # --hints-- -يجب تعريف متغير `duck`. +يجب إعلان متغير `duck`. ```js assert(typeof duck !== 'undefined'); ``` -يجب تعريف متغير `beagle`. +يجب إعلان متغير `beagle`. ```js assert(typeof beagle !== 'undefined'); diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/object-oriented-programming/iterate-over-all-properties.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/object-oriented-programming/iterate-over-all-properties.md index 23edd5b7dcc..90230752779 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/object-oriented-programming/iterate-over-all-properties.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/object-oriented-programming/iterate-over-all-properties.md @@ -58,7 +58,7 @@ assert.deepEqual(ownProps, ['name']); assert.deepEqual(prototypeProps, ['numLegs']); ``` -يجب عليك حل هذا التحدي دون استخدام الدالة المدمجة في `Object.keys()`. +يجب عليك حل هذا التحدي دون استخدام الوظيفة المدمجة في `Object.keys()`. ```js assert(!/\Object.keys/.test(code)); diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/object-oriented-programming/remember-to-set-the-constructor-property-when-changing-the-prototype.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/object-oriented-programming/remember-to-set-the-constructor-property-when-changing-the-prototype.md index bc5d837e36b..5d8ca6f86be 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/object-oriented-programming/remember-to-set-the-constructor-property-when-changing-the-prototype.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/object-oriented-programming/remember-to-set-the-constructor-property-when-changing-the-prototype.md @@ -16,7 +16,7 @@ duck.constructor === Object; duck instanceof Bird; ``` -بالترتيب، سيتم تقييم هذه التعبيرات إلى `false`، و `true`، و `true`. +بالترتيب، سيتم تقييم هذه العبارات إلى `false`، و `true`، و `true`. لإصلاح هذا، عندما يتم تعيين prototype يدوياً إلى كائن جديد، تذكر أن تحدد خاصية `constructor`: diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/object-oriented-programming/reset-an-inherited-constructor-property.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/object-oriented-programming/reset-an-inherited-constructor-property.md index 4cc528aec6d..d74a6e690eb 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/object-oriented-programming/reset-an-inherited-constructor-property.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/object-oriented-programming/reset-an-inherited-constructor-property.md @@ -1,6 +1,6 @@ --- id: 587d7db1367417b2b2512b86 -title: إعادة تعيين خاصية موروثة (Reset an Inherited Constructor Property) +title: إعادة تعيين خاصية موروثة challengeType: 1 forumTopicId: 301324 dashedName: reset-an-inherited-constructor-property diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-own-properties.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-own-properties.md index 007005a1373..5a49dc2ece6 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-own-properties.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-own-properties.md @@ -54,7 +54,7 @@ assert(ownProps.indexOf('name') !== -1 && ownProps.indexOf('numLegs') !== -1); assert(!/Object(\.keys|\[(['"`])keys\2\])/.test(code)); ``` -يجب عليك حل هذا التحدي بدون hardcoding مصفوفة `ownProps`. +يجب عليك حل هذا التحدي بدون إدخال قيم مثبتة (hard-coding) في قائمة `ownProps`. ```js assert( diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-the-immediately-invoked-function-expression-iife.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-the-immediately-invoked-function-expression-iife.md index ac6b4a27acb..71e6d45c26f 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-the-immediately-invoked-function-expression-iife.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/object-oriented-programming/understand-the-immediately-invoked-function-expression-iife.md @@ -22,7 +22,7 @@ dashedName: understand-the-immediately-invoked-function-expression-iife # --instructions-- -أعد كتابة الدالة `makeNest` وأزيل استدعائها بحيث أنها تصبح anonymous immediately invoked function expression (IIFE). +أعد كتابة الوظيفة `makeNest` وأزيل استدعائها بحيث أنها تصبح anonymous immediately invoked function expression (IIFE). # --hints-- @@ -32,7 +32,7 @@ dashedName: understand-the-immediately-invoked-function-expression-iife assert(/\((function|\(\))(=>|\(\)){?/.test(code.replace(/\s/g, ''))); ``` -يجب أن يكون ال function الخاص بك بين قوسين في نهاية التعبير لاستدعائه على الفور. +يجب أن يكون ال function الخاص بك بين قوسين في نهاية العبارة لاستدعائه على الفور. ```js assert(/\(.*(\)\(|\}\(\))\)/.test(code.replace(/[\s;]/g, ''))); diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-closure-to-protect-properties-within-an-object-from-being-modified-externally.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-closure-to-protect-properties-within-an-object-from-being-modified-externally.md index 17eb731e904..29c1ceb7889 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-closure-to-protect-properties-within-an-object-from-being-modified-externally.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/object-oriented-programming/use-closure-to-protect-properties-within-an-object-from-being-modified-externally.md @@ -18,7 +18,7 @@ bird.name = "Duffy"; لذلك، يمكن لأي جزء من الكود الخاص بك تغيير اسم `bird` بسهولة إلى أي قيمة. فكروا في أشياء مثل كلمات المرور والحسابات المصرفية التي يسهل تغييرها من قبل أي جزء من الكود الخاص بك. وهذا يمكن أن يسبب الكثير من المشاكل. -وأبسط طريقة لجعل هذه الخاصية العامة، خاصة، هي عن طريق إنشاء متغير داخل الـ constructor function. وهذا يغير نطاق ذلك المتغير بحيث يكون ضمن الـ constructor function علي عكس أن يكون متاحا بشكل global. وبهذه الطريقة، لا يمكن الوصول إلى المتغير وتغييره إلا بواسطة method تكون أيضا ضمن الـ constructor function. +وأبسط طريقة لجعل هذه الخاصية العامة، خاصة، هي عن طريق إنشاء متغير داخل الـ constructor function. وهذا يغير مجال ذلك المتغير بحيث يكون ضمن الـ constructor function علي عكس أن يكون متاحا بشكل شامل (global). وبهذه الطريقة، لا يمكن الوصول إلى المتغير وتغييره إلا بواسطة method تكون أيضا ضمن الـ constructor function. ```js function Bird() { @@ -32,7 +32,7 @@ let ducky = new Bird(); ducky.getHatchedEggCount(); ``` -هنا `getHatchedEggCount` هي method مميزة، لأنها لديها حق الوصول إلى المتغير الخاص `hatchedEgg`. هذا ممكن لإن `hatchedEgg` أعلنت في نفس السياق مثل `getHatchedEggCount`. في جافا سكريبت، الدالة دائما لها حق الوصول إلى السياق الذي تم إنشاؤها فيه. هذا يسمى `closure`. +هنا `getHatchedEggCount` هي method مميزة، لأنها لديها حق الوصول إلى المتغير الخاص `hatchedEgg`. هذا ممكن لإن `hatchedEgg` أعلنت في نفس السياق مثل `getHatchedEggCount`. في جافا سكريبت، الوظيفة دائما لها حق الوصول إلى السياق الذي تم إنشاؤها فيه. هذا يسمى `closure`. # --instructions-- diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/regular-expressions/extract-matches.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/regular-expressions/extract-matches.md index 1c334275991..0d4377c890d 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/regular-expressions/extract-matches.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/regular-expressions/extract-matches.md @@ -10,7 +10,7 @@ dashedName: extract-matches حتى الآن، كنت تتحقق فقط من وجود أو عدم وجود نمط داخل string. يمكنك أيضا استخراج المطابقات الفعلية التي وجدتها باستخدام دالة `.match()`. -لاستخدام دالة `.match()` ، قم بتطبيق الدالة على string ومرر بداخلها الـ regex في الأقواس. +لاستخدام وظيفة `.match()` ، قم بتطبيق الوظيفة على string ومرر بداخلها الـ regex في الأقواس. إليك مثال: diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/regular-expressions/ignore-case-while-matching.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/regular-expressions/ignore-case-while-matching.md index 2569210eee0..8e323e3c892 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/regular-expressions/ignore-case-while-matching.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/regular-expressions/ignore-case-while-matching.md @@ -8,7 +8,7 @@ dashedName: ignore-case-while-matching # --description-- -حتى الآن، لقد نظرتم إلى regex للقيام بمطابقة حرفية من الـ strings. ولكن في بعض الأحيان قد ترغب في مطابقة الاختلافات في الحالة. +حتى الآن، لقد نظرت إلى regex للتطابق المقاطع النصية حرفيًا. ولكن في بعض الأحيان قد ترغب في مطابقة الاختلافات في الحالة. Case و هي الحالة (او في بعض الاحيان letter case) هي الفرق بين uppercase letters و lowercase letters اي الاحرف الكبيرة و الاحرف الصغيرة. أمثلة للحروف الكبيرة هي `A` و `B` و `C`. أمثلة للحروف الصغيرة هي `a` و `b` و `c`. diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/regular-expressions/match-a-literal-string-with-different-possibilities.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/regular-expressions/match-a-literal-string-with-different-possibilities.md index 2ea80cd2c00..1bf8d52fc8e 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/regular-expressions/match-a-literal-string-with-different-possibilities.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/regular-expressions/match-a-literal-string-with-different-possibilities.md @@ -1,6 +1,6 @@ --- id: 587d7db4367417b2b2512b90 -title: طابق سلسلة حرفية (Literal String) مع احتمالات مختلفة +title: طابق مقطع نصي حرفي (Literal String) مع احتمالات مختلفة challengeType: 1 forumTopicId: 301345 dashedName: match-a-literal-string-with-different-possibilities @@ -8,9 +8,9 @@ dashedName: match-a-literal-string-with-different-possibilities # --description-- -باستخدام regexes مثل `/coding/`، يمكنك البحث عن النمط `coding` في سلسلة (string) أخرى. +باستخدام regexes مثل `/coding/`، يمكنك البحث عن النمط `coding` في مقطع نصي أخر. -هذا جيد للبحث عن سلسلة (string) واحدة، لكنه يقتصر على نمط واحد فقط. يمكنك البحث عن أنماط متعددة باستخدام `alternation` أو رمز `OR` التالي: `|`. +هذا جيد للبحث في مقطع نصي (string) واحد، لكنه يقتصر على نمط واحد فقط. يمكنك البحث عن أنماط متعددة باستخدام `alternation` أو رمز `OR` التالي: `|`. هذا المشغل يطابق الأنماط قبله أو بعده. على سبيل المثال، إذا كنت ترغب في مطابقة السلاسل (strings) باسم `yes` أو `no`، تريد regex إن يكون `/yes|no/`. @@ -22,49 +22,49 @@ dashedName: match-a-literal-string-with-different-possibilities # --hints-- -الـ regex الآتي `petRegex` يجب أن يرجع `true` للسلسلة `John has a pet dog.` +نمطـ regex الآتي `petRegex` يجب أن يرجع `true` للمقطع النصي `John has a pet dog.` ```js petRegex.lastIndex = 0; assert(petRegex.test('John has a pet dog.')); ``` -الـ regexا لآتي `petRegex` يجب أن يرجع `false` للسلسلة `Emma has a pet rock.` +نمط regex الآتي `petRegex` يجب أن يرجع `false` للمقطع النصي `Emma has a pet rock.` ```js petRegex.lastIndex = 0; assert(!petRegex.test('Emma has a pet rock.')); ``` -الـ regex الآتي `petRegex` يجب أن يرجع `true` للسلسلة `Emma has a pet bird.` +نمط regex الآتي `petRegex` يجب أن يرجع `true` للمقطع النصي `Emma has a pet bird.` ```js petRegex.lastIndex = 0; assert(petRegex.test('Emma has a pet bird.')); ``` -الـ regex الآتي `petRegex` يجب أن يرجع `true` للسلسلة `Liz has a pet cat.` +نمطـ regex الآتي `petRegex` يجب أن يرجع `true` للمقطع النصي `Liz has a pet cat.` ```js petRegex.lastIndex = 0; assert(petRegex.test('Liz has a pet cat.')); ``` -الـ regex الآتي `petRegex` يجب أن يرجع `false` للسلسلة `Kara has a pet dolphin.` +نمط regex الآتي `petRegex` يجب أن يرجع `false` للمقطع النصي `Kara has a pet dolphin.` ```js petRegex.lastIndex = 0; assert(!petRegex.test('Kara has a pet dolphin.')); ``` -الـ regex الآتي `petRegex` يجب أن يرجع `true` للسلسلة `Alice has a pet fish.` +نمط regex الآتي `petRegex` يجب أن يرجع `true` للمقطع النصي `Alice has a pet fish.` ```js petRegex.lastIndex = 0; assert(petRegex.test('Alice has a pet fish.')); ``` -الـ regex الآتي `petRegex` يجب أن يرجع `false` للسلسلة `Jimmy has a pet computer.` +نمط regex الآتي `petRegex` يجب أن يرجع `false` للمقطع النصي `Jimmy has a pet computer.` ```js petRegex.lastIndex = 0; diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/regular-expressions/match-ending-string-patterns.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/regular-expressions/match-ending-string-patterns.md index 097801f8194..4d927880c4d 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/regular-expressions/match-ending-string-patterns.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/regular-expressions/match-ending-string-patterns.md @@ -24,11 +24,11 @@ storyRegex.test(noEnding); # --instructions-- -استخدم رمز الدولار (`$`) لمطابقة السلسلة `caboose` في نهاية السلسة `caboose`. +استخدم رمز الدولار (`$`) لمطابقة المقطع النصي `caboose` في نهاية `caboose`. # --hints-- -يجب عليك البحث عن `caboose` باستخدام علامة الدولار `$` في الـ regex. +يجب عليك البحث عن `caboose` باستخدام علامة الدولار `$` في نمط regex. ```js assert(lastRegex.source == 'caboose$'); diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/regular-expressions/match-literal-strings.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/regular-expressions/match-literal-strings.md index 12e58822420..fb762fe43fc 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/regular-expressions/match-literal-strings.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/regular-expressions/match-literal-strings.md @@ -1,6 +1,6 @@ --- id: 587d7db3367417b2b2512b8f -title: مطابقة السلاسل النصية (Match Literal Strings) +title: مطابقة النصوص الحرفية challengeType: 1 forumTopicId: 301355 dashedName: match-literal-strings @@ -8,7 +8,7 @@ dashedName: match-literal-strings # --description-- -في التحدي الأخير، بحثت عن كلمة `Hello` باستخدام regular expression الاتي `/Hello/`. هذا regex يبحث عن مطابقة حرفية في string الآتي `Hello`. إليك مثال آخر يبحث عن مطابقة حرفية في string الآتي `Kevin`: +في التحدي الأخير، بحثت عن كلمة `Hello` باستخدام regular expression الاتي `/Hello/`. هذا regex يبحث عن مطابقة حرفية في المقطع النصي الآتي `Hello`. إليك مثال آخر يبحث عن مطابقة حرفية في المقطع النصي الآتي `Kevin`: ```js let testStr = "Hello, my name is Kevin."; @@ -31,11 +31,11 @@ wrongRegex.test(testStr); # --instructions-- -أكمل regex الأتي `waldoRegex` للعثور على `"Waldo"` في السلسلة (string) النصية `waldoIsHiding` مع مطابقة حرفية. +أكمل regex الأتي `waldoRegex` للعثور على `"Waldo"` في المقطع (string) النصية `waldoIsHiding` مع مطابقة حرفية. # --hints-- -إن regex الخاص بك `waldoRegex` يجب أن يجد string الآتي `Waldo` +إن regex الخاص بك `waldoRegex` يجب أن يجد المقطع النصي الآتي `Waldo` ```js waldoRegex.lastIndex = 0; @@ -49,7 +49,7 @@ waldoRegex.lastIndex = 0; assert(!waldoRegex.test('Somewhere is hiding in this text.')); ``` -يجب عليك إجراء مطابقة حرفية للسلسلة (string) النصية باستخدام regex الخاص بك. +يجب عليك إجراء مطابقة حرفية للمقطع النصية (string) باستخدام regex الخاص بك. ```js assert(!/\/.*\/i/.test(code)); diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/regular-expressions/match-single-character-with-multiple-possibilities.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/regular-expressions/match-single-character-with-multiple-possibilities.md index b8c50b627d7..cf5d9ef796c 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/regular-expressions/match-single-character-with-multiple-possibilities.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/regular-expressions/match-single-character-with-multiple-possibilities.md @@ -8,7 +8,7 @@ dashedName: match-single-character-with-multiple-possibilities # --description-- -تعلمت كيفية مطابقة الأنماط الحرفية (`/literal/`) و wildcard character (`/./`). هذه هي أقصى درجات التعبيرات النمطية، حيث يجد احدهم التطابقات الدقيقة والآخر يطابق كل شيء. وهناك خيارات تمثل توازنا بين الطرفين. +تعلمت كيفية مطابقة الأنماط الحرفية (`/literal/`) و wildcard character (`/./`). هذه هي أقصى درجات العبارات النمطية، حيث يجد احدهم التطابقات الدقيقة والآخر يطابق كل شيء. وهناك خيارات تمثل توازنا بين الطرفين. يمكنك البحث عن نمط حرفي مع بعض المرونة باستخدام character classes. تتيح لك Character classes تعريف مجموعة من الأحرف التي ترغب في تطابقها عن طريق وضعها داخل الأقواس المربعة (`[` و `]`). @@ -30,7 +30,7 @@ bogStr.match(bgRegex); # --instructions-- -استخدم character class مع حروف (`a`, `e`, `i`, `o`, `u`) في regex الخاص بك `vowelRegex` للعثور على جميع الـ vowels في السلسلة `quoteSample`. +استخدم character class مع حروف (`a`, `e`, `i`, `o`, `u`) في regex الخاص بك `vowelRegex` للعثور على جميع الـ vowels في المقطع النصي `quoteSample`. **ملاحظة**: تأكد من مطابقة الـ vowels الكبيرة و الصغيرة. diff --git a/curriculum/challenges/arabic/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-drum-machine.md b/curriculum/challenges/arabic/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-drum-machine.md index 9047a682546..d113b307ab5 100644 --- a/curriculum/challenges/arabic/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-drum-machine.md +++ b/curriculum/challenges/arabic/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-drum-machine.md @@ -1,6 +1,6 @@ --- id: 587d7dbc367417b2b2512bae -title: أنشئ Drum Machine +title: أنشئ آلة الطبول challengeType: 3 forumTopicId: 301370 dashedName: build-a-drum-machine diff --git a/curriculum/challenges/arabic/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-javascript-calculator.md b/curriculum/challenges/arabic/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-javascript-calculator.md index 97c68f2113b..119c29cdf6c 100644 --- a/curriculum/challenges/arabic/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-javascript-calculator.md +++ b/curriculum/challenges/arabic/03-front-end-development-libraries/front-end-development-libraries-projects/build-a-javascript-calculator.md @@ -1,6 +1,6 @@ --- id: bd7158d8c442eddfaeb5bd17 -title: أنشئ حاسبة باستخدام JavaScript +title: بناء آلة حاسبة باستخدام JavaScript challengeType: 3 forumTopicId: 301371 dashedName: build-a-javascript-calculator diff --git a/curriculum/challenges/arabic/05-back-end-development-and-apis/back-end-development-and-apis-projects/exercise-tracker.md b/curriculum/challenges/arabic/05-back-end-development-and-apis/back-end-development-and-apis-projects/exercise-tracker.md index 8f25970f37a..e706395eb64 100644 --- a/curriculum/challenges/arabic/05-back-end-development-and-apis/back-end-development-and-apis-projects/exercise-tracker.md +++ b/curriculum/challenges/arabic/05-back-end-development-and-apis/back-end-development-and-apis-projects/exercise-tracker.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --instructions-- @@ -411,7 +411,7 @@ The `description` property of any object in the `log` array that is returned fro ```js async(getUserInput) => { const url = getUserInput('url'); - const res = await fetch(url + '/api/users/', { + const res = await fetch(url + '/api/users', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', @@ -458,7 +458,7 @@ The `duration` property of any object in the `log` array that is returned from ` ```js async(getUserInput) => { const url = getUserInput('url'); - const res = await fetch(url + '/api/users/', { + const res = await fetch(url + '/api/users', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', @@ -505,7 +505,7 @@ The `date` property of any object in the `log` array that is returned from `GET ```js async(getUserInput) => { const url = getUserInput('url'); - const res = await fetch(url + '/api/users/', { + const res = await fetch(url + '/api/users', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', diff --git a/curriculum/challenges/arabic/05-back-end-development-and-apis/back-end-development-and-apis-projects/file-metadata-microservice.md b/curriculum/challenges/arabic/05-back-end-development-and-apis/back-end-development-and-apis-projects/file-metadata-microservice.md index e4a5775b2d2..dc47c463bb3 100644 --- a/curriculum/challenges/arabic/05-back-end-development-and-apis/back-end-development-and-apis-projects/file-metadata-microservice.md +++ b/curriculum/challenges/arabic/05-back-end-development-and-apis/back-end-development-and-apis-projects/file-metadata-microservice.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --instructions-- diff --git a/curriculum/challenges/arabic/05-back-end-development-and-apis/back-end-development-and-apis-projects/request-header-parser-microservice.md b/curriculum/challenges/arabic/05-back-end-development-and-apis/back-end-development-and-apis-projects/request-header-parser-microservice.md index 5e4903c1937..9fcfc56b3ef 100644 --- a/curriculum/challenges/arabic/05-back-end-development-and-apis/back-end-development-and-apis-projects/request-header-parser-microservice.md +++ b/curriculum/challenges/arabic/05-back-end-development-and-apis/back-end-development-and-apis-projects/request-header-parser-microservice.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --hints-- diff --git a/curriculum/challenges/arabic/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md b/curriculum/challenges/arabic/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md index 6554ee0ff4b..053c4671344 100644 --- a/curriculum/challenges/arabic/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md +++ b/curriculum/challenges/arabic/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md @@ -8,25 +8,25 @@ dashedName: timestamp-microservice # --description-- -Build a full stack JavaScript app that is functionally similar to this: https://timestamp-microservice.freecodecamp.rocks. Working on this project will involve you writing your code using one of the following methods: +Build a full stack JavaScript app that is functionally similar to this: https://timestamp-microservice.freecodecamp.rocks. سوف يقوم يلزمك العمل على هذا المشروع بكتابة كود باستخدام إحدى الطرق التالية: -- Clone this GitHub repo and complete your project locally. -- Use our Replit starter project to complete your project. -- Use a site builder of your choice to complete the project. Be sure to incorporate all the files from our GitHub repo. +- أستنسخ هذا مستودع من GitHub واكمل مشروعك محلياً. +- استخدم مشروعنا المبدئي في Replit لإكمال مشروعك. +- استخدم أي منشئ لموقع لإكمال المشروع. تأكد من دمج جميع الملفات من مستودعنا في GitHub في مشروعك. -If you use Replit, follow these steps to set up the project: +إذا كنت تستخدم Replit، اتبع هذه الخطوات لإعداد المشروع: -- Start by importing the project on Replit. -- Next, you will see a `.replit` window. -- Select `Use run command` and click the `Done` button. +- ابدأ باستيراد (import) المشروع على Replit. +- بعد ذلك، سترى نافذة `.replit`. +- اختار `Use run command` وانقر على زر `Done`. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. ثم أرسل عنوان (URL) إليه في خانة "رابط الحل". وإن أردت تستطيع أيضًا إرسال رابط لكود المصدر لمشروعك في الخانة "رابط Github". -**Note:** Time zones conversion is not a purpose of this project, so assume all sent valid dates will be parsed with `new Date()` as GMT dates. +**ملاحظة:** ليس الغرض من هذا المشروع تحويل المناطق الزمنية، لذلك افترض إن جميع التواريخ الصحيحة المرسلة ستحلل بواسطة `new Date()` كتواريخ GMT. # --hints-- -You should provide your own project, not the example URL. +يجب عليك تقديم URL لمشروعك، وليس عنوان المثال. ```js (getUserInput) => { @@ -36,7 +36,7 @@ You should provide your own project, not the example URL. }; ``` -A request to `/api/:date?` with a valid date should return a JSON object with a `unix` key that is a Unix timestamp of the input date in milliseconds (as type Number) +يجب أن ينتج كائن JSON عند طلب `/api/:date?` التاريخ الصحيح بهوية (key) المسمى `unix` الذي يكون طابع زمني Unix من تاريخ المدخل بالمللي ثانية (كرقم) ```js (getUserInput) => @@ -54,7 +54,7 @@ A request to `/api/:date?` with a valid date should return a JSON object with a ); ``` -A request to `/api/:date?` with a valid date should return a JSON object with a `utc` key that is a string of the input date in the format: `Thu, 01 Jan 1970 00:00:00 GMT` +يجب أن ينتج عند كائن JSON طلب `/api/:date?` مع تاريخ صحيح مع هوية `utc` وتكون قيمته مقطع نصي من تاريخ المدخل. وينسق مثل: `Thu, 01 Jan 1970 00:00:00 GMT` ```js (getUserInput) => @@ -106,7 +106,7 @@ Your project can handle dates that can be successfully parsed by `new Date(date_ ); ``` -If the input date string is invalid, the api returns an object having the structure `{ error : "Invalid Date" }` +If the input date string is invalid, the API returns an object having the structure `{ error : "Invalid Date" }` ```js (getUserInput) => diff --git a/curriculum/challenges/arabic/05-back-end-development-and-apis/back-end-development-and-apis-projects/url-shortener-microservice.md b/curriculum/challenges/arabic/05-back-end-development-and-apis/back-end-development-and-apis-projects/url-shortener-microservice.md index b3531c2adde..58cf09e170e 100644 --- a/curriculum/challenges/arabic/05-back-end-development-and-apis/back-end-development-and-apis-projects/url-shortener-microservice.md +++ b/curriculum/challenges/arabic/05-back-end-development-and-apis/back-end-development-and-apis-projects/url-shortener-microservice.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --instructions-- diff --git a/curriculum/challenges/arabic/05-back-end-development-and-apis/basic-node-and-express/meet-the-node-console.md b/curriculum/challenges/arabic/05-back-end-development-and-apis/basic-node-and-express/meet-the-node-console.md index 7a1e893fe24..3d0fd252f7f 100644 --- a/curriculum/challenges/arabic/05-back-end-development-and-apis/basic-node-and-express/meet-the-node-console.md +++ b/curriculum/challenges/arabic/05-back-end-development-and-apis/basic-node-and-express/meet-the-node-console.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. During the development process, it is important to be able to check what’s going on in your code. diff --git a/curriculum/challenges/arabic/05-back-end-development-and-apis/basic-node-and-express/serve-an-html-file.md b/curriculum/challenges/arabic/05-back-end-development-and-apis/basic-node-and-express/serve-an-html-file.md index 1d618673227..b15f95ac820 100644 --- a/curriculum/challenges/arabic/05-back-end-development-and-apis/basic-node-and-express/serve-an-html-file.md +++ b/curriculum/challenges/arabic/05-back-end-development-and-apis/basic-node-and-express/serve-an-html-file.md @@ -8,7 +8,7 @@ dashedName: serve-an-html-file # --description-- -You can respond to requests with a file using the `res.sendFile(path)` method. You can put it inside the `app.get('/', ...)` route handler. Behind the scenes, this method will set the appropriate headers to instruct your browser on how to handle the file you want to send, according to its type. Then it will read and send the file. This method needs an absolute file path. We recommend you to use the Node global variable `__dirname` to calculate the path like this: +You can respond to requests with a file using the `res.sendFile(path)` method. You can put it inside the `app.get('/', ...)` route handler. خلف الكواليس، ستضبط تلك الطريقة العناوين المناسبة لترشد متصفحك عن كيفية التعامل مع الملف الذي تريد إرساله، وفقًا لنوعه. Then it will read and send the file. This method needs an absolute file path. We recommend you to use the Node global variable `__dirname` to calculate the path like this: ```js absolutePath = __dirname + relativePath/file.ext diff --git a/curriculum/challenges/arabic/05-back-end-development-and-apis/basic-node-and-express/serve-json-on-a-specific-route.md b/curriculum/challenges/arabic/05-back-end-development-and-apis/basic-node-and-express/serve-json-on-a-specific-route.md index 1e977061c7c..91adaf364a0 100644 --- a/curriculum/challenges/arabic/05-back-end-development-and-apis/basic-node-and-express/serve-json-on-a-specific-route.md +++ b/curriculum/challenges/arabic/05-back-end-development-and-apis/basic-node-and-express/serve-json-on-a-specific-route.md @@ -18,7 +18,7 @@ Serve the object `{"message": "Hello json"}` as a response, in JSON format, to G # --hints-- -The endpoint `/json` should serve the json object `{"message": "Hello json"}` +The endpoint `/json` should serve the JSON object `{"message": "Hello json"}` ```js (getUserInput) => diff --git a/curriculum/challenges/arabic/05-back-end-development-and-apis/managing-packages-with-npm/how-to-use-package.json-the-core-of-any-node.js-project-or-npm-package.md b/curriculum/challenges/arabic/05-back-end-development-and-apis/managing-packages-with-npm/how-to-use-package.json-the-core-of-any-node.js-project-or-npm-package.md index c3085c6b7e7..252f7b168fe 100644 --- a/curriculum/challenges/arabic/05-back-end-development-and-apis/managing-packages-with-npm/how-to-use-package.json-the-core-of-any-node.js-project-or-npm-package.md +++ b/curriculum/challenges/arabic/05-back-end-development-and-apis/managing-packages-with-npm/how-to-use-package.json-the-core-of-any-node.js-project-or-npm-package.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. The `package.json` file is the center of any Node.js project or npm package. It stores information about your project, similar to how the <head> section of an HTML document describes the content of a webpage. It consists of a single JSON object where information is stored in key-value pairs. There are only two required fields; "name" and "version", but it’s good practice to provide additional information about your project that could be useful to future users or maintainers. diff --git a/curriculum/challenges/arabic/05-back-end-development-and-apis/mongodb-and-mongoose/install-and-set-up-mongoose.md b/curriculum/challenges/arabic/05-back-end-development-and-apis/mongodb-and-mongoose/install-and-set-up-mongoose.md index e85618c8dc8..19e240e2b58 100644 --- a/curriculum/challenges/arabic/05-back-end-development-and-apis/mongodb-and-mongoose/install-and-set-up-mongoose.md +++ b/curriculum/challenges/arabic/05-back-end-development-and-apis/mongodb-and-mongoose/install-and-set-up-mongoose.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. In this challenge, you will set up a MongoDB Atlas database and import the required packages to connect to it. diff --git a/curriculum/challenges/arabic/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md b/curriculum/challenges/arabic/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md index 21fe152c135..e14beb131fc 100644 --- a/curriculum/challenges/arabic/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md +++ b/curriculum/challenges/arabic/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. A template engine enables you to use static template files (such as those written in *Pug*) in your app. At runtime, the template engine replaces variables in a template file with actual values which can be supplied by your server. Then it transforms the template into a static HTML file that is sent to the client. This approach makes it easier to design an HTML page and allows for displaying variables on the page without needing to make an API call from the client. diff --git a/curriculum/challenges/arabic/06-quality-assurance/quality-assurance-and-testing-with-chai/learn-how-javascript-assertions-work.md b/curriculum/challenges/arabic/06-quality-assurance/quality-assurance-and-testing-with-chai/learn-how-javascript-assertions-work.md index 23b56148e88..c3021aaf31e 100644 --- a/curriculum/challenges/arabic/06-quality-assurance/quality-assurance-and-testing-with-chai/learn-how-javascript-assertions-work.md +++ b/curriculum/challenges/arabic/06-quality-assurance/quality-assurance-and-testing-with-chai/learn-how-javascript-assertions-work.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. # --instructions-- diff --git a/curriculum/challenges/arabic/06-quality-assurance/quality-assurance-projects/american-british-translator.md b/curriculum/challenges/arabic/06-quality-assurance/quality-assurance-projects/american-british-translator.md index 7ebf38ca39d..06069d9be10 100644 --- a/curriculum/challenges/arabic/06-quality-assurance/quality-assurance-projects/american-british-translator.md +++ b/curriculum/challenges/arabic/06-quality-assurance/quality-assurance-projects/american-british-translator.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --instructions-- diff --git a/curriculum/challenges/arabic/06-quality-assurance/quality-assurance-projects/issue-tracker.md b/curriculum/challenges/arabic/06-quality-assurance/quality-assurance-projects/issue-tracker.md index 58acba61876..15d2437574f 100644 --- a/curriculum/challenges/arabic/06-quality-assurance/quality-assurance-projects/issue-tracker.md +++ b/curriculum/challenges/arabic/06-quality-assurance/quality-assurance-projects/issue-tracker.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --instructions-- diff --git a/curriculum/challenges/arabic/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md b/curriculum/challenges/arabic/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md index f847638bba4..90e2329e195 100644 --- a/curriculum/challenges/arabic/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md +++ b/curriculum/challenges/arabic/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --instructions-- diff --git a/curriculum/challenges/arabic/06-quality-assurance/quality-assurance-projects/personal-library.md b/curriculum/challenges/arabic/06-quality-assurance/quality-assurance-projects/personal-library.md index 31b48ccb37b..a6abf77e231 100644 --- a/curriculum/challenges/arabic/06-quality-assurance/quality-assurance-projects/personal-library.md +++ b/curriculum/challenges/arabic/06-quality-assurance/quality-assurance-projects/personal-library.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --instructions-- diff --git a/curriculum/challenges/arabic/06-quality-assurance/quality-assurance-projects/sudoku-solver.md b/curriculum/challenges/arabic/06-quality-assurance/quality-assurance-projects/sudoku-solver.md index 096971fa4d1..ee1c337c9f5 100644 --- a/curriculum/challenges/arabic/06-quality-assurance/quality-assurance-projects/sudoku-solver.md +++ b/curriculum/challenges/arabic/06-quality-assurance/quality-assurance-projects/sudoku-solver.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --instructions-- diff --git a/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/data-analysis-example-a.md b/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/data-analysis-example-a.md index 5af2ffef9af..b8303dfe789 100644 --- a/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/data-analysis-example-a.md +++ b/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/data-analysis-example-a.md @@ -16,8 +16,8 @@ dashedName: data-analysis-example-a More resources: -- Notebooks on GitHub -- How to open Notebooks from GitHub using Google Colab. +- Notebooks على GitHub +- كيفية فتح Notebooks من GitHub باستخدام Google Colab. # --question-- diff --git a/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/data-analysis-example-b.md b/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/data-analysis-example-b.md index 19441c3cd45..68d4726de00 100644 --- a/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/data-analysis-example-b.md +++ b/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/data-analysis-example-b.md @@ -16,8 +16,8 @@ dashedName: data-analysis-example-b More resources: -- Notebooks on GitHub -- How to open Notebooks from GitHub using Google Colab. +- Notebooks على GitHub +- كيفية فتح Notebook من GitHub باستخدام Google Colab. # --question-- diff --git a/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/data-cleaning-and-visualizations.md b/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/data-cleaning-and-visualizations.md index 340cd5351d6..3d0c996789f 100644 --- a/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/data-cleaning-and-visualizations.md +++ b/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/data-cleaning-and-visualizations.md @@ -16,8 +16,8 @@ dashedName: data-cleaning-and-visualizations More resources: -- Notebooks on GitHub -- How to open Notebooks from GitHub using Google Colab. +- Notebooks على GitHub +- كيفية فتح Notebook من GitHub باستخدام Google Colab. # --question-- diff --git a/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/data-cleaning-with-dataframes.md b/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/data-cleaning-with-dataframes.md index e1a58cfd19c..3f009dadd5a 100644 --- a/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/data-cleaning-with-dataframes.md +++ b/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/data-cleaning-with-dataframes.md @@ -16,8 +16,8 @@ dashedName: data-cleaning-with-dataframes More resources: -- Notebooks on GitHub -- How to open Notebooks from GitHub using Google Colab. +- Notebooks على GitHub +- كيفية فتح Notebooks من GitHub باستخدام Google Colab. # --question-- diff --git a/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/jupyter-notebooks-cells.md b/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/jupyter-notebooks-cells.md index d266151844d..869c74f4398 100644 --- a/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/jupyter-notebooks-cells.md +++ b/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/jupyter-notebooks-cells.md @@ -16,8 +16,8 @@ dashedName: jupyter-notebooks-cells More resources: -- Notebooks on GitHub -- How to open Notebooks from GitHub using Google Colab. +- Notebooks في GitHub +- كيفية فتح (Notebook) من (GitHub) باستخدام (Google Colab). # --question-- diff --git a/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/jupyter-notebooks-importing-and-exporting-data.md b/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/jupyter-notebooks-importing-and-exporting-data.md index be927727e87..343133d911e 100644 --- a/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/jupyter-notebooks-importing-and-exporting-data.md +++ b/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/jupyter-notebooks-importing-and-exporting-data.md @@ -16,8 +16,8 @@ dashedName: jupyter-notebooks-importing-and-exporting-data More resources: -- Notebooks on GitHub -- How to open Notebooks from GitHub using Google Colab. +- Notebooks في GitHub +- كيفية فتح Notebook من GitHub باستخدام Google Colab. # --question-- diff --git a/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/numpy-algebra-and-size.md b/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/numpy-algebra-and-size.md index d6292da8d5c..a68eef03d86 100644 --- a/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/numpy-algebra-and-size.md +++ b/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/numpy-algebra-and-size.md @@ -16,8 +16,8 @@ dashedName: numpy-algebra-and-size More resources: -- Notebooks on GitHub -- How to open Notebooks from GitHub using Google Colab. +- Notebooks في GitHub +- كيفية فتح Notebooks من GitHub باستخدام Google Colab. # --question-- diff --git a/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/numpy-introduction-a.md b/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/numpy-introduction-a.md index d9f980b8ae1..9f450d3f069 100644 --- a/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/numpy-introduction-a.md +++ b/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/numpy-introduction-a.md @@ -16,8 +16,8 @@ dashedName: numpy-introduction-a More resources: -- Notebooks on GitHub -- How to open Notebooks from GitHub using Google Colab. +- Notebooks في GitHub +- كيفية فتح Notebooks من GitHub باستخدام Google Colab. # --question-- diff --git a/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/numpy-introduction-b.md b/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/numpy-introduction-b.md index f76d5bf6d1c..f0fc8bcb21b 100644 --- a/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/numpy-introduction-b.md +++ b/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/numpy-introduction-b.md @@ -16,8 +16,8 @@ dashedName: numpy-introduction-b More resources: -- Notebooks on GitHub -- How to open Notebooks from GitHub using Google Colab. +- Notebooks في GitHub +- كيفية فتح Notebooks من GitHub باستخدام Google Colab. # --question-- diff --git a/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/numpy-operations.md b/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/numpy-operations.md index 166ee7c6d05..c5132c8e507 100644 --- a/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/numpy-operations.md +++ b/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/numpy-operations.md @@ -16,8 +16,8 @@ dashedName: numpy-operations More resources: -- Notebooks on GitHub -- How to open Notebooks from GitHub using Google Colab. +- Notebooks في GitHub +- كيفية فتح Notebooks من GitHub باستخدام Google Colab. # --question-- diff --git a/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/pandas-conditional-selection-and-modifying-dataframes.md b/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/pandas-conditional-selection-and-modifying-dataframes.md index d16b2a8235f..5c358d257b8 100644 --- a/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/pandas-conditional-selection-and-modifying-dataframes.md +++ b/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/pandas-conditional-selection-and-modifying-dataframes.md @@ -16,8 +16,8 @@ dashedName: pandas-conditional-selection-and-modifying-dataframes More resources: -- Notebooks on GitHub -- How to open Notebooks from GitHub using Google Colab. +- Notebooks في GitHub +- كيفية فتح Notebook من GitHub باستخدام Google Colab. # --question-- diff --git a/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/pandas-creating-columns.md b/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/pandas-creating-columns.md index c9bd03fcb63..0c78b59b512 100644 --- a/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/pandas-creating-columns.md +++ b/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/pandas-creating-columns.md @@ -16,8 +16,8 @@ dashedName: pandas-creating-columns More resources: -- Notebooks on GitHub -- How to open Notebooks from GitHub using Google Colab. +- Notebooks في GitHub +- كيفية فتح (Notebook) من (GitHub) باستخدام (Google Colab). # --question-- diff --git a/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/python-functions-and-collections.md b/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/python-functions-and-collections.md index fdce91d05f7..0ce305f71c1 100644 --- a/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/python-functions-and-collections.md +++ b/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/python-functions-and-collections.md @@ -16,8 +16,8 @@ dashedName: python-functions-and-collections More resources: -- Notebooks on GitHub -- How to open Notebooks from GitHub using Google Colab. +- Notebooks في GitHub +- كيفية فتح Notebooks من GitHub باستخدام Google Colab. # --question-- diff --git a/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/python-introduction.md b/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/python-introduction.md index 8bd079a0a4f..7b932c803e3 100644 --- a/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/python-introduction.md +++ b/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/python-introduction.md @@ -16,8 +16,8 @@ dashedName: python-introduction More resources: -- Notebooks on GitHub -- How to open Notebooks from GitHub using Google Colab. +- Notebooks في GitHub +- كيفية فتح Notebooks من GitHub باستخدام Google Colab. # --question-- diff --git a/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/python-iteration-and-modules.md b/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/python-iteration-and-modules.md index fddbd3b10c9..0fc48fb2801 100644 --- a/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/python-iteration-and-modules.md +++ b/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/python-iteration-and-modules.md @@ -16,8 +16,8 @@ dashedName: python-iteration-and-modules More resources: -- Notebooks on GitHub -- How to open Notebooks from GitHub using Google Colab. +- Notebooks في GitHub +- كيفية فتح Notebooks من GitHub باستخدام Google Colab. # --question-- diff --git a/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/reading-data-csv-and-txt.md b/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/reading-data-csv-and-txt.md index 0291043e715..4c84ec0dc74 100644 --- a/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/reading-data-csv-and-txt.md +++ b/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/reading-data-csv-and-txt.md @@ -16,8 +16,8 @@ dashedName: reading-data-csv-and-txt More resources: -- Notebooks on GitHub -- How to open Notebooks from GitHub using Google Colab. +- Notebooks في GitHub +- كيفية فتح Notebooks من GitHub باستخدام Google Colab. # --question-- diff --git a/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/reading-data-from-databases.md b/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/reading-data-from-databases.md index 21186179430..f6578128629 100644 --- a/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/reading-data-from-databases.md +++ b/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/reading-data-from-databases.md @@ -16,8 +16,8 @@ dashedName: reading-data-from-databases More resources: -- Notebooks on GitHub -- How to open Notebooks from GitHub using Google Colab. +- Notebooks في GitHub +- كيفية فتح Notebooks من GitHub باستخدام Google Colab. # --question-- diff --git a/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/reading-data-introduction.md b/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/reading-data-introduction.md index 2822287ab61..1c067111e1b 100644 --- a/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/reading-data-introduction.md +++ b/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-course/reading-data-introduction.md @@ -16,8 +16,8 @@ dashedName: reading-data-introduction More resources: -- Notebooks on GitHub -- How to open Notebooks from GitHub using Google Colab. +- Notebooks في GitHub +- كيفية فتح Notebooks من GitHub باستخدام Google Colab. # --question-- diff --git a/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-projects/sea-level-predictor.md b/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-projects/sea-level-predictor.md index 6e50f9b861a..3b3ad3a4b1f 100644 --- a/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-projects/sea-level-predictor.md +++ b/curriculum/challenges/arabic/08-data-analysis-with-python/data-analysis-with-python-projects/sea-level-predictor.md @@ -28,7 +28,7 @@ You will analyze a dataset of the global average sea level change since 1880. Yo Use the data to complete the following tasks: - Use Pandas to import the data from `epa-sea-level.csv`. -- Use matplotlib to create a scatter plot using the `Year` column as the x-axis and the `CSIRO Adjusted Sea Level` column as the y-axix. +- Use matplotlib to create a scatter plot using the `Year` column as the x-axis and the `CSIRO Adjusted Sea Level` column as the y-axis. - Use the `linregress` function from `scipy.stats` to get the slope and y-intercept of the line of best fit. Plot the line of best fit over the top of the scatter plot. Make the line go through the year 2050 to predict the sea level rise in 2050. - Plot a new line of best fit just using the data from year 2000 through the most recent year in the dataset. Make the line also go through the year 2050 to predict the sea level rise in 2050 if the rate of rise continues as it has since the year 2000. - The x label should be `Year`, the y label should be `Sea Level (inches)`, and the title should be `Rise in Sea Level`. diff --git a/curriculum/challenges/arabic/09-information-security/information-security-projects/anonymous-message-board.md b/curriculum/challenges/arabic/09-information-security/information-security-projects/anonymous-message-board.md index b34a819caaa..f219e784a77 100644 --- a/curriculum/challenges/arabic/09-information-security/information-security-projects/anonymous-message-board.md +++ b/curriculum/challenges/arabic/09-information-security/information-security-projects/anonymous-message-board.md @@ -22,7 +22,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --instructions-- diff --git a/curriculum/challenges/arabic/09-information-security/information-security-projects/secure-real-time-multiplayer-game.md b/curriculum/challenges/arabic/09-information-security/information-security-projects/secure-real-time-multiplayer-game.md index ae8a2cc7f90..361ebe837ea 100644 --- a/curriculum/challenges/arabic/09-information-security/information-security-projects/secure-real-time-multiplayer-game.md +++ b/curriculum/challenges/arabic/09-information-security/information-security-projects/secure-real-time-multiplayer-game.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --instructions-- diff --git a/curriculum/challenges/arabic/09-information-security/information-security-projects/stock-price-checker.md b/curriculum/challenges/arabic/09-information-security/information-security-projects/stock-price-checker.md index afa2e0cb78c..08b61006de7 100644 --- a/curriculum/challenges/arabic/09-information-security/information-security-projects/stock-price-checker.md +++ b/curriculum/challenges/arabic/09-information-security/information-security-projects/stock-price-checker.md @@ -24,7 +24,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --instructions-- diff --git a/curriculum/challenges/arabic/09-information-security/information-security-with-helmetjs/install-and-require-helmet.md b/curriculum/challenges/arabic/09-information-security/information-security-with-helmetjs/install-and-require-helmet.md index aa629a3d144..172f70d0c97 100644 --- a/curriculum/challenges/arabic/09-information-security/information-security-with-helmetjs/install-and-require-helmet.md +++ b/curriculum/challenges/arabic/09-information-security/information-security-with-helmetjs/install-and-require-helmet.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Helmet helps you secure your Express apps by setting various HTTP headers. diff --git a/curriculum/challenges/arabic/10-coding-interview-prep/algorithms/implement-binary-search.md b/curriculum/challenges/arabic/10-coding-interview-prep/algorithms/implement-binary-search.md index bd2e8306ee1..caa2c40514c 100644 --- a/curriculum/challenges/arabic/10-coding-interview-prep/algorithms/implement-binary-search.md +++ b/curriculum/challenges/arabic/10-coding-interview-prep/algorithms/implement-binary-search.md @@ -10,9 +10,10 @@ dashedName: implement-binary-search Binary search is an **O(log(n))** efficiency algorithm for searching a sorted array to find an element. It operates using the following steps: -1. Find the middle `value` of a sorted array. If `value == target` return (found it!). +1. Find the middle `value` of a sorted array. If `value == target` return `true` (The value has been found and the search is complete). 1. If middle `value < target`, search right half of array in next compare. 1. If middle `value > target`, search left half of array in next compare. +1. If after searching the whole array the value is not present, return `false` (The array has been searched and the value is not in the array). As you can see, you are successively halving an array, which gives you the log(n) efficiency. For this challenge, we want you to show your work - how you got to the target value... the path you took! @@ -20,7 +21,7 @@ As you can see, you are successively halving an array, which gives you the log(n Write a function `binarySearch` that implements the binary search algorithm on an array, returning the path you took (each middle value comparison) to find the target in an array. -The function takes a sorted array of integers and a target value as input. It returns an array containing (in-order) the middle value you found at each halving of the original array until you found the target value. The target value should be the last element of the returned array. If value not is found, return the string `Value Not Found`. +The function takes a sorted array of integers and a target value as input. It returns an array containing (in-order) the middle value you found at each halving of the original array until you found the target value. The target value should be the last element of the returned array. If the value is not found, return the string `Value Not Found`. For example, `binarySearch([1,2,3,4,5,6,7], 5)` would return `[4,6,5]`. diff --git a/curriculum/challenges/arabic/10-coding-interview-prep/take-home-projects/build-a-nightlife-coordination-app.md b/curriculum/challenges/arabic/10-coding-interview-prep/take-home-projects/build-a-nightlife-coordination-app.md index 8dd028cc0c2..c75478c71af 100644 --- a/curriculum/challenges/arabic/10-coding-interview-prep/take-home-projects/build-a-nightlife-coordination-app.md +++ b/curriculum/challenges/arabic/10-coding-interview-prep/take-home-projects/build-a-nightlife-coordination-app.md @@ -22,7 +22,7 @@ Here are the specific user stories you should implement for this project: **Hint:** Try using the Yelp API to find venues in the cities your users search for. If you use Yelp's API, be sure to mention so in your app. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --solutions-- diff --git a/curriculum/challenges/arabic/10-coding-interview-prep/take-home-projects/build-a-voting-app.md b/curriculum/challenges/arabic/10-coding-interview-prep/take-home-projects/build-a-voting-app.md index c5e1f8c05dd..e70b3566764 100644 --- a/curriculum/challenges/arabic/10-coding-interview-prep/take-home-projects/build-a-voting-app.md +++ b/curriculum/challenges/arabic/10-coding-interview-prep/take-home-projects/build-a-voting-app.md @@ -28,7 +28,7 @@ Here are the specific user stories you should implement for this project: **User Story:** As an authenticated user, if you don't like the options on a poll, you can create a new option. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --solutions-- diff --git a/curriculum/challenges/arabic/10-coding-interview-prep/take-home-projects/build-an-image-search-abstraction-layer.md b/curriculum/challenges/arabic/10-coding-interview-prep/take-home-projects/build-an-image-search-abstraction-layer.md index 47cee2ababe..4c4540d7fce 100644 --- a/curriculum/challenges/arabic/10-coding-interview-prep/take-home-projects/build-an-image-search-abstraction-layer.md +++ b/curriculum/challenges/arabic/10-coding-interview-prep/take-home-projects/build-an-image-search-abstraction-layer.md @@ -18,7 +18,7 @@ Here are the specific user stories you should implement for this project: **User Story:** You can get a list of the most recently submitted search strings. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --solutions-- diff --git a/curriculum/challenges/arabic/10-coding-interview-prep/take-home-projects/chart-the-stock-market.md b/curriculum/challenges/arabic/10-coding-interview-prep/take-home-projects/chart-the-stock-market.md index a5562365284..c43de0dbaef 100644 --- a/curriculum/challenges/arabic/10-coding-interview-prep/take-home-projects/chart-the-stock-market.md +++ b/curriculum/challenges/arabic/10-coding-interview-prep/take-home-projects/chart-the-stock-market.md @@ -20,7 +20,7 @@ Here are the specific user stories you should implement for this project: **User Story:** You can see changes in real-time when any other user adds or removes a stock. For this you will need to use Web Sockets. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --solutions-- diff --git a/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/elements-and-tags-question-a.md b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/elements-and-tags-question-a.md new file mode 100644 index 00000000000..f4b05b12871 --- /dev/null +++ b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/elements-and-tags-question-a.md @@ -0,0 +1,54 @@ +--- +id: 637f4e0e72c65bc8e73dfe1e +videoId: LGQuIIv2RVA +title: Elements and Tags Question A +challengeType: 15 +dashedName: elements-and-tags-question-a +--- + +# --description-- + +Almost all elements on an HTML page are just pieces of content wrapped in opening and closing HTML tags. + +Opening tags tell the browser this is the start of an HTML element. They are comprised of a keyword enclosed in angle brackets `<>`. For example, an opening paragraph tag looks like this: `

`. + +Closing tags tell the browser where an element ends. They are almost the same as opening tags; the only difference is that they have a forward slash before the keyword. For example, a closing paragraph tag looks like this: `

`. + +A full paragraph element looks like this: + +element diagram + +You can think of elements as containers for content. The opening and closing tags tell the browser what content the element contains. The browser can then use that information to determine how it should interpret and format the content. + +There are some HTML elements that do not have a closing tag. These elements often look like this: `
` or ``, but some can also be used without the closing forward slash such as `
` or ``. These are known as self-closing tags or empty elements because they don’t wrap any content. You will encounter a few of these in later lessons, but for the most part, elements will have both opening and closing tags. + +HTML has a vast list of predefined tags that you can use to create all kinds of different elements. It is important to use the correct tags for content. Using the correct tags can have a big impact on two aspects of your sites: how they are ranked in search engines; and how accessible they are to users who rely on assistive technologies, like screen readers, to use the internet. + +Using the correct elements for content is called semantic HTML. You will explore this in much more depth later on in the curriculum. + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s [Introduction to HTML video](https://www.youtube.com/watch?v=LGQuIIv2RVA&list=PL4-IK0AVhVjM0xE0K2uZRvsM7LkIhsPT-) + +## --text-- + +What are HTML tags? + +## --answers-- + +HTML tags tell the browser what content an element contains. + +--- + +HTML tags tell the browser when to load its content. + +--- + +HTML tags tell the browser what content the next element contains. + + +## --video-solution-- + +1 diff --git a/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/elements-and-tags-question-b.md b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/elements-and-tags-question-b.md new file mode 100644 index 00000000000..9e8720616fb --- /dev/null +++ b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/elements-and-tags-question-b.md @@ -0,0 +1,50 @@ +--- +id: 637f4e1672c65bc8e73dfe1f +videoId: LGQuIIv2RVA +title: Elements and Tags Question B +challengeType: 15 +dashedName: elements-and-tags-question-b +--- + +# --description-- + +Almost all elements on an HTML page are just pieces of content wrapped in opening and closing HTML tags. + +Opening tags tell the browser this is the start of an HTML element. They are comprised of a keyword enclosed in angle brackets <>. For example, an opening paragraph tag looks like this: `

`. + +Closing tags tell the browser where an element ends. They are almost the same as opening tags; the only difference is that they have a forward slash before the keyword. For example, a closing paragraph tag looks like this: `

`. + +A full paragraph element looks like this: + +element diagram + +You can think of elements as containers for content. The opening and closing tags tell the browser what content the element contains. The browser can then use that information to determine how it should interpret and format the content. + +There are some HTML elements that do not have a closing tag. These elements often look like this: `
` or ``, but some can also be used without the closing forward slash such as `
` or ``. These are known as self-closing tags or empty elements because they don’t wrap any content. You will encounter a few of these in later lessons, but for the most part, elements will have both opening and closing tags. + +HTML has a vast list of predefined tags that you can use to create all kinds of different elements. It is important to use the correct tags for content. Using the correct tags can have a big impact on two aspects of your sites: how they are ranked in search engines; and how accessible they are to users who rely on assistive technologies, like screen readers, to use the internet. + +Using the correct elements for content is called semantic HTML. You will explore this in much more depth later on in the curriculum. + +# --question-- + +## --text-- + +What are the three parts of most HTML elements? + +## --answers-- + +An opening tag, self closing tag, and content. + +--- + +An opening tag, closing tag, and content. + +--- + +An opening tag, closing tag, and attribute. + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/html-boilerplate-question-a.md b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/html-boilerplate-question-a.md new file mode 100644 index 00000000000..d563ebf0ac3 --- /dev/null +++ b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/html-boilerplate-question-a.md @@ -0,0 +1,55 @@ +--- +id: 637f4e1c72c65bc8e73dfe20 +videoId: V8UAEoOvqFg +title: HTML Boilerplate Question A +challengeType: 15 +dashedName: html-boilerplate-question-a +--- + +# --description-- + +To demonstrate an HTML boilerplate, you first need an HTML file to work with. + +Create a new folder on your computer and name it `html-boilerplate`. Within that folder create a new file and name it `index.html`. + +You’re probably already familiar with a lot of different types of files, for example doc, pdf, and image files. + +To let the computer know you want to create an HTML file, you need to append the filename with the `.html` extension as you have done when creating the `index.html` file. + +It is worth noting that you named your HTML file index. You should always name the HTML file that will contain the homepage of your websites `index.html`. This is because web servers will by default look for an index.html page when users land on your websites - and not having one will cause big problems. + +## The DOCTYPE + +Every HTML page starts with a doctype declaration. The doctype’s purpose is to tell the browser what version of HTML it should use to render the document. The latest version of HTML is HTML5, and the doctype for that version is simply ``. + +The doctypes for older versions of HTML were a bit more complicated. For example, this is the doctype declaration for HTML4: + +```html + +``` + +However, you probably won’t ever want to be using an older version of HTML, and so you’ll always use ``. + +Open the `index.html` file created earlier in your text editor and add `` to the very first line. + +# --question-- +## --text-- + +What is the purpose of the `DOCTYPE` declaration? + +## --answers-- + +It tells the browser which version of HTML to use to render the document. + +--- + +It tells the browser that this document uses JavaScript. + +--- + +It tells the browser the title of the document. + + +## --video-solution-- + +1 diff --git a/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/html-boilerplate-question-b.md b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/html-boilerplate-question-b.md new file mode 100644 index 00000000000..7a528432239 --- /dev/null +++ b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/html-boilerplate-question-b.md @@ -0,0 +1,47 @@ +--- +id: 637f4e2872c65bc8e73dfe21 +videoId: V8UAEoOvqFg +title: HTML Boilerplate Question B +challengeType: 15 +dashedName: html-boilerplate-question-b +--- + +# --description-- + +After you declare the doctype, you need to provide an `` element. This is what’s known as the root element of the document, meaning that every other element in the document will be a descendant of it. + +This becomes more important later on when you learn about manipulating HTML with JavaScript. For now, just know that the `html` element should be included on every HTML document. + +Back in the `index.html` file, let’s add the `` element by typing out its opening and closing tags, like so: + +```html + + + +``` + +## What is the lang attribute? +`lang` specifies the language of the text content in that element. This attribute is primarily used for improving accessibility of the webpage. It allows assistive technologies, for example screen readers, to adapt according to the language and invoke correct pronunciation. + +# --question-- + +## --text-- + +What is the `html` element? + +## --answers-- + +It is the root element in the document and tells the browser which version of HTML it should use. + +--- + +It is the root element in the document and all other elements should descend from it. + +--- + +It is the root element in the document and all other elements should come after it. + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/html-boilerplate-question-c.md b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/html-boilerplate-question-c.md new file mode 100644 index 00000000000..76ceb2841e5 --- /dev/null +++ b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/html-boilerplate-question-c.md @@ -0,0 +1,66 @@ +--- +id: 637f4e2f72c65bc8e73dfe22 +videoId: LGQuIIv2RVA +title: HTML Boilerplate Question C +challengeType: 15 +dashedName: html-boilerplate-question-c +--- + +# --description-- + +The `` element is where you put important meta-information about your webpages, and stuff required for your webpages to render correctly in the browser. Inside the ``, you should not use any element that displays content on the webpage. + +## The Charset Meta Element +You should always have the `meta` tag for the charset encoding of the webpage in the head element: ``. + +Setting the encoding is very important because it ensures that the webpage will display special symbols and characters from different languages correctly in the browser. + +## Title Element +Another element you should always include in the head of an HTML document is the `title` element: + +```html +My First Webpage +``` + +The `title` element is used to give webpages a human-readable title which is displayed in your webpage’s browser tab. + +If you didn’t include a `title` element, the webpage’s title would default to its file name. In your case that would be `index.html`, which isn’t very meaningful for users; this would make it very difficult to find your webpage if the user has many browser tabs open. + +There are many more elements that can go within the `head` of an HTML document. However, for now it’s only crucial to know about the two elements you have covered here. You will introduce more elements that go into the `head` throughout the rest of the curriculum. + +Back in `index.html` file, let’s add a `head` element with a `charset` `meta` element and a `title` within it. The head element goes within the HTML element and should always be the first element under the opening `` tag: + + +```html + + + + + + My First Webpage + + +``` + +# --question-- + +## --text-- + +What is the purpose of the `head` element? + +## --answers-- + +The `head` element is used to display all elements that are displayed on the webpage. + +--- + +The `head` element is used to display important information about your webpage and is used to render web pages correctly with `meta` elements. + +--- + +The `head` element is used to display the header content on top of the webpage. + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/html-boilerplate-question-d.md b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/html-boilerplate-question-d.md new file mode 100644 index 00000000000..302b6a95d44 --- /dev/null +++ b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/html-boilerplate-question-d.md @@ -0,0 +1,48 @@ +--- +id: 637f4e3672c65bc8e73dfe23 +videoId: V8UAEoOvqFg +title: HTML Boilerplate Question D +challengeType: 15 +dashedName: html-boilerplate-question-d +--- + +# --description-- + +The final element needed to complete the HTML boilerplate is the `` element. This is where all the content that will be displayed to users will go - the text, images, lists, links, and so on. + +To complete the boilerplate, add a `body` element to the `index.html` file. The `body` element also goes within the `html` element and is always below the `head` element, like so: + +# --question-- + +## --assignment-- + +Watch and follow along to Kevin Powell’s brilliant Building your first web page video above. + +--- + +Build some muscle memory by deleting the contents of the `index.html` file and trying to write out all the boilerplate again from memory. Don’t worry if you have to peek at the lesson content the first few times if you get stuck. Just keep going until you can do it a couple of times from memory. + +--- + +Run your boilerplate through this [HTML validator](https://www.freeformatter.com/html-validator.html). Validators ensure your markup is correct and are an excellent learning tool, as they provide feedback on syntax errors you may be making often and aren’t aware of, such as missing closing tags and extra spaces in your HTML. + +## --text-- + +What is the purpose of the `body` element? + +## --answers-- + +This is where all important information about the webpage is displayed such as the `title` and `meta` tags. + +--- + +This is where you tell the browser how to render the webpage correctly. + +--- + +This is where all content will be displayed on the page such images, text, and links. + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-a.md b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-a.md new file mode 100644 index 00000000000..aa20f137e89 --- /dev/null +++ b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-a.md @@ -0,0 +1,42 @@ +--- +id: 6374f208de18c50e48ba767b +videoId: LGQuIIv2RVA +title: Introduction To HTML and CSS Question A +challengeType: 15 +dashedName: introduction-to-html-and-css-question-a +--- + +# --description-- + +HTML and CSS are two languages that work together to create everything that you see when you look at something on the internet. HTML is the raw data that a webpage is built out of. All the text, links, cards, lists, and buttons are created in HTML. CSS is what adds style to those plain elements. HTML puts information on a webpage, and CSS positions that information, gives it color, changes the font, and makes it look great! + +Many helpful resources out there keep referring to HTML and CSS as programming languages, but if you want to get technical, labeling them as such is not quite accurate. This is because they are only concerned with presenting information. They are not used to program logic. JavaScript, which you will learn in the next section, is a programming language because it’s used to make webpages do things. Yet, there is quite a lot you can do with just HTML and CSS, and you will definitely need them both. Throughout our curriculum, the following lessons focus on giving you the tools you need to succeed once you reach JavaScript content. + +# --question-- + +## --assignment-- + +Read the HTML vs CSS vs JavaScript article. It is a quick overview of the relationships between HTML, CSS, and JavaScript. + +## --text-- + +Which of the following statements is true? + +## --answers-- + +CSS is used to create the basic structure of a webpage, and HTML is used to add style. + +--- + +HTML is used to create the basic structure of a webpage, and CSS is used to add style. + +--- + +HTML and CSS are used to add style to a webpage, and JavaScript is used to create the basic structure. + + +## --video-solution-- + +2 + + diff --git a/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-b.md b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-b.md new file mode 100644 index 00000000000..cd9cf900330 --- /dev/null +++ b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-b.md @@ -0,0 +1,37 @@ +--- +id: 6376327e2724a688c04636e3 +videoId: LGQuIIv2RVA +title: Introduction To HTML and CSS Question B +challengeType: 15 +dashedName: introduction-to-html-and-css-question-b +--- + +# --description-- + + +HTML and CSS are two languages that work together to create everything that you see when you look at something on the internet. HTML is the raw data that a webpage is built out of. All the text, links, cards, lists, and buttons are created in HTML. CSS is what adds style to those plain elements. HTML puts information on a webpage, and CSS positions that information, gives it color, changes the font, and makes it look great! + +Many helpful resources out there keep referring to HTML and CSS as programming languages, but if you want to get technical, labeling them as such is not quite accurate. This is because they are only concerned with presenting information. They are not used to program logic. JavaScript, which you will learn in the next section, is a programming language because it’s used to make webpages do things. Yet, there is quite a lot you can do with just HTML and CSS, and you will definitely need them both. Throughout our curriculum, the following lessons focus on giving you the tools you need to succeed once you reach JavaScript content. + +# --question-- + +## --text-- + +Between HTML and CSS, which should you use to add paragraphs of text on a webpage? + +## --answers-- + +CSS + +--- + +JavaScript + +--- + +HTML + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-c.md b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-c.md new file mode 100644 index 00000000000..eb759394680 --- /dev/null +++ b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-c.md @@ -0,0 +1,34 @@ +--- +id: 637633162724a688c04636e4 +videoId: LGQuIIv2RVA +title: Introduction To HTML and CSS Question C +challengeType: 15 +dashedName: introduction-to-html-and-css-question-c +--- + +# --description-- + +HTML and CSS are two languages that work together to create everything that you see when you look at something on the internet. HTML is the raw data that a webpage is built out of. All the text, links, cards, lists, and buttons are created in HTML. CSS is what adds style to those plain elements. HTML puts information on a webpage, and CSS positions that information, gives it color, changes the font, and makes it look great! + +Many helpful resources out there keep referring to HTML and CSS as programming languages, but if you want to get technical, labeling them as such is not quite accurate. This is because they are only concerned with presenting information. They are not used to program logic. JavaScript, which you will learn in the next section, is a programming language because it’s used to make webpages do things. Yet, there is quite a lot you can do with just HTML and CSS, and you will definitely need them both. Throughout our curriculum, the following lessons focus on giving you the tools you need to succeed once you reach JavaScript content. +# --question-- + +## --text-- + +Between HTML and CSS, which should you use to change the font and background color of a button? + +## --answers-- + +You should use CSS to change the background color and font of a button. + +--- + +You should use JavaScript to change the background color and font of a button. + +--- + +You should use HTML to change the background color and font of a button. + +## --video-solution-- + +1 diff --git a/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-d.md b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-d.md new file mode 100644 index 00000000000..9e9ee049b75 --- /dev/null +++ b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-d.md @@ -0,0 +1,35 @@ +--- +id: 637633672724a688c04636e5 +videoId: LGQuIIv2RVA +title: Introduction To HTML and CSS Question D +challengeType: 15 +dashedName: introduction-to-html-and-css-question-d +--- + +# --description-- + +HTML and CSS are two languages that work together to create everything that you see when you look at something on the internet. HTML is the raw data that a webpage is built out of. All the text, links, cards, lists, and buttons are created in HTML. CSS is what adds style to those plain elements. HTML puts information on a webpage, and CSS positions that information, gives it color, changes the font, and makes it look great! + +Many helpful resources out there keep referring to HTML and CSS as programming languages, but if you want to get technical, labeling them as such is not quite accurate. This is because they are only concerned with presenting information. They are not used to program logic. JavaScript, which you will learn in the next section, is a programming language because it’s used to make webpages do things. Yet, there is quite a lot you can do with just HTML and CSS, and you will definitely need them both. Throughout our curriculum, the following lessons focus on giving you the tools you need to succeed once you reach JavaScript content. + +# --question-- + +## --text-- + +What is the difference between HTML, CSS, and JavaScript? + +## --answers-- + +HTML is for creating interactive elements, CSS is for the look and feel, and JavaScript is for creating the structure of a webpage. + +--- + +CSS is for the look and feel, JavaScript is for creating interactive elements, and HTML is for creating the structure of a webpage. + +--- + +JavaScript is for the look and feel, CSS is for creating the structure, and HTML is for creating interactive elements of a webpage. + +## --video-solution-- + +2 diff --git a/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/links-and-images-question-a.md b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/links-and-images-question-a.md new file mode 100644 index 00000000000..b4d237448f3 --- /dev/null +++ b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/links-and-images-question-a.md @@ -0,0 +1,66 @@ +--- +id: 637f704072c65bc8e73dfe36 +videoId: tsEQgGjSmkM +title: Links and Images Question A +challengeType: 15 +dashedName: links-and-images-question-a +--- + +# --description-- + +To get some practice using links and images throughout this lesson you need an HTML project to work with. + +- Create a new directory named `odin-links-and-images`. + +- Within that directory, create a new file named `index.html`. + +- Fill in the usual HTML boilerplate. + +- Finally, add the following `h1` to the `body`: `

Homepage

` + +## Anchor Elements +To create a link in HTML, you use the anchor element. An anchor element is defined by wrapping the text or another HTML element you want to be a link with an `` tag. Add the following to the `body` of the `index.html` page you created and open it in the browser: + +```html +click me +``` + +You may have noticed that clicking this link doesn’t do anything. This is because an anchor tag on its own won’t know where you want to link to. You have to tell it a destination to go to. You do this by using an HTML attribute. + +An HTML attribute gives additional information to an HTML element and always goes in the element’s opening tag. An attribute is usually made up of two parts: a name, and a value; however, not all attributes require a value. In your case, you need to add a `href` (hyperlink reference) attribute to the opening anchor tag. The value of the `href` attribute is the destination you want your link to go to. + +Add the following `href` attribute to the anchor element you created previously and try clicking it again, don’t forget to refresh the browser so the new changes can be applied. + +```html +click me +``` + +By default, any text wrapped with an anchor tag without a `href` attribute will look like plain text. If the `href` attribute is present, the browser will give the text a blue color and underline it to signify it is a link. + +It’s worth noting you can use anchor tags to link to any kind of resource on the internet, not just other HTML documents. You can link to videos, pdf files, images, and so on, but for the most part, you will be linking to other HTML documents. + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s HTML Links video above. + +## --text-- + +What HTML tag is used to create a link? + +## --answers-- + +`` + +--- + +`

` + +--- + +`

    ` + +## --video-solution-- + +1 diff --git a/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/links-and-images-question-b.md b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/links-and-images-question-b.md new file mode 100644 index 00000000000..164fb01214f --- /dev/null +++ b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/links-and-images-question-b.md @@ -0,0 +1,55 @@ +--- +id: 637f703572c65bc8e73dfe35 +videoId: tsEQgGjSmkM +title: Links and Images Question B +challengeType: 15 +dashedName: links-and-images-question-b +--- + +# --description-- + +To get some practice using links and images throughout this lesson you need an HTML project to work with. + +- Create a new directory named odin-links-and-images. + +- Within that directory, create a new file named index.html. + +- Fill in the usual HTML boilerplate. + +- finally, add the following h1 to the body: `

    Homepage

    ` + +## Anchor Elements +To create a link in HTML, you use the anchor element. An anchor element is defined by wrapping the text or another HTML element you want to be a link with an `
    ` tag. Add the following to the body of the index.html page you created and open it in the browser: + +```html +click me +``` + +You may have noticed that clicking this link doesn’t do anything. This is because an anchor tag on its own won’t know where you want to link to. You have to tell it a destination to go to. You do this by using an HTML attribute. An HTML attribute gives additional information to an HTML element and always goes in the element’s opening tag. An attribute is usually made up of two parts: a name, and a value; however, not all attributes require a value. In your case, you need to add a href (hyperlink reference) attribute to the opening anchor tag. The value of the href attribute is the destination you want your link to go to. Add the following href attribute to the anchor element you created previously and try clicking it again, don’t forget to refresh the browser so the new changes can be applied. + +```html +click me +``` + +By default, any text wrapped with an anchor tag without a `href` attribute will look like plain text. If the `href` attribute is present, the browser will give the text a blue color and underline it to signify it is a link. It’s worth noting you can use anchor tags to link to any kind of resource on the internet, not just other HTML documents. You can link to videos, pdf files, images, and so on, but for the most part, you will be linking to other HTML documents. + +# --question-- +## --text-- + +What is an attribute? +## --answers-- + +An HTML attribute gives additional information to an HTML element and always goes in the element’s closing tag. + +--- + +An HTML attribute is used to tell the browser what the element contains. + +--- + +An HTML attribute gives additional information to an HTML element and always goes in the element’s opening tag. + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/links-and-images-question-c.md b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/links-and-images-question-c.md new file mode 100644 index 00000000000..c8a3913d77e --- /dev/null +++ b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/links-and-images-question-c.md @@ -0,0 +1,56 @@ +--- +id: 637f703072c65bc8e73dfe34 +videoId: tsEQgGjSmkM +title: Links and Images Question C +challengeType: 15 +dashedName: links-and-images-question-c +--- + +# --description-- + +To get some practice using links and images throughout this lesson you need an HTML project to work with. + +- Create a new directory named odin-links-and-images. + +- Within that directory, create a new file named index.html. + +- Fill in the usual HTML boilerplate. + +- finally, add the following h1 to the body: `

    Homepage

    ` + +## Anchor Elements +To create a link in HTML, you use the anchor element. An anchor element is defined by wrapping the text or another HTML element you want to be a link with an `` tag. Add the following to the body of the index.html page you created and open it in the browser: + +```html +click me +``` + +You may have noticed that clicking this link doesn’t do anything. This is because an anchor tag on its own won’t know where you want to link to. You have to tell it a destination to go to. You do this by using an HTML attribute. An HTML attribute gives additional information to an HTML element and always goes in the element’s opening tag. An attribute is usually made up of two parts: a name, and a value; however, not all attributes require a value. In your case, you need to add a href (hyperlink reference) attribute to the opening anchor tag. The value of the href attribute is the destination you want your link to go to. Add the following href attribute to the anchor element you created previously and try clicking it again, don’t forget to refresh the browser so the new changes can be applied. + +```html +click me +``` + +By default, any text wrapped with an anchor tag without a `href` attribute will look like plain text. If the `href` attribute is present, the browser will give the text a blue color and underline it to signify it is a link. It’s worth noting you can use anchor tags to link to any kind of resource on the internet, not just other HTML documents. You can link to videos, pdf files, images, and so on, but for the most part, you will be linking to other HTML documents. + +# --question-- + +## --text-- + +What attribute tells links where to go to? + +## --answers-- + +`src` + +--- + +`href` + +--- + +`link` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/links-and-images-question-d.md b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/links-and-images-question-d.md new file mode 100644 index 00000000000..2b6a665eb87 --- /dev/null +++ b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/links-and-images-question-d.md @@ -0,0 +1,112 @@ +--- +id: 637f702872c65bc8e73dfe33 +videoId: ta3Oxx7Yqbo +title: Links and Images Question D +challengeType: 15 +dashedName: links-and-images-question-d +--- + +# --description-- + + +Generally, there are two kinds of links you will create: + +- Links to pages on other websites on the internet + +- Links to pages located on your own websites + + +## Absolute Links +Links to pages on other websites on the internet are called absolute links. A typical absolute link will be made up of the following parts: `protocol://domain/path`. An absolute link will always contain the protocol and domain of the destination. + +You’ve already seen an absolute link in action. The link you created to The Odin Project’s About page earlier was an absolute link as it contains the protocol and domain. + +`https://www.theodinproject.com/about` + +## Relative Links +Links to other pages within your own website are called relative links. Relative links do not include the domain name, since it is another page on the same site, it assumes the domain name will be the same as the page you created the link on. + +Relative links only include the file path to the other page, relative to the page you are creating the link on. This is quite abstract, let’s see this in action using an example. + +Within the `odin-links-and-images` directory, create another HTML file named `about.html` and paste the following code into it: + +```html + + + + + Odin Links and Images + + + +

    About Page

    + + +``` + +Back in the index page, add the following anchor element to create a link to the about page: + +```html + +

    Homepage

    + click me + + About + +``` + +Open the index file in a browser and click on the about link to make sure it is all wired together correctly. Clicking the link should go to the about page you just created. + +This works because the index and about page are in the same directory. That means you can simply use its name (`about.html`) as the link’s href value. + +But you will usually want to organize your website directories a little better. Normally you would only have the `index.html` at the root directory and all other HTML files in their own directory. + +Create a directory named `pages` within the `odin-links-and-images` directory and move the `about.html` file into this new directory. + +Refresh the index page in the browser and then click on the about link. It will now be broken. This is because the location of the about page file has changed. + +To fix this, you just need to update the about link `href` value to include the `pages/` directory since that is the new location of the about file relative to the index file. + +```html + +

    Homepage

    + About + +``` + +Refresh the index page in the browser and try clicking the about link again, it should now be back in working order. + +In many cases, this will work just fine; however, you can still run into unexpected issues with this approach. Prepending `./` before the link will in most cases prevent such issues. By adding `./` you are specifying to your code that it should start looking for the file/directory relative to the **current** directory. + +```html + +

    Homepage

    + About + +``` + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s HTML File Structure video above. + +## --text-- + +What is the difference between an absolute and a relative link? + +## --answers-- + +An absolute link is a link to another page on the current website. A relative link is a link to another website. + +--- + +An absolute link is a link to another website. A relative link is a link another page on the current website. + +--- + +There is no difference between absolute and relative links. + +## --video-solution-- + +2 diff --git a/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/links-and-images-question-e.md b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/links-and-images-question-e.md new file mode 100644 index 00000000000..a935ae3262a --- /dev/null +++ b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/links-and-images-question-e.md @@ -0,0 +1,98 @@ +--- +id: 637f702372c65bc8e73dfe32 +videoId: 0xoztJCHpbQ +title: Links and Images Question E +challengeType: 15 +dashedName: links-and-images-question-e +--- + +# --description-- + +Websites would be fairly boring if they could only display text. Luckily HTML provides a wide variety of elements for displaying all sorts of different media. The most widely used of these is the image element. + +To display an image in HTML you use the `` element. Unlike the other elements you have encountered, the `` element is self-closing. Empty, self-closing HTML elements do not need a closing tag. + +Instead of wrapping content with an opening and closing tag, it embeds an image into the page using a `src` attribute which tells the browser where the image file is located. The `src` attribute works much like the `href` attribute for anchor tags. It can embed an image using both absolute and relative paths. + +For example, using an absolute path you can display an image located on The Odin Project site: + + + +To use images that you have on your own websites, you can use a relative path. + +- Create a new directory named `images` within the `odin-links-and-images` project. + +- Next, download [this image](https://unsplash.com/photos/Mv9hjnEUHR4/download?force=true&w=640) and move it into the `images` directory you just created. + +- Rename the image to `dog.jpg`. + +Finally add the image to the `index.html` file: + +```html + +

    Homepage

    + click me + + About + + + +``` + +Save the `index.html` file and open it in a browser to view Charles in all his glory. + + +## Parent Directories + +What if you want to use the dog image in the about page? You would first have to go up one level out of the pages directory into its parent directory so you could then access the images directory. + +To go to the parent directory you need to use two dots in the relative filepath like this: `../.` Let’s see this in action, within the body of the `about.html` file, add the following image below the heading you added earlier: + +```html + +``` + +To break this down: + +- First, you are going to the parent directory of the pages directory which is `odin-links-and-images`. + +- Then, from the parent directory, you can go into the `images` directory. + +- Finally, you can access the `dog.jpg` file. + +Using the metaphor we used earlier, using `../` in a filepath is kind of like stepping out from the room you are currently in to the main hallway so you can go to another room. + +## `Alt` attribute + +Besides the `src` attribute, every image element should also have an `alt` (alternative text) attribute. + +The `alt` attribute is used to describe an image. It will be used in place of the image if it cannot be loaded. It is also used with screen readers to describe what the image is to visually impaired users. + +This is how the The Odin Project logo example you used earlier looks with an `alt` attribute included: + + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s HTML Images Video above. + +## --text-- + +Which tag is used to display an image? + +## --answers-- + +`` + +--- + +`` + +--- + +`` + +## --video-solution-- + +3 diff --git a/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/links-and-images-question-f.md b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/links-and-images-question-f.md new file mode 100644 index 00000000000..ba4eb809e5d --- /dev/null +++ b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/links-and-images-question-f.md @@ -0,0 +1,94 @@ +--- +id: 637f701c72c65bc8e73dfe31 +videoId: 0xoztJCHpbQ +title: Links and Images Question F +challengeType: 15 +dashedName: links-and-images-question-f +--- + +# --description-- + +Websites would be fairly boring if they could only display text. Luckily HTML provides a wide variety of elements for displaying all sorts of different media. The most widely used of these is the image element. + +To display an image in HTML you use the `` element. Unlike the other elements you have encountered, the `` element is self-closing. Empty, self-closing HTML elements do not need a closing tag. + +Instead of wrapping content with an opening and closing tag, it embeds an image into the page using a src attribute which tells the browser where the image file is located. The src attribute works much like the href attribute for anchor tags. It can embed an image using both absolute and relative paths. + +For example, using an absolute path you can display an image located on The Odin Project site: + + + +To use images that you have on your own websites, you can use a relative path. + +- Create a new directory named `images` within the `odin-links-and-images` project. + +- Next, download [this image](https://unsplash.com/photos/Mv9hjnEUHR4/download?force=true&w=640) and move it into the images directory you just created. + +- Rename the image to `dog.jpg`. + +Finally add the image to the `index.html` file: + +```html + +

    Homepage

    +
    click me + + About + + + +``` + +Save the `index.html` file and open it in a browser to view Charles in all his glory. + + +## Parent Directories + +What if you want to use the dog image in the about page? You would first have to go up one level out of the pages directory into its parent directory so you could then access the images directory. + +To go to the parent directory you need to use two dots in the relative filepath like this: `../.` Let’s see this in action, within the body of the `about.html` file, add the following image below the heading you added earlier: + +```html + +``` + +To break this down: + +- First, you are going to the parent directory of the pages directory which is `odin-links-and-images`. + +- Then, from the parent directory, you can go into the `images` directory. + +- Finally, you can access the `dog.jpg` file. + +Using the metaphor we used earlier, using `../` in a filepath is kind of like stepping out from the room you are currently in to the main hallway so you can go to another room. + +## Alt attribute + +Besides the src attribute, every image element should also have an alt (alternative text) attribute. + +The alt attribute is used to describe an image. It will be used in place of the image if it cannot be loaded. It is also used with screen readers to describe what the image is to visually impaired users. + +This is how the The Odin Project logo example you used earlier looks with an alt attribute included: + + +# --question-- + +## --text-- + +What two attributes do images always need to have? + +## --answers-- + +`href` and `alt` + +--- + +`name` and `href` + +--- + +`alt` and `src` + +## --video-solution-- + +3 diff --git a/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/links-and-images-question-g.md b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/links-and-images-question-g.md new file mode 100644 index 00000000000..d1a6fcd4406 --- /dev/null +++ b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/links-and-images-question-g.md @@ -0,0 +1,94 @@ +--- +id: 637f701572c65bc8e73dfe30 +videoId: 0xoztJCHpbQ +title: Links and Images Question G +challengeType: 15 +dashedName: links-and-images-question-g +--- + +# --description-- + +Websites would be fairly boring if they could only display text. Luckily HTML provides a wide variety of elements for displaying all sorts of different media. The most widely used of these is the image element. + +To display an image in HTML you use the `` element. Unlike the other elements you have encountered, the `` element is self-closing. Empty, self-closing HTML elements do not need a closing tag. + +Instead of wrapping content with an opening and closing tag, it embeds an image into the page using a src attribute which tells the browser where the image file is located. The src attribute works much like the href attribute for anchor tags. It can embed an image using both absolute and relative paths. + +For example, using an absolute path you can display an image located on The Odin Project site: + + + +To use images that you have on your own websites, you can use a relative path. + +- Create a new directory named `images` within the `odin-links-and-images` project. + +- Next, download [this image](https://unsplash.com/photos/Mv9hjnEUHR4/download?force=true&w=640) and move it into the images directory you just created. + +- Rename the image to `dog.jpg`. + +Finally add the image to the `index.html` file: + +```html + +

    Homepage

    + click me + + About + + + +``` + +Save the `index.html` file and open it in a browser to view Charles in all his glory. + + +## Parent Directories + +What if you want to use the dog image in the about page? You would first have to go up one level out of the pages directory into its parent directory so you could then access the images directory. + +To go to the parent directory you need to use two dots in the relative filepath like this: `../.` Let’s see this in action, within the body of the `about.html` file, add the following image below the heading you added earlier: + +```html + +``` + +To break this down: + +- First, you are going to the parent directory of the pages directory which is `odin-links-and-images`. + +- Then, from the parent directory, you can go into the `images` directory. + +- Finally, you can access the `dog.jpg` file. + +Using the metaphor we used earlier, using `../` in a filepath is kind of like stepping out from the room you are currently in to the main hallway so you can go to another room. + +## Alt attribute + +Besides the src attribute, every image element should also have an alt (alternative text) attribute. + +The alt attribute is used to describe an image. It will be used in place of the image if it cannot be loaded. It is also used with screen readers to describe what the image is to visually impaired users. + +This is how the The Odin Project logo example you used earlier looks with an alt attribute included: + + +# --question-- + +## --text-- + +How do you access a parent directory in a filepath? + +## --answers-- + +`../` + +--- + +`./` + +--- + +`.../` + +## --video-solution-- + +1 diff --git a/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/links-and-images-question-h.md b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/links-and-images-question-h.md new file mode 100644 index 00000000000..cfd73fcfbc1 --- /dev/null +++ b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/links-and-images-question-h.md @@ -0,0 +1,98 @@ +--- +id: 637f700b72c65bc8e73dfe2f +videoId: 0xoztJCHpbQ +title: Links and Images Question H +challengeType: 15 +dashedName: links-and-images-question-h +--- + +# --description-- + +Websites would be fairly boring if they could only display text. Luckily HTML provides a wide variety of elements for displaying all sorts of different media. The most widely used of these is the image element. + +To display an image in HTML you use the `` element. Unlike the other elements you have encountered, the `` element is self-closing. Empty, self-closing HTML elements do not need a closing tag. + +Instead of wrapping content with an opening and closing tag, it embeds an image into the page using a src attribute which tells the browser where the image file is located. The src attribute works much like the href attribute for anchor tags. It can embed an image using both absolute and relative paths. + +For example, using an absolute path you can display an image located on The Odin Project site: + + + +To use images that you have on your own websites, you can use a relative path. + +- Create a new directory named `images` within the `odin-links-and-images` project. + +- Next, download [this image](https://unsplash.com/photos/Mv9hjnEUHR4/download?force=true&w=640) and move it into the images directory you just created. + +- Rename the image to `dog.jpg`. + +Finally add the image to the `index.html` file: + +```html + +

    Homepage

    + click me + + About + + + +``` + +Save the `index.html` file and open it in a browser to view Charles in all his glory. + + +## Parent Directories + +What if you want to use the dog image in the about page? You would first have to go up one level out of the pages directory into its parent directory so you could then access the images directory. + +To go to the parent directory you need to use two dots in the relative filepath like this: `../.` Let’s see this in action, within the body of the `about.html` file, add the following image below the heading you added earlier: + +```html + +``` + +To break this down: + +- First, you are going to the parent directory of the pages directory which is `odin-links-and-images`. + +- Then, from the parent directory, you can go into the `images` directory. + +- Finally, you can access the `dog.jpg` file. + +Using the metaphor we used earlier, using `../` in a filepath is kind of like stepping out from the room you are currently in to the main hallway so you can go to another room. + +## Alt attribute + +Besides the src attribute, every image element should also have an alt (alternative text) attribute. + +The alt attribute is used to describe an image. It will be used in place of the image if it cannot be loaded. It is also used with screen readers to describe what the image is to visually impaired users. + +This is how the The Odin Project logo example you used earlier looks with an alt attribute included: + + +# --question-- + +## --assignment-- + +Read about the four main image formats that can be used on the web. + +## --text-- + +What are the four main image formats that you can use for images on the web? + +## --answers-- + +TIFF, GIF, PNG, and SVG. + +--- + +JPG, PNG, GIF, and SVG. + +--- + +JPG, PDF, SVG, and GIF. + +## --video-solution-- + +2 diff --git a/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/project-create-a-recipe-page.md b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/project-create-a-recipe-page.md new file mode 100644 index 00000000000..657a3f6e32d --- /dev/null +++ b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/project-create-a-recipe-page.md @@ -0,0 +1,204 @@ +--- +id: 6391d1a4f7ac71efd0621380 +title: Build a Recipe Page Project +challengeType: 14 +dashedName: project-create-a-recipe-page +--- + +# --description-- + +The website will consist of a main index page which will have links to a few recipes. The website won’t look very pretty by the time you’ve finished. + +**User Stories:** + +1. Your recipe page should contain a `DOCTYPE` tag. +1. Your recipe page should include an `html` element with a `head` and `body` element as children. +1. You should have a `title` element within the `head` element with the text `The Odin Recipes`. +1. You should see an `h1` element that has the text `Creamy Chocolate Fudge`. +1. You should see an image with the url `*placeholder-fcc-cdn*` with a fitting `alt` text. +1. There should be an `h2` element with the text `Description` under the image. +1. You should see a couple of paragraphs under `Description` that describe the recipe. +1. There should be an `h2` element with the text `Ingredients` +1. Under the `Ingredients` heading there should be an unordered list with the ingredients needed for the recipe. +1. Under the list of ingredients add another heading called `Steps`. +1. You should see an ordered list with a couple of steps needed to complete the recipe. +1. Under the steps there should be an `h2` element with the text `More Recipes` +1. You should see a couple of links to other recipes inside an unordered list which has a couple of list items with anchor elements within. +1. These anchor elements should have `href` attribute with the value set to `#` + +# --hints-- + +You should have a `DOCTYPE` tag. + +```js +assert(code.match(//gi)); +``` + +You should have a `html` element with `head` and `body` element. + +```js +const html = document.querySelectorAll('html')[0]; +const head = document.querySelectorAll('html > head')[0]; +const body = document.querySelectorAll('html > body')[0]; + +assert(html && head && body); +``` + +You should have a `title` element within the `head` element that contains the text `The Odin Recipes`. + +```js +assert(document.querySelectorAll('HEAD > TITLE')[0].innerText == 'The Odin Recipes'); +``` + +You should have a `h1` element within your `body` element that contains the text `Creamy Chocolate Fudge`. + +```js +assert(document.querySelectorAll('BODY > H1')[0].innerText == 'Creamy Chocolate Fudge'); +``` + +You should have an image with the url `*placeholder-fcc-cdn*` with an `alt` attribute that has a fitting text. + +```js +const img = document.querySelectorAll('IMG')[0]; + +assert(img && img.alt !='' && img.src === 'https://i.imgur.com/p0J5baJ.jpg') +``` + +You should have an `h2` element with the text `Description`. + +```js +const h2 = document.querySelectorAll('H2')[0]; + +assert(h2.innerText == 'Description'); +``` + +You should have at least two `p` elements describing the recipe. + +```js +const paragraphs = document.querySelectorAll('P'); + +assert(paragraphs.length > 1); +``` + +You should have an `h2` element with the text `Ingredients`. + +```js +const h2 = document.querySelectorAll('H2')[1]; + +assert(h2.innerText == 'Ingredients'); +``` + +You should have an unordered list `
      ` with some ingredients as the list items `
    • `. + +```js +const unorderedList = document.querySelectorAll('UL')[0]; +const listItems = document.querySelectorAll('UL > LI'); + +assert(unorderedList && listItems && listItems.length > 1); +``` + +You should have an `h2` element with the text `Steps`. + +```js +const h2 = document.querySelectorAll('H2')[2]; + +assert(h2.innerText == 'Steps'); +``` + +You should have a `
        ` with the the steps as the list items `
      1. `. + +```js +const orderedList = document.querySelectorAll('OL')[0]; +const listItems = document.querySelectorAll('OL > LI'); + +assert(orderedList && listItems && listItems.length > 1); +``` + +You should have an `h2` element with the text `More Recipes`. + +```js +const h2 = document.querySelectorAll('H2')[3]; + +assert(h2.innerText == 'More Recipes'); +``` + +You should have an unordered list `
          ` element with list items `
        • ` that contain `` tags which lead to other recipes. + +```js +const unorderedList = document.querySelectorAll('UL')[1]; +const listItems = unorderedList.querySelectorAll('LI'); + +const allAreListItems = unorderedList.children.length == listItems.length; + +const containsAnchors = [...listItems].every(function(listItem) { + return listItem.querySelector("a") !== null; +}); + +assert(unorderedList && allAreListItems && containsAnchors && listItems.length > 1); +``` + +Your anchor tags linking to the recipes should have a `href` attribute with the value set to `#` + +```js +const anchorTags = document.querySelectorAll("a"); + +const allAnchorsHaveHrefHash = [...anchorTags].every(function(anchorTag) { + return anchorTag.hasAttribute("href") && anchorTag.getAttribute("href") === "#"; +}); + +assert(allAnchorsHaveHrefHash && anchorTags.length > 0); +``` + +# --seed-- + +## --seed-contents-- + +```html + +``` + +```css + +``` + +## --solutions-- + +```html + + + + The Odin Recipes + + +

          Creamy Chocolate Fudge

          + A delicious chocolate fudge dessert +

          Description

          +

          This recipe is for a rich and creamy chocolate fudge that is sure to satisfy your sweet tooth. It's perfect for a special occasion or as a tasty treat for any time of the year.

          +

          This recipe is easy to follow and only requires a few simple ingredients. With just a few steps, you'll be able to create a delicious dessert that everyone will love.

          +

          Ingredients

          +
            +
          • 1 cup sugar
          • +
          • 1/2 cup unsalted butter
          • +
          • 1/4 cup milk
          • +
          • 1/4 cup cocoa powder
          • +
          • 1/4 cup chocolate chips
          • +
          • 1/4 tsp salt
          • +
          • 1 tsp vanilla extract
          • +
          +

          Steps

          +
            +
          1. In a medium saucepan, melt the butter over medium heat.
          2. +
          3. Add the sugar, milk, cocoa powder, and salt to the saucepan and stir until well combined.
          4. +
          5. Bring the mixture to a boil, stirring constantly, and then reduce the heat to low and simmer for 5 minutes.
          6. +
          7. Remove the saucepan from the heat and stir in the chocolate chips and vanilla extract until the chocolate is melted and the mixture is smooth.
          8. +
          9. Pour the fudge into a greased 8-inch square pan and let it cool completely before cutting into squares.
          10. +
          +

          More Recipes

          +
          + + +``` diff --git a/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-a.md b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-a.md new file mode 100644 index 00000000000..f4625eb7e31 --- /dev/null +++ b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-a.md @@ -0,0 +1,65 @@ +--- +id: 637f4e3e72c65bc8e73dfe24 +videoId: kcHKFZBVtf4 +title: Understand Ordered and Unordered List Question A +challengeType: 15 +dashedName: understand-ordered-and-unordered-list-question-a +--- + +# --description-- + +If you want to have a list of items where the order doesn’t matter, like a shopping list of items that can be bought in any order, then you can use an unordered list. + +Unordered lists are created using the `
            ` element, and each item within the list is created using the list item element `
          • `. + +Each list item in an unordered list begins with a bullet point: + + + +If you instead want to create a list of items where the order does matter, like step-by-step instructions for a recipe, or your top 10 favorite TV shows, then you can use an ordered list. + +Ordered lists are created using the `
              ` element. Each individual item in them is again created using the list item element `
            1. `. However, each list item in an ordered list begins with a number instead: + + + +# --question-- + +## --assignment-- + +Watch the first three minutes of Kevin Powell's video on Ordered and Unordered lists above. + +--- + +Make an unordered shopping list of your favorite foods. + +--- + +Make an ordered list of todo’s you need to get done today. + +--- + +Make an unordered list of places you’d like to visit someday. + +--- + +Make an ordered list of your all time top 5 favorite video games or movies. + +## --text-- + +What HTML tag is used to create an unordered list? + +## --answers-- + +`
            2. ` + +--- + +`
                ` + +--- + +`
                  ` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-b.md b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-b.md new file mode 100644 index 00000000000..4c6822fc504 --- /dev/null +++ b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-b.md @@ -0,0 +1,45 @@ +--- +id: 637f4e4672c65bc8e73dfe25 +videoId: LGQuIIv2RVA +title: Understand Ordered and Unordered List Question B +challengeType: 15 +dashedName: understand-ordered-and-unordered-list-question-b +--- + +# --description-- + +If you want to have a list of items where the order doesn’t matter, like a shopping list of items that can be bought in any order, then you can use an unordered list. + +Unordered lists are created using the `
                    ` element, and each item within the list is created using the list item element `
                  • `. + +Each list item in an unordered list begins with a bullet point: + + + +If you instead want to create a list of items where the order does matter, like step-by-step instructions for a recipe, or your top 10 favorite TV shows, then you can use an ordered list. + +Ordered lists are created using the `
                      ` element. Each individual item in them is again created using the list item element `
                    1. `. However, each list item in an ordered list begins with a number instead: + + + +# --question-- + +## --text-- + +What HTML tag is used to create an ordered list? + +## --answers-- + +`
                        ` + +--- + +`
                      1. ` + +--- + +`
                          ` + +## --video-solution-- + +1 diff --git a/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-c.md b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-c.md new file mode 100644 index 00000000000..c766990ca22 --- /dev/null +++ b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-c.md @@ -0,0 +1,45 @@ +--- +id: 637f4e5172c65bc8e73dfe26 +videoId: LGQuIIv2RVA +title: Understand Ordered and Unordered List Question C +challengeType: 15 +dashedName: understand-ordered-and-unordered-list-question-c +--- + +# --description-- + +If you want to have a list of items where the order doesn’t matter, like a shopping list of items that can be bought in any order, then you can use an unordered list. + +Unordered lists are created using the `
                            ` element, and each item within the list is created using the list item element `
                          • `. + +Each list item in an unordered list begins with a bullet point: + + + +If you instead want to create a list of items where the order does matter, like step-by-step instructions for a recipe, or your top 10 favorite TV shows, then you can use an ordered list. + +Ordered lists are created using the `
                              ` element. Each individual item in them is again created using the list item element `
                            1. `. However, each list item in an ordered list begins with a number instead: + + + +# --question-- + +## --text-- + +What HTML tag is used to create list items within both unordered and ordered lists? + +## --answers-- + +`
                                ` + +--- + +`
                              1. ` + +--- + +`
                                  ` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/working-with-text-question-a.md b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/working-with-text-question-a.md new file mode 100644 index 00000000000..8698b62aca8 --- /dev/null +++ b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/working-with-text-question-a.md @@ -0,0 +1,60 @@ +--- +id: 637f4e5872c65bc8e73dfe27 +videoId: yqcd-XkxZNM +title: Working With Text Question A +challengeType: 15 +dashedName: working-with-text-question-a +--- + +# --description-- + +What would you expect the following text to output on an HTML page? + +```html + + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor + incididunt ut labore et dolore magna aliqua. + + Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris + nisi ut aliquip ex ea commodo consequat. + +``` + +It looks like two paragraphs of text, and so you might expect it to display in that way. However that is not the case, as you can see in the output below: + + + +When the browser encounters new lines like this in your HTML, it will compress them down into one single space. The result of this compression is that all of the text is clumped together into one long line. + +If you want to create paragraphs in HTML, you need to use the paragraph element, which will add a newline after each of your paragraphs. A paragraph element is defined by wrapping text content with a `

                                  ` tag. + +Changing our example from before to use paragraph elements fixes the issue: + + + +# --question-- + +## --assignment-- + +Watch and follow along to Kevin Powell’s HTML Paragraph and Headings Video above. + +## --text-- + +How do you create a paragraph in HTML? + +## --answers-- + +`

                                  This is a paragraph

                                  ` + +--- + +`

                                  This is a paragraph

                                  ` + +--- + +`This is a paragraph` + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/working-with-text-question-b.md b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/working-with-text-question-b.md new file mode 100644 index 00000000000..a74d8d11452 --- /dev/null +++ b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/working-with-text-question-b.md @@ -0,0 +1,40 @@ +--- +id: 637f4e5f72c65bc8e73dfe28 +videoId: yqcd-XkxZNM +title: Working With Text Question B +challengeType: 15 +dashedName: working-with-text-question-b +--- + +# --description-- + +Headings are different from other HTML text elements: they are displayed larger and bolder than other text to signify that they are headings. + +There are 6 different levels of headings starting from `

                                  ` to `

                                  `. The number within a heading tag represents that heading’s level. The largest and most important heading is `h1`, while `h6` is the tiniest heading at the lowest level. + +Headings are defined much like paragraphs. For example, to create an `h1` heading, we wrap our heading text in a `

                                  ` tag. + + + +Using the correct level of heading is important as levels provide a hierarchy to the content. An `h1` heading should always be used for the heading of the overall page, and the lower level headings should be used as the headings for content in smaller sections of the page. + +# --question-- +## --text-- + +How many different levels of headings are there and what is the difference between them? + +## --answers-- + +There are 5 different levels of headings. `h5` is the smallest and least important heading, and `h1` is the largest and most important heading. + +--- + +There are 6 different levels of headings. `h6` is the largest and most important heading, and `h1` is the smallest and least important heading. + +--- + +There are 6 different levels of headings. `h1` is the largest and most important heading, and `h6` is the smallest and least important heading. + +## --video-solution-- + +3 diff --git a/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/working-with-text-question-c.md b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/working-with-text-question-c.md new file mode 100644 index 00000000000..6ccf0e06658 --- /dev/null +++ b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/working-with-text-question-c.md @@ -0,0 +1,47 @@ +--- +id: 637f4e6672c65bc8e73dfe29 +videoId: gW6cBZLUk6M +title: Working With Text Question C +challengeType: 15 +dashedName: working-with-text-question-c +--- + +# --description-- + +The `` element makes text bold. It also semantically marks text as important; this affects tools, like screen readers, that users with visual impairments will rely on to use your website. The tone of voice on some screen readers will change to communicate the importance of the text within a `strong` element. To define a `strong` element you wrap text content in a `` tag. + +You can use `strong` on its own: + + + +But you will probably find yourself using the `strong` element much more in combination with other text elements, like this: + + + +Sometimes you will want to make text bold without giving it an important meaning. You’ll learn how to do that in the CSS lessons later in the curriculum. + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s HTML Bold and Italic Text Video above. + +## --text-- + +What element should you use to make text bold and important? + +## --answers-- + +`This is an important message` + +--- + +`

                                  This is an important message

                                  ` + +--- + +`This is an important message` + +## --video-solution-- + +3 diff --git a/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/working-with-text-question-d.md b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/working-with-text-question-d.md new file mode 100644 index 00000000000..d6647f9a7ea --- /dev/null +++ b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/working-with-text-question-d.md @@ -0,0 +1,39 @@ +--- +id: 637f4e6e72c65bc8e73dfe2a +videoId: gW6cBZLUk6M +title: Working With Text Question D +challengeType: 15 +dashedName: working-with-text-question-d +--- + +# --description-- + +The `em` element makes text italic. It also semantically places emphasis on the text, which again may affect things like screen readers. To define an emphasized element you wrap text content in a `` tag. + +To use `em` on its own: + + +Again, like the `strong` element, you will find yourself mostly using the `em` element with other text elements: + + + +# --question-- +## --text-- + +What element should you use to make text italicized to add emphasis? + +## --answers-- + +`This is an italic message` + +--- + +`This is an italic message` + +--- + +`This is an italic message` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/working-with-text-question-e.md b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/working-with-text-question-e.md new file mode 100644 index 00000000000..d022a6331e9 --- /dev/null +++ b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/working-with-text-question-e.md @@ -0,0 +1,66 @@ +--- +id: 637f4e7972c65bc8e73dfe2b +videoId: gW6cBZLUk6M +title: Working With Text Question E +challengeType: 15 +dashedName: working-with-text-question-e +--- + +# --description-- + +You may have noticed that in all the examples in this lesson you indent any elements that are within other elements. This is known as nesting elements. + +When you nest elements within other elements, you create a parent and child relationship between them. The nested elements are the children and the element they are nested within is the parent. + +In the following example, the `body` element is the parent and the `p` is the child: + +```html + + + + +

                                  Lorem ipsum dolor sit amet.

                                  + + +``` + +Just as in human relationships, HTML parent elements can have many children. Elements at the same level of nesting are considered to be siblings. + +For example, the two `p` elements in the following code are siblings, since they are both children of the `body` tag and are at the same level of nesting as each other: + +```html + + + + +

                                  Lorem ipsum dolor sit amet.

                                  +

                                  Ut enim ad minim veniam.

                                  + + +``` + +You use indentation to make the level of nesting clear and readable for yourselves and other developers who will work with your HTML in the future. It is recommended to indent any child elements by two spaces. + +The parent, child, and sibling relationships between elements will become much more important later when you start styling your HTML with CSS and adding behavior with JavaScript. For now, however, it is just important to know the distinction between how elements are related and the terminology used to describe their relationships. + +# --question-- + +## --text-- + +What relationship do two elements have if they are at the same level of nesting? + +## --answers-- + +The elements are each other's parents. + +--- + +The elements are each other's children. + +--- + +The elements are siblings. + +## --video-solution-- + +3 diff --git a/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/working-with-text-question-f.md b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/working-with-text-question-f.md new file mode 100644 index 00000000000..2ace3f4e36d --- /dev/null +++ b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/working-with-text-question-f.md @@ -0,0 +1,67 @@ +--- +id: 637f4e8072c65bc8e73dfe2c +videoId: gW6cBZLUk6M +title: Working With Text Question F +challengeType: 15 +dashedName: working-with-text-question-f +--- + +# --description-- + +You may have noticed that in all the examples in this lesson you indent any elements that are within other elements. This is known as nesting elements. + +When you nest elements within other elements, you create a parent and child relationship between them. The nested elements are the children and the element they are nested within is the parent. + +In the following example, the body element is the parent and the paragraph is the child: + +```html + + + + +

                                  Lorem ipsum dolor sit amet.

                                  + + +``` + +Just as in human relationships, HTML parent elements can have many children. Elements at the same level of nesting are considered to be siblings. + +For example, the two paragraphs in the following code are siblings, since they are both children of the body tag and are at the same level of nesting as each other: + +```html + + + + +

                                  Lorem ipsum dolor sit amet.

                                  +

                                  Ut enim ad minim veniam.

                                  + + +``` + +You use indentation to make the level of nesting clear and readable for yourselves and other developers who will work with your HTML in the future. It is recommended to indent any child elements by two spaces. + +The parent, child, and sibling relationships between elements will become much more important later when you start styling your HTML with CSS and adding behavior with JavaScript. For now, however, it is just important to know the distinction between how elements are related and the terminology used to describe their relationships. + +# --question-- + +## --text-- + +What relationship does an element have with any nested element within it? + +## --answers-- + +The element within the other element is called the parent element. + +--- + +The element within the other element is called the child element. + +--- + +The element within the other element is called the sibling element. + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/working-with-text-question-g.md b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/working-with-text-question-g.md new file mode 100644 index 00000000000..fe83f0ef062 --- /dev/null +++ b/curriculum/challenges/arabic/10-coding-interview-prep/the-odin-project/working-with-text-question-g.md @@ -0,0 +1,49 @@ +--- +id: 637f4e8772c65bc8e73dfe2d +videoId: gW6cBZLUk6M +title: Working With Text Question G +challengeType: 15 +dashedName: working-with-text-question-g +--- + +# --description-- + +HTML comments are not visible to the browser; they allow us to comment on your code so that other developers or your future selves can read them and get some context about something that might not be clear in the code. + +Writing an HTML comment is simple: You just enclose the comment with ``tags. For example: + +```html +

                                  View the html to see the hidden comments

                                  + + + +

                                  Some paragraph text

                                  + + +``` + +# --question-- + +## --assignment-- + +To get some practice working with text in HTML, create a plain blog article page which uses different headings, uses paragraphs, and has some text in the paragraphs bolded and italicized. You can use [Lorem Ipsum](https://loremipsum.io) to generate dummy text, in place of real text as you build your sites. + +## --text-- + +How do you create HTML comments? + +## --answers-- + +`/* This is an HTML comment */` + +--- + +`` + +--- + +`<-- This is an HTML comment --!>` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md b/curriculum/challenges/arabic/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md index 1e23b5d4e37..dee380a33ce 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/build-a-personal-portfolio-webpage-project/build-a-personal-portfolio-webpage.md @@ -1,6 +1,6 @@ --- id: bd7158d8c242eddfaeb5bd13 -title: ابني معرضا لأعمالك الخاصة (Personal Portfolio) +title: أنشئ معرضا لأعمالك الخاصة challengeType: 14 forumTopicId: 301143 dashedName: build-a-personal-portfolio-webpage diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/build-a-product-landing-page-project/build-a-product-landing-page.md b/curriculum/challenges/arabic/14-responsive-web-design-22/build-a-product-landing-page-project/build-a-product-landing-page.md index 7a649a0dc7d..9d0477c5bd0 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/build-a-product-landing-page-project/build-a-product-landing-page.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/build-a-product-landing-page-project/build-a-product-landing-page.md @@ -1,6 +1,6 @@ --- id: 587d78af367417b2b2512b04 -title: ابن صفحة لعرض لمنتج (Product Landing) +title: أنشئ صفحة لعرض لمنتج challengeType: 14 forumTopicId: 301144 dashedName: build-a-product-landing-page diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/build-a-survey-form-project/build-a-survey-form.md b/curriculum/challenges/arabic/14-responsive-web-design-22/build-a-survey-form-project/build-a-survey-form.md index 5e69600b0b4..72ec9a0ed1c 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/build-a-survey-form-project/build-a-survey-form.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/build-a-survey-form-project/build-a-survey-form.md @@ -1,6 +1,6 @@ --- id: 587d78af367417b2b2512b03 -title: ابني نموذج استطلاع رأي (Survey Form) +title: أنشئ نموذج استطلاع رأي challengeType: 14 forumTopicId: 301145 dashedName: build-a-survey-form @@ -8,7 +8,7 @@ dashedName: build-a-survey-form # --description-- -**Objective:** كم ببناء تطبيق يشبه وظيفيا إلي https://survey-form.freecodecamp.rocks +**Objective:** أنشئ تطبيق يشبه وظيفيا إلي https://survey-form.freecodecamp.rocks **المطلبيات:** @@ -259,7 +259,7 @@ const els = document.querySelectorAll('#dropdown option:not([disabled])') assert(els.length >= 2) ``` -`#dropdown` الخاص بك يجب أن يكون تابعا لـ `#survey-form`. +يجب أن يكون `#dropdown` الخاص بك فرع من `#survey-form`. ```js const el = document.querySelector('#survey-form #dropdown') diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/build-a-technical-documentation-page-project/build-a-technical-documentation-page.md b/curriculum/challenges/arabic/14-responsive-web-design-22/build-a-technical-documentation-page-project/build-a-technical-documentation-page.md index 0c3c772418f..b5617bd6a75 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/build-a-technical-documentation-page-project/build-a-technical-documentation-page.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/build-a-technical-documentation-page-project/build-a-technical-documentation-page.md @@ -1,6 +1,6 @@ --- id: 587d78b0367417b2b2512b05 -title: ابني صفحة التوثيق التقني (Technical Documentation) +title: أنشئ صفحة التوثيق التقنية challengeType: 14 forumTopicId: 301146 dashedName: build-a-technical-documentation-page @@ -8,11 +8,11 @@ dashedName: build-a-technical-documentation-page # --description-- -**Objective:** قم ببناء تطبيق يشبه وظيفيا إلى https://technical-documentation-page.freecodecamp.rocks +**Objective:** أنشئ تطبيق يشبه وظيفيا إلى https://technical-documentation-page.freecodecamp.rocks **المتطلبات:** -1. يمكنك مشاهدة عنصر `main` مع `id="main-doc"`، والذي يحتوي على المحتوى الرئيسي للصفحة (الوثائق التقنية) +1. يمكنك مشاهدة عنصر `main` مع `id="main-doc"`، الذي يحتوي على المحتوى الرئيسي للصفحة (الوثائق التقنية) 1. ضمن عنصر `#main-doc` ، يمكنك رؤية عدة عناصر `section`، كل منها مع class بقيمة `main-section`. وينبغي أن يكون هناك خمسة على الأقل 1. العنصر الأول في كل `.main-section` يجب أن يكون عنصر `header`، والذي يحتوي على نص يصف موضوع ذلك القسم. 1. كل عنصر من عناصر `section` مع class بقيمة `main-section` يجب أن يكون لديه `id` يتوافق مع نص كل `header` موجود داخله. يجب استبدال أي مسافات بتسطير سفلي (underscore) (على سبيل المثال القسم الذي يحتوي على header "JavaScript and Java" يجب أن يكون لديه `id="JavaScript_and_Java"`) @@ -203,7 +203,7 @@ const remainder = headerText.filter(str => linkText.indexOf(str) === -1) assert(headerText.length > 0 && headerText.length > 0 && remainder.length === 0) ``` -يجب أن يكون لكل `.nav-link` سمة `href` التي تربط مع `.main-section` (على سبيل المثال ، إذا نقرت على العنصر `.nav-link` الذي يحتوي على النص "Hello world" ، تنتقل الصفحة إلى عنصر `section` بهذا الـ id). +يجب أن يكون لكل `.nav-link` سمة `href` التي تربط مع `.main-section` (على سبيل المثال، إذا نقرت على العنصر `.nav-link` الذي يحتوي على النص "Hello world"، تنتقل الصفحة إلى عنصر `section` بهذا المعرف (id)). ```js const hrefValues = Array.from(document.querySelectorAll('.nav-link')).map(el => el.getAttribute('href')) diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/build-a-tribute-page-project/build-a-tribute-page.md b/curriculum/challenges/arabic/14-responsive-web-design-22/build-a-tribute-page-project/build-a-tribute-page.md index 9cfd1fbcc83..7fdd0c7fad6 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/build-a-tribute-page-project/build-a-tribute-page.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/build-a-tribute-page-project/build-a-tribute-page.md @@ -1,6 +1,6 @@ --- id: bd7158d8c442eddfaeb5bd18 -title: ابن مشروع صفحة الثناء (Tribute Page) +title: أنشئ مشروع صفحة الثناء challengeType: 14 forumTopicId: 301147 dashedName: build-a-tribute-page @@ -12,8 +12,8 @@ dashedName: build-a-tribute-page **المتطلبات:** -1. يجب أن يكون لصفحة الثناء الخاصة بك عنصر `main` مع `id` بقيمة `main`، والذي يحتوي على جميع العناصر الأخرى -1. يجب أن ترى عنصرا مع `id` بقيمة `title`، الذي يحتوي على string (اي نص) ،يصف موضوع صفحة الثناء (مثل "الدكتور نورمان بورلاوغ") +1. يجب أن يكون لصفحتك الثناء عنصر `main` مع `id` بقيمة `main`، الذي يحتوي على جميع العناصر الأخرى +1. يجب أن ترى عنصرا مع `id` بقيمة `title`، الذي يحتوي على مقطع نصي (string)، يصف موضوع صفحة الثناء (مثل "الدكتور نورمان بورلاوغ") 1. يجب أن ترى إما عنصر `figure` أو `div` مع `id` بقيمة `img-div` 1. داخل عنصر `#img-div` يمكنك رؤية عنصر `img` مع `id="image"` 1. داخل عنصر `#img-div` ، يجب أن ترى عنصرا مع `id="img-caption"` يحتوي على محتوى نصي يصف الصورة المعروضة في `#img-div` diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d1ac33c68d27dcda5796.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d1ac33c68d27dcda5796.md index 988069c0407..e08ae4dbe23 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d1ac33c68d27dcda5796.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d1ac33c68d27dcda5796.md @@ -14,13 +14,25 @@ dashedName: step-23 يجب عليك استخدام خاصية `transform` لدوران العنصر. ```js -assert.notEmpty(new __helpers.CSSHelp(document).getStyle('.back-mountain')?.transform); +const backMountain = new __helpers.CSSHelp(document).getStyle('.back-mountain'); + +if (backMountain?.transform) { + assert.notEmpty(backMountain?.transform); +} else { + assert.notEmpty(backMountain?.rotate); +} ``` يجب أعطاء منقي `.back-mountain` خاصية `transform` بقيمة `--fcc-expected--`, ولكن وجدت بقيمة `--fcc-actual--`. ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.back-mountain')?.transform, 'rotate(45deg)'); +const backMountain = new __helpers.CSSHelp(document).getStyle('.back-mountain'); + +if (backMountain?.transform) { + assert.equal(backMountain?.transform, 'rotate(45deg)'); +} else { + assert.equal(backMountain?.rotate, '45deg'); +} ``` يجب عليك إعطاء عنصر `.back-mountain` خاصية `left`. diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d229b0e542520cd91c685.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d229b0e542520cd91c685.md index e876bcf81c9..671517feff1 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d229b0e542520cd91c685.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d229b0e542520cd91c685.md @@ -14,13 +14,25 @@ dashedName: step-84 يجب عليك إعطاء `.foot.left` خاصية `transform` بقيمة `rotate(80deg)`. ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.foot.left').getPropVal('transform', true), 'rotate(80deg)'); +const leftFoot = new __helpers.CSSHelp(document).getStyle('.foot.left'); + +if (leftFoot?.transform) { + assert.equal(leftFoot.getPropVal('transform', true), 'rotate(80deg)'); +} else { + assert.equal(leftFoot.getPropVal('rotate', true), '80deg'); +} ``` يجب عليك إعطاء `.foot.right` خاصية `transform` بقيمة `rotate(-80deg)`. ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.foot.right').getPropVal('transform', true), 'rotate(-80deg)'); +const rightFoot = new __helpers.CSSHelp(document).getStyle('.foot.right'); + +if (rightFoot?.transform) { + assert.equal(rightFoot.getPropVal('transform', true), 'rotate(-80deg)'); +} else { + assert.equal(rightFoot.getPropVal('rotate', true), '-80deg'); +} ``` # --seed-- diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2d4e80400325ff89664a.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2d4e80400325ff89664a.md index 93b822cb7a8..1aa5ab966c2 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2d4e80400325ff89664a.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2d4e80400325ff89664a.md @@ -14,7 +14,14 @@ dashedName: step-91 يجب عليك إعطاء `.arm.left` خاصية `transform` بقيمة `rotate(130deg) scaleX(-1)`. ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.arm.left').getPropVal('transform', true), 'rotate(130deg)scaleX(-1)'); +const leftArm = new __helpers.CSSHelp(document).getStyle('.arm.left'); + +if (leftArm?.rotate && leftArm?.transform) { + assert.equal(leftArm.getPropVal('rotate', true), '130deg'); + assert.equal(leftArm.getPropVal('transform', true), 'scaleX(-1)'); +} else { + assert.equal(leftArm.getPropVal('transform', true), 'rotate(130deg)scaleX(-1)'); +} ``` # --seed-- @@ -281,7 +288,6 @@ body { top: 35%; left: 5%; transform-origin: top left; - } --fcc-editable-region-- diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2ebc81ba81271460850d.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2ebc81ba81271460850d.md index 35e8dddb42a..6f050be3ac1 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2ebc81ba81271460850d.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2ebc81ba81271460850d.md @@ -14,7 +14,13 @@ dashedName: step-92 يجب عليك إعطاء `.arm.right` خاصية `transform` بقيمة `rotate(-45deg)`. ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.arm.right')?.getPropVal('transform', true), 'rotate(-45deg)'); +const rightArm = new __helpers.CSSHelp(document).getStyle('.arm.right'); + +if (rightArm?.transform) { + assert.equal(rightArm?.getPropVal('transform', true), 'rotate(-45deg)'); +} else { + assert.equal(rightArm?.getPropVal('rotate', true), '-45deg'); +} ``` # --seed-- @@ -287,7 +293,6 @@ body { .arm.right { top: 0%; right: -5%; - } --fcc-editable-region-- diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d32c7fa21f32aaa91d499.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d32c7fa21f32aaa91d499.md index b99f65941ef..6cd75f86d08 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d32c7fa21f32aaa91d499.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d32c7fa21f32aaa91d499.md @@ -14,7 +14,16 @@ dashedName: step-97 يجب عليك إعطاء `10%` إلى خاصية `transform` بقيمة `rotate(110deg) scaleX(-1)`. ```js -assert([...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '10%')?.style?.transform?.replace(/\s+/g, '') === 'rotate(110deg)scaleX(-1)'); +const wave10Percent = [...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '10%'); +const rotateProp = wave10Percent?.style?.rotate?.replace(/\s+/g, ''); +const transformProp = wave10Percent?.style?.transform?.replace(/\s+/g, ''); + +if (rotateProp && transformProp) { + assert(rotateProp === '110deg'); + assert(transformProp === 'scaleX(-1)'); +} else { + assert(transformProp === 'rotate(110deg)scaleX(-1)'); +} ``` # --seed-- diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d333b738e3c2b5d58b095.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d333b738e3c2b5d58b095.md index 6b143b466c9..80143e773e3 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d333b738e3c2b5d58b095.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d333b738e3c2b5d58b095.md @@ -14,7 +14,16 @@ dashedName: step-98 يجب عليك إعطاء أحداثية `20%` خاصية `transform` بقيمة `rotate(130deg) scaleX(-1)`. ```js -assert([...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '20%')?.style?.transform?.replace(/\s+/g, '') === 'rotate(130deg)scaleX(-1)'); +const wave20Percent = [...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '20%'); +const transformProp = wave20Percent?.style?.transform?.replace(/\s+/g, ''); +const rotateProp = wave20Percent?.style?.rotate?.replace(/\s+/g, ''); + +if (rotateProp && transformProp) { + assert(rotateProp === '130deg'); + assert(transformProp === 'scaleX(-1)'); +} else { + assert(transformProp === 'rotate(130deg)scaleX(-1)'); +} ``` # --seed-- diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d337765b9f02c10e93722.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d337765b9f02c10e93722.md index 2d8f943f309..f06e0e747ce 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d337765b9f02c10e93722.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d337765b9f02c10e93722.md @@ -14,13 +14,31 @@ dashedName: step-99 يجب عليك إعطاء نقطة الطريق `30%` خاصية `transform` بقيمة `rotate(110deg) scaleX(-1)`. ```js -assert([...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '30%')?.style?.transform?.replace(/\s+/g, '') === 'rotate(110deg)scaleX(-1)'); +const wave30Percent = [...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '30%'); +const transformProp = wave30Percent?.style?.transform?.replace(/\s+/g, ''); +const rotateProp = wave30Percent?.style?.rotate?.replace(/\s+/g, ''); + +if (rotateProp && transformProp) { + assert(rotateProp === '110deg'); + assert(transformProp === 'scaleX(-1)'); +} else { + assert(transformProp === 'rotate(110deg)scaleX(-1)'); +} ``` يجب عليك إعطاء نقطة الطريق `40%` خاصية `transform` بقيمة `rotate(130deg) scaleX(-1)`. ```js -assert([...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '40%')?.style?.transform?.replace(/\s+/g, '') === 'rotate(130deg)scaleX(-1)'); +const wave40Percent = [...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '40%'); +const transformProp = wave40Percent?.style?.transform?.replace(/\s+/g, ''); +const rotateProp = wave40Percent?.style?.rotate?.replace(/\s+/g, ''); + +if (rotateProp && transformProp) { + assert(rotateProp === '130deg'); + assert(transformProp === 'scaleX(-1)'); +} else { + assert(transformProp === 'rotate(130deg)scaleX(-1)'); +} ``` # --seed-- diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98f0.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98f0.md index c4515339280..b155bdeaa3d 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98f0.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98f0.md @@ -16,11 +16,11 @@ gradient-type( ); ``` -في المثال، `color1` صُلْب في الأعلى، `color2` صُلْب في الأسفل، وفي ما بينها ينتقل بالتساوي من واحد إلى آخر. في `.bb1a`، إضافة عنصر تدرج من نوع `linear-gradient` إلى خاصية `background` مع `--building-color1` كاللون الأول و `--window-color1` كالثاني. +في المثال، `color1` صُلْب في الأعلى، `color2` صُلْب في الأسفل، وفي ما بينها ينتقل بالتساوي من واحد إلى آخر. في `.bb1a`، أضف خاصية `background` أسفل خاصية `background-color`. عيّنه كتدرج من نوع `linear-gradient` الذي يستخدم `--building-color1` كاللون الأول و `--window-color1` كالثاني. # --hints-- -يجب عليك تطبيق `background` على `.bb1a`. +يجب عليك تطبيق `background` على `.bb1a` بعد `background-color` مباشرة. ```js assert(new __helpers.CSSHelp(document).getStyle('.bb1a')?.background); diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa2407b521be39a3de7be1.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa2407b521be39a3de7be1.md index 2ace9571b3a..edbb0356ef8 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa2407b521be39a3de7be1.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa2407b521be39a3de7be1.md @@ -45,7 +45,7 @@ assert(document.querySelector('a').getAttribute('target') === '_blank');

                                  Cat Photos

                                  --fcc-editable-region-- -

                                  See more cat photos in our gallery.

                                  +

                                  See more cat photos in our gallery.

                                  --fcc-editable-region-- A cute orange cat lying on its back. diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60fab9f17fa294054b74228c.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60fab9f17fa294054b74228c.md index bbf3fc5d5e7..dc6ed8e31f1 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60fab9f17fa294054b74228c.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60fab9f17fa294054b74228c.md @@ -9,7 +9,7 @@ dashedName: step-31 لننتقل إلى `fieldset` الأخيرة. ماذا لو كنت ترغب في السماح للمستخدم بتحميل صورة الملف الشخصي؟ -حسنًا، `input` من نوع `file` يسمح بذلك. Add a `label` with the text `Upload a profile picture:`, and nest an `input` accepting a file upload. +حسنًا، `input` من نوع `file` يسمح بذلك. أضف `label` مع النص `Upload a profile picture:`، وإدخال `input` الذي يقبل تحميل الملف. # --hints-- diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2abbe7d18d49a1e0e1c8.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2abbe7d18d49a1e0e1c8.md index fd636c8de4f..f72be80e300 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2abbe7d18d49a1e0e1c8.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2abbe7d18d49a1e0e1c8.md @@ -39,13 +39,15 @@ assert(document.querySelector('h1')?.innerText === 'Nutrition Facts'); --fcc-editable-region-- - - - Nutrition Label - - - + + + Nutrition Label + + + + + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2d4150fe0d4cbd0f2628.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2d4150fe0d4cbd0f2628.md index b275bad310d..aee3c626420 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2d4150fe0d4cbd0f2628.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2d4150fe0d4cbd0f2628.md @@ -43,14 +43,16 @@ assert(document.querySelector('p')?.innerText === '8 servings per container'); --fcc-editable-region-- - - - Nutrition Label - - -

                                  Nutrition Facts

                                  - + + + Nutrition Label + + + +

                                  Nutrition Facts

                                  + + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34948891834dd77655a6.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34948891834dd77655a6.md index 4cd7a0d5eeb..5fd75d76ce1 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34948891834dd77655a6.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34948891834dd77655a6.md @@ -43,15 +43,17 @@ assert(document.querySelectorAll('p')?.[1]?.innerText === 'Serving size 2/3 cup --fcc-editable-region-- - - - Nutrition Label - - -

                                  Nutrition Facts

                                  -

                                  8 servings per container

                                  - + + + Nutrition Label + + + +

                                  Nutrition Facts

                                  +

                                  8 servings per container

                                  + + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34ecc1091b4fd5a8a484.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34ecc1091b4fd5a8a484.md index 1a1013e25e2..505098b2e00 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34ecc1091b4fd5a8a484.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34ecc1091b4fd5a8a484.md @@ -49,16 +49,18 @@ assert(links.find(link => link?.getAttribute('href') === 'https://fonts.googleap --fcc-editable-region-- - - - Nutrition Label - - -

                                  Nutrition Facts

                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  - + + + Nutrition Label + + + + +

                                  Nutrition Facts

                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f357957e370510f21ea16.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f357957e370510f21ea16.md index 2d218bc2996..81caee35a38 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f357957e370510f21ea16.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f357957e370510f21ea16.md @@ -32,17 +32,19 @@ assert(new __helpers.CSSHelp(document).getStyle('body')?.fontFamily === '"Open S ```html - - - Nutrition Label - - - - -

                                  Nutrition Facts

                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  - + + + + Nutrition Label + + + + + +

                                  Nutrition Facts

                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  + ``` diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f378014c2da526a109c81.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f378014c2da526a109c81.md index 5e2002b903a..e263594d818 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f378014c2da526a109c81.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f378014c2da526a109c81.md @@ -30,17 +30,19 @@ assert(new __helpers.CSSHelp(document).getStyle('html')?.fontSize === '16px'); ```html - - - Nutrition Label - - - - -

                                  Nutrition Facts

                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  - + + + + Nutrition Label + + + + + +

                                  Nutrition Facts

                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  + ``` diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38279e5c3d53692ea441.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38279e5c3d53692ea441.md index de6febb309d..39fbf96f09c 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38279e5c3d53692ea441.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38279e5c3d53692ea441.md @@ -37,18 +37,20 @@ assert(children?.every(child => child?.parentElement?.classList?.contains('label ```html - - - Nutrition Label - - - + + + + Nutrition Label + + + + --fcc-editable-region-- - -

                                  Nutrition Facts

                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  - + +

                                  Nutrition Facts

                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38cabc64e3556f98cc1a.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38cabc64e3556f98cc1a.md index 1efee5aa6ec..a20391169fe 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38cabc64e3556f98cc1a.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38cabc64e3556f98cc1a.md @@ -32,19 +32,21 @@ assert(new __helpers.CSSHelp(document).getStyle('.label')?.border === '2px solid ```html - - - Nutrition Label - - - - -
                                  -

                                  Nutrition Facts

                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  - + + + + Nutrition Label + + + + + +
                                  +

                                  Nutrition Facts

                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  + ``` diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3949f58e12577dcefb00.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3949f58e12577dcefb00.md index 175d90bec0f..6a2f87d916a 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3949f58e12577dcefb00.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3949f58e12577dcefb00.md @@ -26,19 +26,21 @@ assert(new __helpers.CSSHelp(document).getStyle('.label')?.width === '270px'); ```html - - - Nutrition Label - - - - -
                                  -

                                  Nutrition Facts

                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  - + + + + Nutrition Label + + + + + +
                                  +

                                  Nutrition Facts

                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  + ``` diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f39d7da41b15851fa3fb9.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f39d7da41b15851fa3fb9.md index c6471a7931d..dcda0810c57 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f39d7da41b15851fa3fb9.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f39d7da41b15851fa3fb9.md @@ -30,19 +30,21 @@ assert(new __helpers.CSSHelp(document).getStyle('.label')?.padding === '0px 7px' ```html - - - Nutrition Label - - - - -
                                  -

                                  Nutrition Facts

                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  - + + + + Nutrition Label + + + + + +
                                  +

                                  Nutrition Facts

                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  + ``` diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3b091162165948e1cb33.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3b091162165948e1cb33.md index 3c145d84644..26ffaf193ef 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3b091162165948e1cb33.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3b091162165948e1cb33.md @@ -32,19 +32,21 @@ assert(new __helpers.CSSHelp(document).getStyle('*')?.boxSizing === 'border-box' ```html - - - Nutrition Label - - - - -
                                  -

                                  Nutrition Facts

                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  - + + + + Nutrition Label + + + + + +
                                  +

                                  Nutrition Facts

                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  + ``` diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3cafd794015aa9547a6d.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3cafd794015aa9547a6d.md index 4c335b77bf3..aacaab1e3fa 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3cafd794015aa9547a6d.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3cafd794015aa9547a6d.md @@ -32,19 +32,21 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')?.fontWeight === '800'); ```html - - - Nutrition Label - - - - -
                                  -

                                  Nutrition Facts

                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  - + + + + Nutrition Label + + + + + +
                                  +

                                  Nutrition Facts

                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  + ``` diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3d9e59db4b5b8e960762.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3d9e59db4b5b8e960762.md index 4e0a39da9d2..6e299b34326 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3d9e59db4b5b8e960762.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3d9e59db4b5b8e960762.md @@ -24,19 +24,21 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')?.textAlign === 'center'); ```html - - - Nutrition Label - - - - -
                                  -

                                  Nutrition Facts

                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  - + + + + Nutrition Label + + + + + +
                                  +

                                  Nutrition Facts

                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  + ``` diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e1b7233ee5c7595771f.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e1b7233ee5c7595771f.md index ea0f7928395..bff129bf3f9 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e1b7233ee5c7595771f.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e1b7233ee5c7595771f.md @@ -24,19 +24,21 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')?.margin === '-4px 0px'); ```html - - - Nutrition Label - - - - -
                                  -

                                  Nutrition Facts

                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  - + + + + Nutrition Label + + + + + +
                                  +

                                  Nutrition Facts

                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  + ``` diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e4af8008c5d494d3afe.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e4af8008c5d494d3afe.md index 2e09576f916..81708f85f9a 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e4af8008c5d494d3afe.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e4af8008c5d494d3afe.md @@ -30,19 +30,21 @@ assert(new __helpers.CSSHelp(document).getStyle('p')?.margin === '0px'); ```html - - - Nutrition Label - - - - -
                                  -

                                  Nutrition Facts

                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  - + + + + Nutrition Label + + + + + +
                                  +

                                  Nutrition Facts

                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  + ``` diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3ed16592445e57941aec.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3ed16592445e57941aec.md index 125dceca925..9cebe4c0264 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3ed16592445e57941aec.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3ed16592445e57941aec.md @@ -44,21 +44,23 @@ assert(document.querySelector('.divider')?.previousElementSibling?.localName === ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                  -

                                  Nutrition Facts

                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  +
                                  +

                                  Nutrition Facts

                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  --fcc-editable-region-- - + ``` diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f405b89a7ec5f8e2d11f4.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f405b89a7ec5f8e2d11f4.md index 5608b146da0..eb0b409ccea 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f405b89a7ec5f8e2d11f4.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f405b89a7ec5f8e2d11f4.md @@ -36,20 +36,22 @@ assert(new __helpers.CSSHelp(document).getStyle('.divider')?.margin === '2px 0px ```html - - - Nutrition Label - - - - -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  - + + + + Nutrition Label + + + + + +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  + ``` diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f40b01f680e608d360ed4.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f40b01f680e608d360ed4.md index 100f5bd116c..38e25be0ee0 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f40b01f680e608d360ed4.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f40b01f680e608d360ed4.md @@ -26,20 +26,22 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')?.letterSpacing === '0.15px ```html - - - Nutrition Label - - - - -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  - + + + + Nutrition Label + + + + + +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  + ``` diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4172e9eec061d6456221.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4172e9eec061d6456221.md index 7fb7802d7e2..933a8f448b7 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4172e9eec061d6456221.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4172e9eec061d6456221.md @@ -32,22 +32,24 @@ assert(!document.querySelector('p')?.classList?.contains('bold')); ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  --fcc-editable-region-- - + ``` diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f41c979787462e76dab90.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f41c979787462e76dab90.md index 0a5799c9562..fd3d76dec68 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f41c979787462e76dab90.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f41c979787462e76dab90.md @@ -44,20 +44,22 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')); ```html - - - Nutrition Label - - - - -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  - + + + + Nutrition Label + + + + + +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  + ``` diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f423cf65d5864132a0956.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f423cf65d5864132a0956.md index 369b2192158..4a512331eef 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f423cf65d5864132a0956.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f423cf65d5864132a0956.md @@ -24,22 +24,24 @@ assert(document.querySelector('h1')?.classList?.contains('bold')); ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  --fcc-editable-region-- - + ``` diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f42a021625f656101ef93.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f42a021625f656101ef93.md index 770f1be1f2c..87f718e21c0 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f42a021625f656101ef93.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f42a021625f656101ef93.md @@ -9,7 +9,7 @@ dashedName: step-22 المسافة الأفقية بين العناصر ذات الأهمية المتساوية يمكن أن تزيد من سهولة قراءة النص الخاص بك. -قم بتغليف النص `2/3 cup (55g)` في عنصر `span`، وقم بإعطائه سمة `class` بقيمة `right`. +غلف النص `2/3 cup (55g)` داخل عنصر `span`. # --hints-- @@ -19,19 +19,13 @@ dashedName: step-22 assert(document.querySelector('span')); ``` -يجب أن يحتوي عنصر الـ `span` الجديد على سمة `class` بقيمة `right`. - -```js -assert(document.querySelector('span')?.classList?.contains('right')); -``` - يجب أن يحتوي عنصر `span` على النص `2/3 cup (55g)`. ```js assert(document.querySelector('span')?.textContent?.trim() === '2/3 cup (55g)'); ``` -يجب أن يظل عنصر `p` الخاص بك يحتوي على النص `Serving size 2/3 cup (55g)`. +يجب أن يحتوي عنصرك `p` على النص `Serving size 2/3 cup (55g)`. ```js assert(document.querySelectorAll('p')?.[1]?.innerText === 'Serving size 2/3 cup (55g)'); @@ -44,22 +38,24 @@ assert(document.querySelectorAll('p')?.[1]?.innerText === 'Serving size 2/3 cup ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  --fcc-editable-region-- - + ``` diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4bfb9de4a16703b56eb6.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4bfb9de4a16703b56eb6.md index a68d77f85cb..2ef7a879e78 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4bfb9de4a16703b56eb6.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4bfb9de4a16703b56eb6.md @@ -7,22 +7,20 @@ dashedName: step-23 # --description-- -تُستخدم الخاصية `float` لوضع عنصر على يسار أو يمين الحاوية (container) الخاصة به، مما يسمح لمحتوى آخر (مثل نص) بالالتفاف حوله. - -قم بإنشاء منتقي `.right` جديد وقم بتعيين خاصية `float` بقيمة `right`. +الآن يمكنك إضافة المسافات الأفقية باستخدام `flex`. في منتقيك `p`، أضف خاصية `display` بقيمة `flex` وخاصية `justify-content` بقيمة `space-between`. # --hints-- -يجب عليك إنشاء منتقي `.right` جديد. +يجب أن يحتوي منتقيك `p` على خاصية `display` بقيمة `flex`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.right')); +assert(new __helpers.CSSHelp(document).getStyle('p')?.display === 'flex'); ``` -يجب أن يكون لمنتقي `.right` الخاص بك خاصية `float` بقيمة `right`. +يجب أن يحتوي منتقيك `p` على `justify-content` بقيمة `space-between`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.right')?.float === 'right'); +assert(new __helpers.CSSHelp(document).getStyle('p')?.justifyContent === 'space-between'); ``` # --seed-- @@ -32,20 +30,22 @@ assert(new __helpers.CSSHelp(document).getStyle('.right')?.float === 'right'); ```html - - - Nutrition Label - - - - -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  - + + + + Nutrition Label + + + + + +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  + ``` @@ -75,9 +75,11 @@ h1 { letter-spacing: 0.15px } +--fcc-editable-region-- p { margin: 0; } +--fcc-editable-region-- .divider { border-bottom: 1px solid #888989; @@ -87,8 +89,4 @@ p { .bold { font-weight: 800; } - ---fcc-editable-region-- - ---fcc-editable-region-- ``` diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ce9d877b668417c0c42.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ce9d877b668417c0c42.md index ca5da190daa..1b8fa035bc7 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ce9d877b668417c0c42.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ce9d877b668417c0c42.md @@ -40,22 +40,24 @@ assert(children?.[3]?.localName === 'p'); ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  --fcc-editable-region-- - + ``` @@ -87,6 +89,8 @@ h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -97,8 +101,4 @@ p { .bold { font-weight: 800; } - -.right { - float: right; -} ``` diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4dde9d72e3694cb9ee3b.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4dde9d72e3694cb9ee3b.md index f71894f0b7d..d6250596d07 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4dde9d72e3694cb9ee3b.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4dde9d72e3694cb9ee3b.md @@ -39,22 +39,24 @@ assert(style?.letterSpacing === '0.15px'); ```html - - - Nutrition Label - - - - -
                                  -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  -
                                  - + + + + Nutrition Label + + + + + +
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  +
                                  + ``` @@ -88,6 +90,8 @@ h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -98,8 +102,4 @@ p { .bold { font-weight: 800; } - -.right { - float: right; -} ``` diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ec58334106a4170c2a8.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ec58334106a4170c2a8.md index b77f6f11cb6..e3a47842c11 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ec58334106a4170c2a8.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ec58334106a4170c2a8.md @@ -7,7 +7,7 @@ dashedName: step-26 # --description-- -قم بإنشاء `div` جديد أسفل عنصر `header` وإعطائه سمة `class` بقيمة `divider lg`. +أنشئ `div` جديد أسفل عنصر `header` وإعطائه سمة `class` بقيمة `divider large`. # --hints-- @@ -23,12 +23,12 @@ assert(document.querySelectorAll('div')?.length === 3); assert(document.querySelector('.label')?.lastElementChild?.localName === 'div'); ``` -عنصر `div` الجديد الخاص بك يجب أن يحتوي على سمة `class` بقيمة `divider lg`. +عنصر `div` الجديد الخاص بك يجب أن يحتوي على سمة `class` بقيمة `divider large`. ```js const div = document.querySelector('.label')?.lastElementChild; assert(div?.classList?.contains('divider')); -assert(div?.classList?.contains('lg')); +assert(div?.classList?.contains('large')); ``` # --seed-- @@ -38,25 +38,27 @@ assert(div?.classList?.contains('lg')); ```html - - - Nutrition Label - - - - -
                                  -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  + + + + Nutrition Label + + + + + +
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  --fcc-editable-region-- --fcc-editable-region-- -
                                  - +
                                  + ``` @@ -88,6 +90,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -98,8 +102,4 @@ p { .bold { font-weight: 800; } - -.right { - float: right; -} ``` diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4f9e4a40566b776a8f38.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4f9e4a40566b776a8f38.md index f847fa8e60b..a04e96d9946 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4f9e4a40566b776a8f38.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4f9e4a40566b776a8f38.md @@ -7,32 +7,32 @@ dashedName: step-27 # --description-- -قم بإنشاء منتقي `.lg` جديد وإعطائه خاصية `height` بقيمة `10px`. قم أيضا بإنشاء منتقي `.lg, .md` وتعيين خاصية `background-color` إلى `black`. +أنشئ منتقي `.large` جديد وإعطائه خاصية `height` بقيمة `10px`. أنشئ منتقي `.large, .medium` أيضا, وتعيين خاصية `background-color` بقيمة `black`. # --hints-- -يجب أن يكون لديك منتقي `.lg` جديد. +يجب أن يكون لديك منتقي `.large` جديد. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg')); +assert(new __helpers.CSSHelp(document).getStyle('.large')); ``` -يجب أن يكون لمنتقي `.lg` الخاص بك خاصية `height` بقيمة `10px`. +يجب أن يحتوي منتقيك `.large` على خاصية `height` بقيمة `10px`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg')?.height === '10px'); +assert(new __helpers.CSSHelp(document).getStyle('.large')?.height === '10px'); ``` -يجب أن يكون لديك منتقي `.lg, .md` جديد. +يجب أن يكون لديك منتقي `.large, .medium` جديد. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')); +assert(new __helpers.CSSHelp(document).getStyle('.large, .medium')); ``` -يجب أن يكون لمنتقي `.lg, .md` الخاص بك `background-color` تم تعيينه إلى `black`. +يجب أن يحتوي لمنتقيك `.large, .medium` على `background-color` بقيمة `black`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')?.backgroundColor === 'black'); +assert(new __helpers.CSSHelp(document).getStyle('.large, .medium')?.backgroundColor === 'black'); ``` # --seed-- @@ -42,23 +42,25 @@ assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')?.backgroundColor === ```html - - - Nutrition Label - - - - -
                                  -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  -
                                  -
                                  - + + + + Nutrition Label + + + + + +
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  +
                                  +
                                  + ``` @@ -90,6 +92,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -101,10 +105,6 @@ p { font-weight: 800; } -.right { - float: right; -} - --fcc-editable-region-- --fcc-editable-region-- diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f50473cc0196c6dd3892a.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f50473cc0196c6dd3892a.md index 525315b99fa..730d64a4ef2 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f50473cc0196c6dd3892a.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f50473cc0196c6dd3892a.md @@ -7,16 +7,16 @@ dashedName: step-28 # --description-- -يمكنك ملاحظة أنه لا يزال هناك حدود صغيرة في أسفل عنصر `.lg`. لإعادة تعيين هذا، قم بإعطاء منتقي `.lg, .md` الخاصية `border` بقيمة `0`. +يمكنك ملاحظة أنه لا يزال هناك حدود صغيرة في أسفل عنصر `.large`. لإعادة تعيين هذا، أعطي منتقي `.large, .medium` خاصية `border` بقيمة `0`. -ملاحظة: سيتم استخدام فئة `md`(متوسط) في الخطوة 37 لأشرطة الأرفع في nutrition label. +ملاحظة: سيتم استخدام فئة `medium`(متوسط) في الخطوة 37 لأشرطة الأنحف في nutrition label. # --hints-- -يجب أن يكون لمنتقيك `.lg, .md` الخاصية `border` بقيمة `0`. +يجب أن يكون لمنتقيك `.large, .medium` خاصية `border` بقيمة `0`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')?.borderWidth === '0px'); +assert(new __helpers.CSSHelp(document).getStyle('.large, .medium')?.borderWidth === '0px'); ``` # --seed-- @@ -26,23 +26,25 @@ assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')?.borderWidth === '0p ```html - - - Nutrition Label - - - - -
                                  -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  -
                                  -
                                  - + + + + Nutrition Label + + + + + +
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  +
                                  +
                                  + ``` @@ -74,6 +76,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -85,16 +89,12 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } --fcc-editable-region-- -.lg, .md { +.large, .medium { background-color: black; } --fcc-editable-region-- diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51257a8a516d80b6c743.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51257a8a516d80b6c743.md index 34ae3eef7f1..304f2775147 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51257a8a516d80b6c743.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51257a8a516d80b6c743.md @@ -7,7 +7,7 @@ dashedName: step-29 # --description-- -قم بإنشاء `div` جديد أسفل عنصر `.lg` وإعطائه سمة `class` بقيمة `calories-info`. +أنشئ `div` جديد أسفل عنصر `.large` وإعطائه سمة `class` بقيمة `calories-info`. # --hints-- @@ -23,10 +23,10 @@ assert(document.querySelectorAll('div')?.length === 4); assert(document.querySelector('.label')?.lastElementChild?.classList?.contains('calories-info')); ``` -يجب أن يأتي الـ `div` الجديد بعد عنصر `.lg` الخاص بك. +يجب أن يأتي `div` الجديد بعد عنصر `.large`. ```js -assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('lg')); +assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('large')); ``` # --seed-- @@ -36,26 +36,28 @@ assert(document.querySelector('.label')?.lastElementChild?.previousElementSiblin ```html - - - Nutrition Label - - - - -
                                  -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  -
                                  + + + + Nutrition Label + + + + + +
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  +
                                  --fcc-editable-region-- --fcc-editable-region-- -
                                  - +
                                  + ``` @@ -87,6 +89,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -98,15 +102,11 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51e4e5b24a6e80eccce1.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51e4e5b24a6e80eccce1.md index f5bdfa440d3..1fcb753a676 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51e4e5b24a6e80eccce1.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51e4e5b24a6e80eccce1.md @@ -7,27 +7,39 @@ dashedName: step-30 # --description-- -ضمن عنصر `.calories-info` الخاص بك، أنشئ عنصر `p`. اعطي عنصر `p` سمة `class` تم تعيينها إلى `bold sm-text`، والنص `Amount per serving`. +داخل عنصرك `.calories-info`، أنشئ عنصر `div`. اعطي هذا العنصر `div` سمة `class` بقيمة `left-container`. داخل عنصر المنشئ حديثا `div`، أضف عنصر `h2` جديد مع النص `Amount per serving`. أعطِ عنصر `h2` السمة `class` بقيمة `bold small-text`. # --hints-- -يجب عليك إنشاء عنصر `p` جديد داخل عنصر `.calories-info` الخاص بك. +يجب عليك إنشاء عنصر `div` جديد داخل عنصرك `.calories-info`. ```js -assert(document.querySelector('.calories-info')?.children?.[0]?.localName === 'p'); +assert(document.querySelector('.calories-info')?.children?.[0]?.localName === 'div'); ``` -يجب أن يحتوي عنصر `p` الجديد على سمة `class` بقيمة `bold sm-text`. +يجب أن يحتوي عنصرك `div` على سمة `class` بقيمة `left-container`. ```js -assert(document.querySelector('.calories-info')?.children?.[0]?.classList.contains('bold')); -assert(document.querySelector('.calories-info')?.children?.[0]?.classList.contains('sm-text')); +assert(document.querySelector('.calories-info')?.children?.[0]?.classList.contains('left-container')); ``` -عنصر `p` الجديد يجب أن يحتوي على النص `Amount per serving`. +يجب عليك إنشاء عنصر `h2` جديد داخل عنصرك `.left-container`. ```js -assert(document.querySelector('.calories-info')?.children?.[0]?.innerText === 'Amount per serving'); +assert(document.querySelector('.left-container')?.children?.[0]?.localName === 'h2'); +``` + +يجب أن يحتوي عنصر `h2` الجديد على سمة `class` بقيمة `bold small-text`. + +```js +assert(document.querySelector('.left-container')?.children?.[0]?.classList.contains('bold')); +assert(document.querySelector('.left-container')?.children?.[0]?.classList.contains('small-text')); +``` + +يجب أن يحتوي عنصر `h2` الجديد على النص `Amount per serving`. + +```js +assert(document.querySelector('.left-container')?.children?.[0]?.innerText === 'Amount per serving'); ``` # --seed-- @@ -37,28 +49,30 @@ assert(document.querySelector('.calories-info')?.children?.[0]?.innerText === 'A ```html - - - Nutrition Label - - - - -
                                  -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  -
                                  ---fcc-editable-region-- -
                                  -
                                  + + + Nutrition Label + + + + + +
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  +
                                  --fcc-editable-region-- +
                                  +
                                  - +--fcc-editable-region-- +
                                  + ``` @@ -90,6 +104,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -101,15 +117,11 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md index e31076458b7..6fd66331f79 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md @@ -9,20 +9,20 @@ dashedName: step-31 وحدة `rem` تعني `root em`، وهي تتعلق بحجم الخط (font size) لعنصر `html`. -قم بإنشاء منتقي `.sm-text` وتعيين `font-size` إلى `0.85rem`، والتي ستحسب على أنها تقريبا `13.6px` (تذكر أنك قمت بتعيين `html` ليكون لديه `font-size` من `16px`). +أنشئ منتقي `.small-text` وعين `font-size` بقيمة `0.85rem`، التي ستحسب على أنها تقريبا `13.6px` (تذكر أنك تعيين `html` ليحتوي على `font-size` بقيمة `16px`). # --hints-- -يجب أن يكون لديك منتقي `.sm-text`. +يجب أن يكون لديك منتقي `.small-text`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.sm-text')); +assert(new __helpers.CSSHelp(document).getStyle('.small-text')); ``` -يجب أن يكون لمنتقي `.sm-text` الخاص بك الخاصية `font-size` بقيمة `0.85rem`. +يجب أن يحتوي منتقيك `.small-text` على خاصية `font-size` بقيمة `0.85rem`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.sm-text')?.fontSize === '0.85rem'); +assert(new __helpers.CSSHelp(document).getStyle('.small-text')?.fontSize === '0.85rem'); ``` # --seed-- @@ -32,26 +32,30 @@ assert(new __helpers.CSSHelp(document).getStyle('.sm-text')?.fontSize === '0.85r ```html - - - Nutrition Label - - - - -
                                  -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  -
                                  -
                                  -

                                  Amount per serving

                                  + + + + Nutrition Label + + + + + +
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  +
                                  +
                                  +
                                  +

                                  Amount per serving

                                  - +
                                  + ``` @@ -83,6 +87,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -94,15 +100,11 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5486b8fd4b71633f69b0.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5486b8fd4b71633f69b0.md index 9ba4b143a80..1b7b81f96be 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5486b8fd4b71633f69b0.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5486b8fd4b71633f69b0.md @@ -1,51 +1,50 @@ --- id: 615f5486b8fd4b71633f69b0 -title: الخطوة 32 +title: الخطوة 33 challengeType: 0 -dashedName: step-32 +dashedName: step-33 --- # --description-- -أسفل عنصر `.sm-text` الخاص بك، قم بإنشاء عنصر `h1` جديد مع النص `Calories 230`. قم بتغليف جزء `230` من النص في عنصر `span` مع `class` بقيمة `right`. +أسفل عنصرك `.small-text`، أنشئ عنصر `p` جديد مع النص `Calories`. أسفل عنصرك `.left-container`، أنشئ عنصر `span` جديد مع النص `230`. # --hints-- -يجب أن يكون لديك عنصر `h1` جديد داخل عنصر `.calories-info` الخاص بك. +يجب أن يكون لديك عنصر `p` جديد داخل عنصرك `.calories-info`. ```js -assert(document.querySelector('.calories-info')?.querySelector('h1')) +assert(document.querySelector('.calories-info')?.querySelector('p')) ``` -عنصر `h1` الخاص بك يجب أن يأتي بعد عنصر `.sm-text` الخاص بك. +يجب أن يكون لديك عنصر `span` جديد داخل عنصرك `.calories-info`. ```js -assert(document.querySelector('.sm-text')?.nextElementSibling?.localName === 'h1'); +assert(document.querySelector('.calories-info')?.querySelector('span')) ``` -يجب أن يحتوي عنصر `h1` الخاص بك على النص `Calories 230`. +يجب أن يأتي عنصرك `p` بعد عنصرك `.small-text`. ```js -// the float: right property does weird things to the inner text. -assert(document.querySelector('.calories-info')?.lastElementChild?.innerText.match(/Calories[\s|\n]*230/)); +assert(document.querySelector('.small-text')?.nextElementSibling?.localName === 'p'); ``` -يجب عليك إنشاء عنصر `span` ضمن عنصر `h1` الجديد. +يجب أن يحتوي عنصرك `p` على النص `Calories`. ```js -assert(document.querySelector('.calories-info')?.lastElementChild?.querySelector('span')); +assert(document.querySelector('.left-container')?.lastElementChild?.innerText === 'Calories'); ``` -يجب أن يحتوي عنصر `span` على `class` بقيمة `right`. +يجب أن يأتي عنصرك `span` بعد عنصرك `.left-container`. ```js -assert(document.querySelector('.calories-info')?.lastElementChild?.querySelector('span')?.classList?.contains('right')); +assert(document.querySelector('.left-container')?.nextElementSibling?.localName ==='span'); ``` يجب أن يحتوي عنصر `span` على النص `230`. ```js -assert(document.querySelector('.calories-info')?.lastElementChild?.querySelector('span')?.innerText === '230'); +assert(document.querySelector('.calories-info')?.lastElementChild?.innerText === '230'); ``` # --seed-- @@ -55,28 +54,32 @@ assert(document.querySelector('.calories-info')?.lastElementChild?.querySelector ```html - - - Nutrition Label - - - - -
                                  -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  -
                                  + + + + Nutrition Label + + + + + +
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

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

                                  Amount per serving

                                  +
                                  +
                                  +

                                  Amount per serving

                                  ---fcc-editable-region--
                                  - +--fcc-editable-region-- +
                                  + ``` @@ -108,6 +111,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -119,20 +124,20 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } + +.calories-info h2 { + margin: 0; +} ``` diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f575b50b91e72af079480.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f575b50b91e72af079480.md index a1f21f57256..04e6d72b795 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f575b50b91e72af079480.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f575b50b91e72af079480.md @@ -1,29 +1,41 @@ --- id: 615f575b50b91e72af079480 -title: الخطوة 33 +title: Step 35 challengeType: 0 -dashedName: step-33 +dashedName: step-35 --- # --description-- -قم بإنشاء منتقي `.calories-info h1` يعين top و margin bottom إلى `-5px`، و left و right margin إلى `-2px`. +أنشئ منتقي `.left-container p` يعين هامش (margin) من أعلى وأسفل بمقدار `-5px`، و هامش من اليسار واليمين بمقدار `-2px`. أيضا عيّن خاصية `font-size` بمقدار `2em` وخاصية `font-weight` بمقدار `700`. # --hints-- -يجب أن يكون لديك منتقي `.calories-info h1` جديد. +يجب أن يكون لديك منتقي `.left-container p` جديد. ```js -assert(new __helpers.CSSHelp(document).getStyle('.calories-info h1')); +assert(new __helpers.CSSHelp(document).getStyle('.left-container p')); ``` -المنتقي الجديد `.calories-info h1` يجب أن يكون لديه خاصية `margin` بقيمة `-5px -2px`. +ايجب أن يحتوي المنتقي الجديد `.left-container p` على خاصية `margin` بقيمة `-5px -2px`. ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marginTop, '-5px'); -assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marginBottom, '-5px'); -assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marginLeft, '-2px'); -assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marginRight, '-2px'); +assert.equal(new __helpers.CSSHelp(document).getStyle('.left-container p')?.marginTop, '-5px'); +assert.equal(new __helpers.CSSHelp(document).getStyle('.left-container p')?.marginBottom, '-5px'); +assert.equal(new __helpers.CSSHelp(document).getStyle('.left-container p')?.marginLeft, '-2px'); +assert.equal(new __helpers.CSSHelp(document).getStyle('.left-container p')?.marginRight, '-2px'); +``` + +يجب أن يحتوي المنتقي الجديد `.left-container p` على خاصية `font-size` بقيمة `2em`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.left-container p')?.fontSize === '2em'); +``` + +يجب أن يحتوي المنتقي الجديد `.left-container p` على خاصية `font-weight` بقيمة `700`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.left-container p')?.fontWeight === '700'); ``` # --seed-- @@ -33,27 +45,32 @@ assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marg ```html - - - Nutrition Label - - - - -
                                  -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  -
                                  -
                                  -

                                  Amount per serving

                                  -

                                  Calories 230

                                  + + + + Nutrition Label + + + + + +
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  +
                                  +
                                  +
                                  +

                                  Amount per serving

                                  +

                                  Calories

                                  + 230
                                  - +
                                  + ``` @@ -85,6 +102,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -96,23 +115,29 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + --fcc-editable-region-- --fcc-editable-region-- diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5af373a68e744a3c5a76.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5af373a68e744a3c5a76.md index 9b1f6cc2fa5..4d0d945df62 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5af373a68e744a3c5a76.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5af373a68e744a3c5a76.md @@ -1,13 +1,13 @@ --- id: 615f5af373a68e744a3c5a76 -title: الخطوة 34 +title: الخطوة 36 challengeType: 0 -dashedName: step-34 +dashedName: step-36 --- # --description-- -قم بإنشاء منتقي `.calories-info span` وتعيين `font-size` إلى `1.2em`. +أنشئ منتقي `.calories-info span`، عين `font-size` الخاص به بقيمة `2.4em` و `font-weight` بقيمة `700`. # --hints-- @@ -17,10 +17,16 @@ dashedName: step-34 assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')); ``` -يجب أن يكون لمنتقي `.calories-info span` الخاص بك الخاصية `font-size` بقيمة `1.2em`. +يجب أن يحتوي منتقيك `.calories-info span` على خاصية `font-size` بقيمة `2.4em`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.fontSize === '1.2em'); +assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.fontSize === '2.4em'); +``` + +يجب أن يحتوي منتقيك `.calories-info span` على خاصية `font-weight` بقيمة `700`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.fontWeight === '700'); ``` # --seed-- @@ -30,27 +36,32 @@ assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.fontSize ```html - - - Nutrition Label - - - - -
                                  -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  -
                                  -
                                  -

                                  Amount per serving

                                  -

                                  Calories 230

                                  + + + + Nutrition Label + + + + + +
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  +
                                  +
                                  +
                                  +

                                  Amount per serving

                                  +

                                  Calories

                                  + 230
                                  - +
                                  + ``` @@ -82,6 +93,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -93,25 +106,33 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; + font-size: 2em; + font-weight: 700; } --fcc-editable-region-- diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5fd85d0062761f288364.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5fd85d0062761f288364.md index 44123ee7606..b37ff03e525 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5fd85d0062761f288364.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5fd85d0062761f288364.md @@ -1,22 +1,22 @@ --- id: 615f5fd85d0062761f288364 -title: الخطوة 36 +title: الخطوة 37 challengeType: 0 -dashedName: step-36 +dashedName: step-37 --- # --description-- غالبًا ما تكون الطباعة (Typography) فنًا أكثر منها علمًا. قد تضطر إلى تعديل أشياء مثل المحاذاة حتى تبدو صحيحة. -قم بإعطاء منتقي `.calories-info span` الـ `margin-top` بقيمة `-7px`. سيؤدي هذا إلى تحويل النص الخاص بك `230` إلى موضعه. +أعطي منتقيك `.calories-info span` خاصية `margin` بقيمة `-7px -2px`. سيؤدي هذا إلى تحويل النص الخاص بك `230` إلى موضعه. # --hints-- -منتقي `.calories-info span` يجب ان يحتوي علي `margin-top` بقيمة `-7px`. +يجب أن يحتوي منتقي `.calories-info span` على `margin` بقيمة `-7px -2px`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.marginTop === '-7px'); +assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.margin === '-7px -2px'); ``` # --seed-- @@ -26,27 +26,32 @@ assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.marginTo ```html - - - Nutrition Label - - - - -
                                  -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  -
                                  -
                                  -

                                  Amount per serving

                                  -

                                  Calories 230

                                  + + + + Nutrition Label + + + + + +
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  +
                                  +
                                  +
                                  +

                                  Amount per serving

                                  +

                                  Calories

                                  + 230
                                  - +
                                  + ``` @@ -78,6 +83,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -89,31 +96,39 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } --fcc-editable-region-- .calories-info span { - font-size: 1.2em; + font-size: 2.4em; + font-weight: 700; } --fcc-editable-region-- ``` diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f61338c8ca176d6445574.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f61338c8ca176d6445574.md index 38c5bdaee7c..74b97b28254 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f61338c8ca176d6445574.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f61338c8ca176d6445574.md @@ -1,13 +1,13 @@ --- id: 615f61338c8ca176d6445574 -title: الخطوة 37 +title: الخطوة 38 challengeType: 0 -dashedName: step-37 +dashedName: step-38 --- # --description-- -أسفل عنصر `.calories-info` الخاص بك، أضف `div` مع سمة `class` بقمية `divider md`. +أسفل عنصرك `.calories-info`، أضف `div` مع سمة `class` بقيمة `divider medium`. # --hints-- @@ -17,11 +17,11 @@ dashedName: step-37 assert(document.querySelectorAll('.label > div')?.length === 3) ``` -يجب أن يحتوي عنصر `div` الجديد على سمة `class` بقيمة `divider md`. يجب أن يكون هذا العنصر الأخير في عنصر `.label` الخاص بك. +يجب أن يحتوي عنصر `div` الجديد على سمة `class` بقيمة `divider medium`. يجب أن يكون هذا العنصر الأخير في عنصر `.label` الخاص بك. ```js const div = document.querySelector('.label')?.lastElementChild; -assert(div?.classList?.contains('divider') && div?.classList?.contains('md')); +assert(div?.classList?.contains('divider') && div?.classList?.contains('medium')); ``` # --seed-- @@ -31,30 +31,35 @@ assert(div?.classList?.contains('divider') && div?.classList?.contains('md')); ```html - - - Nutrition Label - - - - -
                                  -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  -
                                  -
                                  -

                                  Amount per serving

                                  -

                                  Calories 230

                                  + + + + Nutrition Label + + + + + +
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  +
                                  +
                                  +
                                  +

                                  Amount per serving

                                  +

                                  Calories

                                  + 230 +
                                  --fcc-editable-region-- --fcc-editable-region-- -
                                  - +
                                  + ``` @@ -86,6 +91,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -97,30 +104,38 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; } ``` diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f666ac5edea782feb7e75.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f666ac5edea782feb7e75.md index 88644797489..1bd0c2eaee3 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f666ac5edea782feb7e75.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f666ac5edea782feb7e75.md @@ -1,26 +1,26 @@ --- id: 615f666ac5edea782feb7e75 -title: الخطوة 38 +title: الخطوة 39 challengeType: 0 -dashedName: step-38 +dashedName: step-39 --- # --description-- -قم بإنشاء منتقي `.md` وإعطائه خاصية `height` بقيمة `5px`. +أنشئ منتقي `.medium` واعطه خاصية `height` بقيمة `5px`. # --hints-- -يجب عليك إنشاء منتقي `.md`. +يجب عليك إنشاء منتقي `.medium`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.md')); +assert(new __helpers.CSSHelp(document).getStyle('.medium')); ``` -يجب أن يكون لمنتقي `.md` الخاص بك الخاصية `height` بقيمة `5px`. +يجب أن يكون لمنتقيك `.medium` خاصية `height` بقيمة `5px`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.md')?.height === '5px'); +assert(new __helpers.CSSHelp(document).getStyle('.medium')?.height === '5px'); ``` # --seed-- @@ -30,28 +30,33 @@ assert(new __helpers.CSSHelp(document).getStyle('.md')?.height === '5px'); ```html - - - Nutrition Label - - - - -
                                  -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  -
                                  -
                                  -

                                  Amount per serving

                                  -

                                  Calories 230

                                  + + + + Nutrition Label + + + + + +
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  +
                                  +
                                  +
                                  +

                                  Amount per serving

                                  +

                                  Calories

                                  -
                                  + 230
                                  - +
                                  +
                                  + ``` @@ -83,6 +88,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -94,15 +101,11 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } @@ -111,17 +114,29 @@ p { --fcc-editable-region-- -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; } ``` diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f671b6d1919792745aa5d.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f671b6d1919792745aa5d.md index 21052dd5bd0..ff06aea7d14 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f671b6d1919792745aa5d.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f671b6d1919792745aa5d.md @@ -1,29 +1,29 @@ --- id: 615f671b6d1919792745aa5d -title: الخطوة 39 +title: الخطوة 40 challengeType: 0 -dashedName: step-39 +dashedName: step-40 --- # --description-- -قم بإنشاء عنصر `div` جديد تحت عنصر `.md` الخاص بك. قم بإعطائه سمة `class` تم تعيينها إلى `daily-value sm-text`. داخل هذا الـ `div` الجديد، قم بإضافة عنصر `p` مع النص `% Daily Value *`، وتعيين سمة `class` إلى `right bold`. +أنشئ عنصر `div` جديد تحت عنصرك `.medium`. أعطه سمة `class` بقيمة `daily-value small-text`. داخل هذا الـ `div` الجديد، أضف عنصر `p` مع النص `% Daily Value *`، وتعيين سمة `class` إلى `bold right`. # --hints-- -يجب عليك إنشاء عنصر `div` جديد بعد عنصر `.md` الخاص بك. +يجب عليك إنشاء عنصر `div` جديد بعد عنصرك `.medium`. ```js assert(document.querySelector('.label')?.lastElementChild?.localName === 'div'); assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('divider')); -assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('md')); +assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('medium')); ``` -يجب أن يحتوي الـ `div` الجديد على سمة `class` بقيمة `daily-value sm-text`. +يجب أن يحتوي الـ `div` الجديد على سمة `class` بقيمة `daily-value small-text`. ```js assert(document.querySelector('.label')?.lastElementChild?.classList?.contains('daily-value')); -assert(document.querySelector('.label')?.lastElementChild?.classList?.contains('sm-text')); +assert(document.querySelector('.label')?.lastElementChild?.classList?.contains('small-text')); ``` يجب أن يحتوي عنصر `div` الجديد على عنصر `p`. @@ -38,11 +38,11 @@ assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.lo assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.textContent === '% Daily Value *'); ``` -يجب أن يحتوي عنصر `p` الجديد على سمة `class` بقيمة `right bold`. +يجب أن يحتوي عنصر `p` الجديد على سمة `class` بقيمة `bold right`. ```js -assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.classList?.contains('right')); assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.classList?.contains('right')); ``` # --seed-- @@ -52,32 +52,36 @@ assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.cl ```html - - - Nutrition Label - - - - -
                                  -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  -
                                  -
                                  -

                                  Amount per serving

                                  -

                                  Calories 230

                                  -
                                  -
                                  ---fcc-editable-region-- ---fcc-editable-region-- + + + Nutrition Label + + + + + +
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  +
                                  +
                                  +
                                  +

                                  Amount per serving

                                  +

                                  Calories

                                  + 230
                                  - + --fcc-editable-region-- +
                                  + + --fcc-editable-region-- +
                                  + ``` @@ -109,6 +113,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -120,34 +126,42 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; } ``` diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6823d0815b7a991f2a75.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6823d0815b7a991f2a75.md index cec99a1be06..9301f275c6b 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6823d0815b7a991f2a75.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6823d0815b7a991f2a75.md @@ -1,32 +1,32 @@ --- id: 615f6823d0815b7a991f2a75 -title: الخطوة 40 +title: الخطوة 42 challengeType: 0 -dashedName: step-40 +dashedName: step-42 --- # --description-- -نمط `float` يتسبب في ان عنصر `p` الجديد يصبح خارج حدود الـ label. استخدم عنصر `.divider` الموجود كمثال لإضافة divider جديد بعد عنصر `p`. +استخدم عنصر `.divider` الموجود كمثال لإضافة divider جديد بعد عنصر `p`. # --hints-- -يجب عليك إنشاء `div` جديد داخل عنصر `.daily-value.sm-text`. +يجب عليك إنشاء `div` جديد بعد عنصرك `.daily-value`. ```js -assert(document.querySelectorAll('.daily-value.sm-text > div')?.length === 1) +assert(document.querySelectorAll('.daily-value.small-text > div')?.length === 1) ``` يجب أن يحتوي عنصر `div` الجديد على سمة `class` بقيمة `divider`. ```js -assert(document.querySelector('.daily-value.sm-text > div')?.classList?.contains('divider')) +assert(document.querySelector('.daily-value.small-text > div')?.classList?.contains('divider')) ``` يجب أن يأتي `div` الجديد بعد عنصر `p` الخاص بك. ```js -assert(document.querySelector('.daily-value.sm-text > div')?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text > div')?.previousElementSibling?.localName === 'p'); ``` # --seed-- @@ -36,34 +36,38 @@ assert(document.querySelector('.daily-value.sm-text > div')?.previousElementSibl ```html - - - Nutrition Label - - - - -
                                  -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  -
                                  -
                                  -

                                  Amount per serving

                                  -

                                  Calories 230

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

                                  % Daily Value *

                                  + + + Nutrition Label + + + + + +
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  +
                                  +
                                  +
                                  +

                                  Amount per serving

                                  +

                                  Calories

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

                                  % Daily Value *

                                  +
                                  + --fcc-editable-region-- +
                                  + ``` @@ -95,6 +99,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -106,34 +112,46 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } ``` diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6b2d164f81809efd9bdc.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6b2d164f81809efd9bdc.md index 6c780d7cf53..8552d8f8cdc 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6b2d164f81809efd9bdc.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6b2d164f81809efd9bdc.md @@ -1,56 +1,62 @@ --- id: 615f6b2d164f81809efd9bdc -title: الخطوة 42 +title: الخطوة 43 challengeType: 0 -dashedName: step-42 +dashedName: step-43 --- # --description-- -بعد آخر عنصر `.divider`، أنشئ عنصر `p` وأعطيه النص `Total Fat 8g 10%`. قم بتغليف `Total Fat` في `span` مع `class` تم تعيينه إلى `bold`. قم بتغليف `10%` في `span` مع `class` تم تعيينه إلى `bold right`. +بعد آخر عنصر `.divider`، أنشئ عنصر `p` وأعطيه النص `Total Fat 8g 10%`. قم بتغليف `Total Fat` في `span` مع `class` تم تعيينه إلى `bold`. غلف `10%` داخل عنصر `span` مع `class` بقيمة `bold`. غلف `Total Fat 8g` داخل عنصر إضافي `span` أيضا، من أجل المحاذاة (alignment). # --hints-- يجب عليك إنشاء عنصر `p` جديد في نهاية عنصر `.daily-value` الخاص بك. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` عنصر `p` الجديد الخاص بك يجب أن يحتوي على النص `Total Fat 8g 10%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Total Fat 8g[\s|\n]+10%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Total Fat[\s|\n]+8g[\s|\n]+10%/)); ``` -يجب أن يحتوي عنصر `p` الجديد على عنصران `span`. +يجب أن يحتوي عنصرك `p` على ثلاث عناصر `span`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 2); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 3); ``` -يجب أن يغلف عنصر `span` الاول النص `Total Fat`. +يجب أن يغلف عنصر `span` النص `Total Fat`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.innerText === 'Total Fat'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span > span')?.innerText === 'Total Fat'); ``` -يجب أن يحتوي عنصر `span` الاول على `class` بقيمة `bold`. +يجب أن يحتوي عنصر `span` الذي لديه نص `Total Fat` على `class` بقيمة `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.className === 'bold'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span > span')?.className === 'bold'); ``` -يجب أن يغلف عنصر `span` الثاني النص `10%`. +يجب أن يغلف عنصر `span` النص `10%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.[1]?.innerText === '10%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span + span')?.innerText === '10%'); ``` -يجب أن يحتوي عنصر `span` الثاني على `class` بقيمة `bold right`. +يجب أن يحتوي عنصر `span` الذي لديه نص `10%` على `class` بقيمة `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.[1]?.className === 'bold right'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.[1]?.className === 'bold'); +``` + +يجب أن يغلف عنصر `span` النص `Total Fat 8g`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Total Fat[\s|\n]+8g/)); ``` # --seed-- @@ -60,35 +66,39 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySe ```html - - - Nutrition Label - - - - -
                                  -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  -
                                  -
                                  -

                                  Amount per serving

                                  -

                                  Calories 230

                                  -
                                  -
                                  -
                                  -

                                  % Daily Value *

                                  -
                                  ---fcc-editable-region-- ---fcc-editable-region-- + + + Nutrition Label + + + + + +
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  +
                                  +
                                  +
                                  +

                                  Amount per serving

                                  +

                                  Calories

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

                                  % Daily Value *

                                  +
                                  +
                                  + --fcc-editable-region-- +
                                  + ``` @@ -120,46 +130,59 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } ``` diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6cc778f7698258467596.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6cc778f7698258467596.md index 101019a5a3b..b4058b35cd3 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6cc778f7698258467596.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6cc778f7698258467596.md @@ -1,46 +1,45 @@ --- id: 615f6cc778f7698258467596 -title: الخطوة 43 +title: الخطوة 44 challengeType: 0 -dashedName: step-43 +dashedName: step-44 --- # --description-- -أسفل العنصر مع النص `Total Fat`، قم بإنشاء عنصر `p` جديد مع النص `Saturated Fat 1g 5%`. قم بتغليف `5%` في `span` مع السمة `class` بقيمة `bold right`. +أسفل العنصر مع النص `Total Fat`، قم بإنشاء عنصر `p` جديد مع النص `Saturated Fat 1g 5%`. غلف `5%` في `span` مع السمة `class` بقيمة `bold`. في هذه الحالة تكفي النسبة المئوية بقيمة `5%` لمحاذاة. # --hints-- يجب عليك إنشاء عنصر `p` جديد تحت العنصر الخاص بك مع النص `Total Fat`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.innerText.match(/Total Fat 8g\s*10%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.innerText.match(/Total Fat 8g\s*10%/)); ``` عنصر `p` الجديد الخاص بك يجب أن يحتوي على النص `Saturated Fat 1g 5%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText.match(/Saturated Fat 1g\s*5%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText.match(/Saturated Fat 1g\s*5%/)); ``` يجب أن يحتوي عنصر `p` الجديد على عنصر `span`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.localName === 'span'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.localName === 'span'); ``` -يجب أن يحتوي عنصر `span` على سمة `class` بقيمة `bold right`. +يجب أن يحتوي عنصر `span` على سمة `class` بقيمة `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); ``` يجب أن يغلف عنصر `span` النص `5%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.innerText === "5%"); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === "5%"); ``` # --seed-- @@ -50,36 +49,40 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastEle ```html - - - Nutrition Label - - - - -
                                  -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  -
                                  -
                                  -

                                  Amount per serving

                                  -

                                  Calories 230

                                  -
                                  -
                                  -
                                  -

                                  % Daily Value *

                                  -
                                  -

                                  Total Fat 8g10%

                                  ---fcc-editable-region-- ---fcc-editable-region-- + + + Nutrition Label + + + + + +
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  +
                                  +
                                  +
                                  +

                                  Amount per serving

                                  +

                                  Calories

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

                                  % Daily Value *

                                  +
                                  +

                                  Total Fat 8g 10%

                                  +
                                  + --fcc-editable-region-- +
                                  + ``` @@ -111,46 +114,59 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } ``` diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6fddaac1e083502d3e6a.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6fddaac1e083502d3e6a.md index 6c7e57a53f2..8908448e4ca 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6fddaac1e083502d3e6a.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6fddaac1e083502d3e6a.md @@ -1,8 +1,8 @@ --- id: 615f6fddaac1e083502d3e6a -title: الخطوة 44 +title: الخطوة 45 challengeType: 0 -dashedName: step-44 +dashedName: step-45 --- # --description-- @@ -14,7 +14,7 @@ dashedName: step-44 عنصر `p` الخاص بك مع النص`Saturated Fat 1g 5%` يجب أن يحتوي على سمة `class` بقيمة `indent`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('indent')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('indent')); ``` # --seed-- @@ -24,36 +24,41 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                  -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  -
                                  -
                                  -

                                  Amount per serving

                                  -

                                  Calories 230

                                  -
                                  -
                                  -
                                  -

                                  % Daily Value *

                                  -
                                  -

                                  Total Fat 8g10%

                                  ---fcc-editable-region-- -

                                  Saturated Fat 1g 5%

                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  +
                                  +
                                  +
                                  +

                                  Amount per serving

                                  +

                                  Calories

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

                                  % Daily Value *

                                  +
                                  +

                                  Total Fat 8g 10%

                                  +

                                  Saturated Fat 1g 5%

                                  +
                                  + --fcc-editable-region-- +
                                  + ``` @@ -85,46 +90,59 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } ``` diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f70077a4ff98424236c1e.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f70077a4ff98424236c1e.md index b6752747632..ffa61e1d674 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f70077a4ff98424236c1e.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f70077a4ff98424236c1e.md @@ -1,8 +1,8 @@ --- id: 615f70077a4ff98424236c1e -title: الخطوة 45 +title: الخطوة 46 challengeType: 0 -dashedName: step-45 +dashedName: step-46 --- # --description-- @@ -30,34 +30,39 @@ assert(new __helpers.CSSHelp(document).getStyle('.indent')?.marginLeft === '1em' ```html - - - Nutrition Label - - - - -
                                  -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  -
                                  -
                                  -

                                  Amount per serving

                                  -

                                  Calories 230

                                  -
                                  -
                                  -
                                  -

                                  % Daily Value *

                                  -
                                  -

                                  Total Fat 8g10%

                                  -

                                  Saturated Fat 1g 5%

                                  + + + + Nutrition Label + + + + + +
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  +
                                  +
                                  +
                                  +

                                  Amount per serving

                                  +

                                  Calories

                                  + 230
                                  - +
                                  +
                                  +

                                  % Daily Value *

                                  +
                                  +

                                  Total Fat 8g 10%

                                  +

                                  Saturated Fat 1g 5%

                                  +
                                  +
                                  + ``` @@ -89,47 +94,60 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } --fcc-editable-region-- diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f72a872354a850d4f533e.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f72a872354a850d4f533e.md index 6b03e68ba1c..2d2b4f7286f 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f72a872354a850d4f533e.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f72a872354a850d4f533e.md @@ -1,8 +1,8 @@ --- id: 615f72a872354a850d4f533e -title: الخطوة 46 +title: الخطوة 47 challengeType: 0 -dashedName: step-46 +dashedName: step-47 --- # --description-- @@ -30,34 +30,39 @@ assert(new __helpers.CSSHelp(document).getStyle('.daily-value p')?.borderBottom ```html - - - Nutrition Label - - - - -
                                  -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  -
                                  -
                                  -

                                  Amount per serving

                                  -

                                  Calories 230

                                  -
                                  -
                                  -
                                  -

                                  % Daily Value *

                                  -
                                  -

                                  Total Fat 8g10%

                                  -

                                  Saturated Fat 1g 5%

                                  + + + + Nutrition Label + + + + + +
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  +
                                  +
                                  +
                                  +

                                  Amount per serving

                                  +

                                  Calories

                                  + 230
                                  - +
                                  +
                                  +

                                  % Daily Value *

                                  +
                                  +

                                  Total Fat 8g 10%

                                  +

                                  Saturated Fat 1g 5%

                                  +
                                  +
                                  + ``` @@ -89,47 +94,60 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f74a71f1e498619e38ee8.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f74a71f1e498619e38ee8.md index 9c4fdcbd2ca..1c8a5d7bca0 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f74a71f1e498619e38ee8.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f74a71f1e498619e38ee8.md @@ -1,8 +1,8 @@ --- id: 615f74a71f1e498619e38ee8 -title: الخطوة 47 +title: الخطوة 48 challengeType: 0 -dashedName: step-47 +dashedName: step-48 --- # --description-- @@ -14,16 +14,15 @@ dashedName: step-47 عنصر `p` الخاص بك مع النص `% Daily Value *` يجب أن يحتوي علي `no-divider` مضاف إلى السمة `class`. لا تقم بإزالة الـ classes الموجودة. ```js -const p = document.querySelector('.daily-value.sm-text')?.firstElementChild; +const p = document.querySelector('.daily-value.small-text')?.firstElementChild; assert(p?.classList?.contains('no-divider')); assert(p?.classList?.contains('bold')); -assert(p?.classList?.contains('right')); ``` عنصر `p` الخاص بك مع النص `Saturated Fat 1g 5%` يجب أن يحتوي علي `no-divider` مضاف إلى السمة `class`. لا تقم بإزالة الـ classes الموجودة. ```js -const p = document.querySelector('.daily-value.sm-text')?.lastElementChild; +const p = document.querySelector('.daily-value.small-text')?.lastElementChild; assert(p?.classList?.contains('no-divider')); assert(p?.classList?.contains('indent')); ``` @@ -35,36 +34,41 @@ assert(p?.classList?.contains('indent')); ```html - - - Nutrition Label - - - - -
                                  -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  -
                                  -
                                  -

                                  Amount per serving

                                  -

                                  Calories 230

                                  + + + + Nutrition Label + + + + + +
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  +
                                  +
                                  +
                                  +

                                  Amount per serving

                                  +

                                  Calories

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

                                  % Daily Value *

                                  -
                                  -

                                  Total Fat 8g10%

                                  -

                                  Saturated Fat 1g 5%

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

                                  % Daily Value *

                                  +
                                  +

                                  Total Fat 8g 10%

                                  +

                                  Saturated Fat 1g 5%

                                  +
                                  + --fcc-editable-region-- +
                                  + ``` @@ -96,47 +100,60 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ad94380408d971d14f6.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ad94380408d971d14f6.md index 9d8d097c803..e7933a731e7 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ad94380408d971d14f6.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ad94380408d971d14f6.md @@ -1,8 +1,8 @@ --- id: 615f7ad94380408d971d14f6 -title: الخطوة 48 +title: الخطوة 49 challengeType: 0 -dashedName: step-48 +dashedName: step-49 --- # --description-- @@ -44,37 +44,43 @@ assert(style?.borderBottom === '1px solid rgb(136, 137, 137)'); ## --seed-contents-- + ```html - - - Nutrition Label - - - - -
                                  -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  -
                                  -
                                  -

                                  Amount per serving

                                  -

                                  Calories 230

                                  -
                                  -
                                  -
                                  -

                                  % Daily Value *

                                  -
                                  -

                                  Total Fat 8g10%

                                  -

                                  Saturated Fat 1g 5%

                                  + + + + Nutrition Label + + + + + +
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  +
                                  +
                                  +
                                  +

                                  Amount per serving

                                  +

                                  Calories

                                  + 230
                                  - +
                                  +
                                  +

                                  % Daily Value *

                                  +
                                  +

                                  Total Fat 8g 10%

                                  +

                                  Saturated Fat 1g 5%

                                  +
                                  +
                                  + ``` @@ -106,47 +112,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7bc680f7168ea01ebf99.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7bc680f7168ea01ebf99.md index f1a5f04626b..50ca077bfad 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7bc680f7168ea01ebf99.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7bc680f7168ea01ebf99.md @@ -1,8 +1,8 @@ --- id: 615f7bc680f7168ea01ebf99 -title: الخطوة 49 +title: الخطوة 50 challengeType: 0 -dashedName: step-49 +dashedName: step-50 --- # --description-- @@ -13,16 +13,16 @@ dashedName: step-49 # --hints-- -يجب عليك إنشاء عنصر `div` جديد في نهاية عنصر `.daily-value.sm-text` الخاص بك. +يجب عليك إنشاء عنصر `div` جديد في نهاية عنصرك `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` يجب أن يحتوي عنصر `div` الجديد على سمة `class` بقيمة `divider`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -32,36 +32,41 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                  -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  -
                                  -
                                  -

                                  Amount per serving

                                  -

                                  Calories 230

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

                                  % Daily Value *

                                  -
                                  -

                                  Total Fat 8g10%

                                  -

                                  Saturated Fat 1g 5%

                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  +
                                  +
                                  +
                                  +

                                  Amount per serving

                                  +

                                  Calories

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

                                  % Daily Value *

                                  +
                                  +

                                  Total Fat 8g 10%

                                  +

                                  Saturated Fat 1g 5%

                                  +
                                  + --fcc-editable-region-- +
                                  + ``` @@ -93,47 +98,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7c71eab8218f846e4503.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7c71eab8218f846e4503.md index f331b02be94..b8f7a0f4985 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7c71eab8218f846e4503.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7c71eab8218f846e4503.md @@ -1,32 +1,32 @@ --- id: 615f7c71eab8218f846e4503 -title: الخطوة 50 +title: الخطوة 51 challengeType: 0 -dashedName: step-50 +dashedName: step-51 --- # --description-- -بعد آخر `.divider`، قم بإنشاء عنصر `p` آخر مع النص `Trans Fat 0g`. قم باستمالة (Italicize) الكلمة `Trans` عن طريق تغليفها في عنصر `i`. اعطي عنصر `p` الجديد السمة `class` بقيمة `indent no-divider`. +بعد آخر `.divider`، قم بإنشاء عنصر `p` آخر مع النص `Trans Fat 0g`. قم باستمالة (Italicize) الكلمة `Trans` عن طريق تغليفها في عنصر `i`. اعطي عنصر `p` الجديد السمة `class` بقيمة `indent no-divider`. غلف `Trans Fat 0g` داخل عنصر `span` للمحاذاة. # --hints-- -يجب عليك إنشاء عنصر `p` جديد في نهاية عنصر `.daily-value.sm-text` الخاص بك. +يجب عليك إنشاء عنصر `p` جديد في نهاية عنصرك `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` عنصر `p` الجديد الخاص بك يجب أن يحتوي على النص `Trans Fat 0g`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText === 'Trans Fat 0g'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText === 'Trans Fat 0g'); ``` يجب أن يحتوي عنصر `p` الجديد على سمة `class` بقيمة `indent no-divider`. ```js -const p = document.querySelector('.daily-value.sm-text')?.lastElementChild; +const p = document.querySelector('.daily-value.small-text')?.lastElementChild; assert(p?.classList?.contains('indent')); assert(p?.classList?.contains('no-divider')); ``` @@ -34,13 +34,25 @@ assert(p?.classList?.contains('no-divider')); يجب أن يحتوي عنصر `p` الجديد على عنصر `i`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.localName === 'i'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('i')); ``` يجب أن يغلف عنصر `i` النص `Trans`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.innerText === 'Trans'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('i')?.innerText === 'Trans'); +``` + +يجب أن يحتوي عنصر `p` الجديد على عنصر `span`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span')); +``` + +يجب أن يغلف عنصر `span` نص `Trans Fat 0g`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span')?.innerText?.match(/Trans[\s|\n]+Fat 0g/)); ``` # --seed-- @@ -50,37 +62,42 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstEl ```html - - - Nutrition Label - - - - -
                                  -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  -
                                  -
                                  -

                                  Amount per serving

                                  -

                                  Calories 230

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

                                  % Daily Value *

                                  -
                                  -

                                  Total Fat 8g10%

                                  -

                                  Saturated Fat 1g 5%

                                  -
                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  +
                                  +
                                  +
                                  +

                                  Amount per serving

                                  +

                                  Calories

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

                                  % Daily Value *

                                  +
                                  +

                                  Total Fat 8g 10%

                                  +

                                  Saturated Fat 1g 5%

                                  +
                                  +
                                  + --fcc-editable-region-- +
                                  + ``` @@ -112,47 +129,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7d489a581590d1350288.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7d489a581590d1350288.md index 211d459217a..dd7b5b778ea 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7d489a581590d1350288.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7d489a581590d1350288.md @@ -1,8 +1,8 @@ --- id: 615f7d489a581590d1350288 -title: الخطوة 51 +title: الخطوة 52 challengeType: 0 -dashedName: step-51 +dashedName: step-52 --- # --description-- @@ -11,16 +11,16 @@ dashedName: step-51 # --hints-- -يجب عليك إنشاء عنصر `div` جديد في نهاية عنصر `.daily-value.sm-text` الخاص بك. +يجب عليك إنشاء عنصر `div` جديد في نهاية عنصرك `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` عنصر `div` الجديد الخاص بك يجب أن يحتوي على سمة `class` بقيمة `divider`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -30,38 +30,43 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                  -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  -
                                  -
                                  -

                                  Amount per serving

                                  -

                                  Calories 230

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

                                  % Daily Value *

                                  -
                                  -

                                  Total Fat 8g10%

                                  -

                                  Saturated Fat 1g 5%

                                  -
                                  -

                                  Trans Fat 0g

                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  +
                                  +
                                  +
                                  +

                                  Amount per serving

                                  +

                                  Calories

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

                                  % Daily Value *

                                  +
                                  +

                                  Total Fat 8g 10%

                                  +

                                  Saturated Fat 1g 5%

                                  +
                                  +

                                  Trans Fat 0g

                                  +
                                  + --fcc-editable-region-- +
                                  + ``` @@ -93,47 +98,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7de4487b64919bb4aa5e.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7de4487b64919bb4aa5e.md index d1c9d728ded..d4650b1f3b0 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7de4487b64919bb4aa5e.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7de4487b64919bb4aa5e.md @@ -1,57 +1,62 @@ --- id: 615f7de4487b64919bb4aa5e -title: الخطوة 52 +title: الخطوة 53 challengeType: 0 -dashedName: step-52 +dashedName: step-53 --- # --description-- -بعد آخر `.divider`، قم بإنشاء عنصر `p` آخر مع النص `Cholesterol 0mg 0%`. قم بتغليف النص `Cholesterol` في عنصر `span`، واعطي عنصر `span` هذا السمة `class` بقيمة `bold`. قم بتغليف نص `0%` في `span` اخري مع `class` تم تعيينه إلى `bold right`. +بعد آخر `.divider`، قم بإنشاء عنصر `p` آخر مع النص `Cholesterol 0mg 0%`. قم بتغليف النص `Cholesterol` في عنصر `span`، واعطي عنصر `span` هذا السمة `class` بقيمة `bold`. غلف نص `0%` داخل `span` أخرى، مع `class` بقيمة `bold`. غلف `Cholesterol 0mg` داخل عنصر إضافي `span` أيضا، من أجل المحاذاة (alignment). # --hints-- -يجب عليك إنشاء عنصر `p` جديد في نهاية عنصر `.daily-value.sm-text` الخاص بك. +يجب عليك إنشاء عنصر `p` جديد في نهاية عنصرك `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` عنصر `p` الجديد الخاص بك يجب أن يحتوي على النص `Cholesterol 0mg 0%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Cholesterol 0mg[\s|\n]+0%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Cholesterol[\s|\n]+0mg[\s|\n]+0%/)); ``` -يجب أن يحتوي عنصر `p` الجديد على عنصران `span`. +يجب أن يحتوي عنصر `p` الجديد على ثلاث عناصر `span`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 2); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 3); ``` -يجب أن يحتوي عنصر `span` الاول على `class` بقيمة `bold`. +يجب أن يحتوي عنصر `span` الأول بنص `Cholesterol` على `class` بقيمة `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.classList?.contains('bold')); ``` -يجب أن يغلف عنصر `span` الاول النص `Cholesterol`. +يجب أن يغلف عنصر `span` الأول النص `Cholesterol 0mg`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.innerText === 'Cholesterol'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.innerText?.match(/Cholesterol[\s|\n]+0mg/)); ``` -يجب أن يحتوي عنصر `span` الثاني على سمة `class` بقيمة `bold right`. +يجب أن يغلف عنصر `span` الأول النص `Cholesterol`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.innerText === 'Cholesterol'); +``` + +يجب أن يحتوي عنصر `span` الثاني على سمة `class` بقيمة `bold`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); ``` يجب أن يغلف عنصر `span` الثاني النص `0%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.innerText === '0%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === '0%'); ``` # --seed-- @@ -61,39 +66,44 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastEle ```html - - - Nutrition Label - - - - -
                                  -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  -
                                  -
                                  -

                                  Amount per serving

                                  -

                                  Calories 230

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

                                  % Daily Value *

                                  -
                                  -

                                  Total Fat 8g10%

                                  -

                                  Saturated Fat 1g 5%

                                  -
                                  -

                                  Trans Fat 0g

                                  -
                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  +
                                  +
                                  +
                                  +

                                  Amount per serving

                                  +

                                  Calories

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

                                  % Daily Value *

                                  +
                                  +

                                  Total Fat 8g 10%

                                  +

                                  Saturated Fat 1g 5%

                                  +
                                  +

                                  Trans Fat 0g

                                  +
                                  +
                                  + --fcc-editable-region-- +
                                  + ``` @@ -125,47 +135,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7e7281626a92bbd62da8.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7e7281626a92bbd62da8.md index d8c51dcdbab..b1b038f31fc 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7e7281626a92bbd62da8.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7e7281626a92bbd62da8.md @@ -1,57 +1,62 @@ --- id: 615f7e7281626a92bbd62da8 -title: الخطوة 53 +title: الخطوة 54 challengeType: 0 -dashedName: step-53 +dashedName: step-54 --- # --description-- -أسفل العنصر `p` الأخير، قم بإنشاء عنصر `p` آخر مع النص `Sodium 160mg 7%`. قم بتغليف النص `Sodium` في عنصر `span` مع سمة `class` تم تعيينها إلى `bold`. قم بتغليف النص `7%` في `span` اخر مع `class` تم تعيينه إلى `bold right`. +أسفل العنصر `p` الأخير، قم بإنشاء عنصر `p` آخر مع النص `Sodium 160mg 7%`. قم بتغليف النص `Sodium` في عنصر `span` مع سمة `class` تم تعيينها إلى `bold`. غلف نص `7%` داخل `span` أخر مع `class` بقيمة `bold`. أضف عنصر إضافي `span` حول `Sodium 160mg` لمحاذاته بشكل صحيح. # --hints-- -يجب عليك إنشاء عنصر `p` جديد في نهاية عنصر `.daily-value.sm-text` الخاص بك. +يجب عليك إنشاء عنصر `p` جديد في نهاية عنصرك `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` عنصر `p` الجديد الخاص بك يجب أن يحتوي على نص `Sodium 160mg 7%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Sodium 160mg[\s|\n]+7%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Sodium[\s|\n]160mg[\s|\n]+7%/)); ``` -يجب أن يحتوي عنصر `p` الجديد على عنصران `span`. +يجب أن يحتوي عنصر `p` الجديد على ثلاث عناصر `span`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 2); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 3); ``` -يجب أن يحتوي عنصر `span` الاول على `class` بقيمة `bold`. +يجب أن يغلف عنصر `span` النص `Sodium 360mg`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.innerText?.match(/Sodium[\s|\n]160mg/)); ``` -يجب أن يغلف العنصر `span` النص `Sodium`. +يجب أن يغلف عنصر `span` النص `Sodium`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.innerText === 'Sodium'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.innerText === "Sodium"); ``` -يجب أن يحتوي عنصر `span` الثاني على سمة `class` بقيمة `bold right`. +يجب أن يحتوي عنصر `span` الذي لديه نص `Sodium` على سمة `class` بقيمة `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.classList?.contains('bold')); ``` -يجب أن يغلف عنصر `span` الثاني النص `7%`. +يجب أن يغلف عنصر `span` النص `7%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.innerText === '7%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === '7%'); +``` + +يجب أن يحتوي عنصر `span` الذي لديه نص `7%` على سمة `class` بقيمة `bold`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); ``` # --seed-- @@ -61,40 +66,45 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastEle ```html - - - Nutrition Label - - - - -
                                  -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  -
                                  -
                                  -

                                  Amount per serving

                                  -

                                  Calories 230

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

                                  % Daily Value *

                                  -
                                  -

                                  Total Fat 8g10%

                                  -

                                  Saturated Fat 1g 5%

                                  -
                                  -

                                  Trans Fat 0g

                                  -
                                  -

                                  Cholesterol 0mg 0%

                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  +
                                  +
                                  +
                                  +

                                  Amount per serving

                                  +

                                  Calories

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

                                  % Daily Value *

                                  +
                                  +

                                  Total Fat 8g 10%

                                  +

                                  Saturated Fat 1g 5%

                                  +
                                  +

                                  Trans Fat 0g

                                  +
                                  +

                                  Cholesterol 0mg 0%

                                  +
                                  + --fcc-editable-region-- +
                                  + ``` @@ -126,47 +136,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ecb09de9a938ef94756.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ecb09de9a938ef94756.md index 563d00093fd..63f1bfa8c5e 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ecb09de9a938ef94756.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ecb09de9a938ef94756.md @@ -1,57 +1,68 @@ --- id: 615f7ecb09de9a938ef94756 -title: الخطوة 54 +title: الخطوة 55 challengeType: 0 -dashedName: step-54 +dashedName: step-55 --- # --description-- -أضف عنصر `p` آخر مع النص `Total Carbohydrate 37g 13%`. مثل قبل، استخدم عناصر `span` لجعل النص `Total Carbohydrate` يكون bold، والنص `13%` محاذ إلى اليمين و bold. +أضف عنصر `p` آخر مع النص `Total Carbohydrate 37g 13%`. مثل قبل، استخدم عناصر `span` لجعل نص `Total Carbohydrate` ونص `13%` بهيئة bold. إضافة عنصر `span` إضافي لتغليف نص `Total Carbohydrate 37g` في العنصر span حتى يحاذ إلى اليسار، و `13%` إلى اليمين. # --hints-- -يجب عليك إنشاء عنصر `p` جديد في نهاية عنصر `.daily-value.sm-text` الخاص بك. +يجب عليك إنشاء عنصر `p` جديد في نهاية عنصرك `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` عنصر `p` الجديد الخاص بك يجب أن يحتوي على النص `Total Carbohydrate 37g 13%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Total Carbohydrate 37g[\s|\n]+13%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Total Carbohydrate[\s|\n]+37g[\s|\n]+13%/)); ``` -يجب أن يحتوي عنصر `p` الجديد على عنصران `span`. +يجب أن يحتوي عنصر `p` الجديد على ثلاث عناصر `span`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 2); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 3); ``` -يجب أن يحتوي عنصر `span` الاول على `class` بقيمة `bold`. +يجب أن يغلف عنصر `span` النص `Total Carbohydrate 37g`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.innerText?.match(/Total Carbohydrate[\s|\n]+37g/)); ``` -يجب أن يغلف العنصر `span` النص `Total Carbohydrate`. +يجب أن يغلف عنصر `span` النص `Total Carbohydrate`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.innerText === 'Total Carbohydrate'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.innerText === 'Total Carbohydrate'); ``` -يجب أن يحتوي عنصر `span` الثاني على سمة `class` بقيمة `bold right`. +يجب أن يحتوي عنصر `span` الذي لديه نص `Total Carbohydrate` على سمة `class` بقيمة `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.classList?.contains('bold')); +``` + +يجب أن يغلف عنصر `span` النص `13%`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === '13%'); +``` + +يجب أن يحتوي عنصر `span` الذي لديه نص `13%` على سمة `class` بقيمة `bold`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); ``` يجب أن يغلف عنصر `span` الثاني النص `13%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.innerText === '13%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === '13%'); ``` # --seed-- @@ -61,41 +72,46 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastEle ```html - - - Nutrition Label - - - - -
                                  -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  -
                                  -
                                  -

                                  Amount per serving

                                  -

                                  Calories 230

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

                                  % Daily Value *

                                  -
                                  -

                                  Total Fat 8g10%

                                  -

                                  Saturated Fat 1g 5%

                                  -
                                  -

                                  Trans Fat 0g

                                  -
                                  -

                                  Cholesterol 0mg 0%

                                  -

                                  Sodium 160mg 7%

                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  +
                                  +
                                  +
                                  +

                                  Amount per serving

                                  +

                                  Calories

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

                                  % Daily Value *

                                  +
                                  +

                                  Total Fat 8g 10%

                                  +

                                  Saturated Fat 1g 5%

                                  +
                                  +

                                  Trans Fat 0g

                                  +
                                  +

                                  Cholesterol 0mg 0%

                                  +

                                  Sodium 160mg 7%

                                  +
                                  + --fcc-editable-region-- +
                                  + ``` @@ -127,47 +143,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7fa959ab75948f96a0d6.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7fa959ab75948f96a0d6.md index a0272e4d24f..a83efa17c03 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7fa959ab75948f96a0d6.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7fa959ab75948f96a0d6.md @@ -1,8 +1,8 @@ --- id: 615f7fa959ab75948f96a0d6 -title: الخطوة 55 +title: الخطوة 56 challengeType: 0 -dashedName: step-55 +dashedName: step-56 --- # --description-- @@ -11,30 +11,30 @@ dashedName: step-55 # --hints-- -يجب عليك إنشاء عنصر `p` و `div` جديدان في نهاية عنصر `.daily-value.sm-text` الخاص بك. +يجب عليك إنشاء عنصر `p` و `div` جديدان في نهاية عنصرك `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` يجب أن يحتوي عنصر `p` الجديد على النص `Dietary Fiber 4g`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.innerText.match(/Dietary Fiber[\s|\n]+4g/)); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.innerText.match(/Dietary Fiber[\s|\n]+4g/)); ``` يجب أن يحتوي عنصر `p` الجديد على سمة `class` بقيمة `indent no-divider`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('indent')); -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('indent')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('no-divider')); ``` يجب أن يحتوي عنصر `div` الجديد على سمة `class` بقيمة `divider`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -44,42 +44,47 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                  -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  -
                                  -
                                  -

                                  Amount per serving

                                  -

                                  Calories 230

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

                                  % Daily Value *

                                  -
                                  -

                                  Total Fat 8g10%

                                  -

                                  Saturated Fat 1g 5%

                                  -
                                  -

                                  Trans Fat 0g

                                  -
                                  -

                                  Cholesterol 0mg 0%

                                  -

                                  Sodium 160mg 7%

                                  -

                                  Total Carbohydrate 37g 13%

                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  +
                                  +
                                  +
                                  +

                                  Amount per serving

                                  +

                                  Calories

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

                                  % Daily Value *

                                  +
                                  +

                                  Total Fat 8g 10%

                                  +

                                  Saturated Fat 1g 5%

                                  +
                                  +

                                  Trans Fat 0g

                                  +
                                  +

                                  Cholesterol 0mg 0%

                                  +

                                  Sodium 160mg 7%

                                  +

                                  Total Carbohydrate 37g 13%

                                  +
                                  + --fcc-editable-region-- +
                                  + ``` @@ -111,47 +116,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f808d85793195b0f53be9.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f808d85793195b0f53be9.md index 6bb5615eec0..a8a07b0e14d 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f808d85793195b0f53be9.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f808d85793195b0f53be9.md @@ -1,8 +1,8 @@ --- id: 615f808d85793195b0f53be9 -title: الخطوة 56 +title: الخطوة 57 challengeType: 0 -dashedName: step-56 +dashedName: step-57 --- # --description-- @@ -11,30 +11,30 @@ dashedName: step-56 # --hints-- -يجب عليك إنشاء عنصر `p` و `div` جديدان في نهاية عنصر `.daily-value.sm-text` الخاص بك. +يجب عليك إنشاء عنصر `p` و `div` جديدان في نهاية عنصرك `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` عنصر `p` الجديد الخاص بك يجب أن يحتوي على النص `Total Sugars 12g`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.innerText.match(/Total Sugars[\s|\n]+12g/)); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.innerText.match(/Total Sugars[\s|\n]+12g/)); ``` يجب أن يحتوي عنصر `p` الجديد على السمة `class` بقيمة `indent no-divider`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('indent')); -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('indent')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('no-divider')); ``` يجب أن يحتوي عنصر `div` الجديد على السمة `class` بقيمة `divider`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -44,44 +44,49 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                  -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  -
                                  -
                                  -

                                  Amount per serving

                                  -

                                  Calories 230

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

                                  % Daily Value *

                                  -
                                  -

                                  Total Fat 8g10%

                                  -

                                  Saturated Fat 1g 5%

                                  -
                                  -

                                  Trans Fat 0g

                                  -
                                  -

                                  Cholesterol 0mg 0%

                                  -

                                  Sodium 160mg 7%

                                  -

                                  Total Carbohydrate 37g 13%

                                  -

                                  Dietary Fiber 4g

                                  -
                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  +
                                  +
                                  +
                                  +

                                  Amount per serving

                                  +

                                  Calories

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

                                  % Daily Value *

                                  +
                                  +

                                  Total Fat 8g 10%

                                  +

                                  Saturated Fat 1g 5%

                                  +
                                  +

                                  Trans Fat 0g

                                  +
                                  +

                                  Cholesterol 0mg 0%

                                  +

                                  Sodium 160mg 7%

                                  +

                                  Total Carbohydrate 37g 13%

                                  +

                                  Dietary Fiber 4g

                                  +
                                  +
                                  + --fcc-editable-region-- +
                                  + ``` @@ -113,47 +118,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f829d07b18f96f6f6684b.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f829d07b18f96f6f6684b.md index d6dd770227a..a036ef9e242 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f829d07b18f96f6f6684b.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f829d07b18f96f6f6684b.md @@ -1,21 +1,21 @@ --- id: 615f829d07b18f96f6f6684b -title: الخطوة 57 +title: الخطوة 58 challengeType: 0 -dashedName: step-57 +dashedName: step-58 --- # --description-- -الميزة في إنشاء هذه الـ dividers هي أنه يمكنك تطبيق classes محددة لتصميمها بشكل فردي. أضف `dbl-indent` إلى الـ `class` الخاص بأخر `.divider`. +الميزة في إنشاء هذه الـ dividers هي أنه يمكنك تطبيق classes محددة لتصميمها بشكل فردي. أضف `double-indent` إلى الـ `class` الخاص بأخر `.divider`. # --hints-- -يجب أن يكون أخر عنصر `.divider` لديه `dbl-indent` مضاف إلى الـ `class`. لا تقم بإزالة القيمة الموجودة. +يجب أن يحتوي أخر عنصر `.divider` على `double-indent` مضاف إلى الـ `class`. لا تقم بإزالة القيمة الموجودة. ```js -const last = document.querySelector('.daily-value.sm-text')?.lastElementChild; -assert(last?.classList?.contains('dbl-indent')); +const last = document.querySelector('.daily-value.small-text')?.lastElementChild; +assert(last?.classList?.contains('double-indent')); assert(last?.classList?.contains('divider')); ``` @@ -26,46 +26,51 @@ assert(last?.classList?.contains('divider')); ```html - - - Nutrition Label - - - - -
                                  -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  -
                                  -
                                  -

                                  Amount per serving

                                  -

                                  Calories 230

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

                                  % Daily Value *

                                  -
                                  -

                                  Total Fat 8g10%

                                  -

                                  Saturated Fat 1g 5%

                                  -
                                  -

                                  Trans Fat 0g

                                  -
                                  -

                                  Cholesterol 0mg 0%

                                  -

                                  Sodium 160mg 7%

                                  -

                                  Total Carbohydrate 37g 13%

                                  -

                                  Dietary Fiber 4g

                                  -
                                  -

                                  Total Sugars 12g

                                  -
                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  +
                                  +
                                  +
                                  +

                                  Amount per serving

                                  +

                                  Calories

                                  + 230
                                  - +
                                  +
                                  +

                                  % Daily Value *

                                  +
                                  +

                                  Total Fat 8g 10%

                                  +

                                  Saturated Fat 1g 5%

                                  +
                                  +

                                  Trans Fat 0g

                                  +
                                  +

                                  Cholesterol 0mg 0%

                                  +

                                  Sodium 160mg 7%

                                  +

                                  Total Carbohydrate 37g 13%

                                  +

                                  Dietary Fiber 4g

                                  +
                                  +

                                  Total Sugars 12g

                                  + --fcc-editable-region-- +
                                  + --fcc-editable-region-- +
                                  +
                                  + ``` @@ -97,47 +102,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f83ef928ec9982b785b6a.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f83ef928ec9982b785b6a.md index 637782538ee..b7843fa97a2 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f83ef928ec9982b785b6a.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f83ef928ec9982b785b6a.md @@ -1,26 +1,26 @@ --- id: 615f83ef928ec9982b785b6a -title: الخطوة 58 +title: الخطوة 59 challengeType: 0 -dashedName: step-58 +dashedName: step-59 --- # --description-- -قم بإنشاء منتقي `.dbl-indent` وإعطائه left margin بقيمة `2em`. +أنشئ منتقي `.double-indent` وإعطائه left margin بقيمة `2em`. # --hints-- -يجب أن يكون لديك منتقي `.dbl-indent` جديد. +يجب أن يكون لديك منتقي `.double-indent` جديد. ```js -assert(new __helpers.CSSHelp(document).getStyle('.dbl-indent')); +assert(new __helpers.CSSHelp(document).getStyle('.double-indent')); ``` -يجب أن يكون لمنتقي `.dbl-indent` الخاص بك `margin-left` بقمية `2em`. +يجب أن يحتوي منتقيك `.double-indent` على `margin-left` بقيمة `2em`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.dbl-indent')?.marginLeft === '2em'); +assert(new __helpers.CSSHelp(document).getStyle('.double-indent')?.marginLeft === '2em'); ``` # --seed-- @@ -30,44 +30,49 @@ assert(new __helpers.CSSHelp(document).getStyle('.dbl-indent')?.marginLeft === ' ```html - - - Nutrition Label - - - - -
                                  -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  -
                                  -
                                  -

                                  Amount per serving

                                  -

                                  Calories 230

                                  -
                                  -
                                  -
                                  -

                                  % Daily Value *

                                  -
                                  -

                                  Total Fat 8g10%

                                  -

                                  Saturated Fat 1g 5%

                                  -
                                  -

                                  Trans Fat 0g

                                  -
                                  -

                                  Cholesterol 0mg 0%

                                  -

                                  Sodium 160mg 7%

                                  -

                                  Total Carbohydrate 37g 13%

                                  -

                                  Dietary Fiber 4g

                                  -
                                  -

                                  Total Sugars 12g

                                  -
                                  + + + + Nutrition Label + + + + + +
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  +
                                  +
                                  +
                                  +

                                  Amount per serving

                                  +

                                  Calories

                                  + 230
                                  - +
                                  +
                                  +

                                  % Daily Value *

                                  +
                                  +

                                  Total Fat 8g 10%

                                  +

                                  Saturated Fat 1g 5%

                                  +
                                  +

                                  Trans Fat 0g

                                  +
                                  +

                                  Cholesterol 0mg 0%

                                  +

                                  Sodium 160mg 7%

                                  +

                                  Total Carbohydrate 37g 13%

                                  +

                                  Dietary Fiber 4g

                                  +
                                  +

                                  Total Sugars 12g

                                  +
                                  +
                                  +
                                  + ``` @@ -99,56 +104,70 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } ---fcc-editable-region-- +--fcc-editable-region-- ---fcc-editable-region-- +--fcc-editable-region-- .daily-value p:not(.no-divider) { border-bottom: 1px solid #888989; diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f84f246e8ba98e3cd97be.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f84f246e8ba98e3cd97be.md index 609bc728e36..38232a5d542 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f84f246e8ba98e3cd97be.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f84f246e8ba98e3cd97be.md @@ -1,61 +1,60 @@ --- id: 615f84f246e8ba98e3cd97be -title: الخطوة 59 +title: الخطوة 60 challengeType: 0 -dashedName: step-59 +dashedName: step-60 --- # --description-- -تحت عنصر `.dbl-indent` الخاص بك، أضف عنصر `p` جديد مع النص `Includes 10g Added Sugars 20%`. يجب أيضا أن يكون العنصر `p` الجديد الخاص بك double indented، وليس له حدود سفلي (bottom border). استخدم `span` لمحاذاة الـ `20%` الي اليمين (right aligned) و جعلها bold. +تحت عنصرك `.double-indent`، أضف عنصر `p` جديد مع النص `Includes 10g Added Sugars 20%`. يجب أيضا أن يكون العنصر `p` الجديد الخاص بك double indented، وليس له حدود سفلي (bottom border). استخدم `span` لمحاذاة الـ `20%` الي اليمين (right aligned) و جعلها bold. ثم قم بإنشاء divider آخر بعد عنصر `p` هذا. # --hints-- -يجب عليك إنشاء عنصر `p` و `div` في نهاية عنصر `.daily-value.sm-text` الخاص بك. +يجب عليك إنشاء عنصر `p` و `div` جديدان في نهاية عنصرك `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` عنصر `p` الجديد الخاص بك يجب أن يحتوي على النص `Includes 10g Added Sugars 20%`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.innerText.match(/Includes 10g Added Sugars[\s|\n]+20%/)); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.innerText.match(/Includes 10g Added Sugars[\s|\n]+20%/)); ``` -يجب أن يحتوي عنصر `p` الجديد على سمة `class` بقيمة `dbl-indent no-divider`. +يجب أن يحتوي عنصر `p` الجديد على سمة `class` بقيمة `double-indent no-divider`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('dbl-indent')); -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('double-indent')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('no-divider')); ``` يجب أن يحتوي عنصر `p` الجديد على عنصر `span`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.firstElementChild?.localName === 'span'); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.firstElementChild?.localName === 'span'); ``` -يجب أن يحتوي عنصر `span` على سمة `class` بقيمة `bold right`. +يجب أن يحتوي عنصر `span` على سمة `class` بقيمة `bold`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.firstElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.firstElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.firstElementChild?.classList?.contains('bold')); ``` يجب أن يغلف عنصر `span` النص `20%`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type span')?.innerText === '20%'); +assert(document.querySelector('.daily-value.small-text p:last-of-type span')?.innerText === '20%'); ``` يجب أن يحتوي عنصر `div` الجديد على سمة `class` بقيمة `divider`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -65,46 +64,51 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                  -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  -
                                  -
                                  -

                                  Amount per serving

                                  -

                                  Calories 230

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

                                  % Daily Value *

                                  -
                                  -

                                  Total Fat 8g10%

                                  -

                                  Saturated Fat 1g 5%

                                  -
                                  -

                                  Trans Fat 0g

                                  -
                                  -

                                  Cholesterol 0mg 0%

                                  -

                                  Sodium 160mg 7%

                                  -

                                  Total Carbohydrate 37g 13%

                                  -

                                  Dietary Fiber 4g

                                  -
                                  -

                                  Total Sugars 12g

                                  -
                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  +
                                  +
                                  +
                                  +

                                  Amount per serving

                                  +

                                  Calories

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

                                  % Daily Value *

                                  +
                                  +

                                  Total Fat 8g 10%

                                  +

                                  Saturated Fat 1g 5%

                                  +
                                  +

                                  Trans Fat 0g

                                  +
                                  +

                                  Cholesterol 0mg 0%

                                  +

                                  Sodium 160mg 7%

                                  +

                                  Total Carbohydrate 37g 13%

                                  +

                                  Dietary Fiber 4g

                                  +
                                  +

                                  Total Sugars 12g

                                  +
                                  +
                                  + --fcc-editable-region-- +
                                  + ``` @@ -136,54 +140,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f887466db4ba14b5342cc.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f887466db4ba14b5342cc.md index 850a8380608..c5351c48726 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f887466db4ba14b5342cc.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f887466db4ba14b5342cc.md @@ -1,8 +1,8 @@ --- id: 615f887466db4ba14b5342cc -title: الخطوة 60 +title: الخطوة 61 challengeType: 0 -dashedName: step-60 +dashedName: step-61 --- # --description-- @@ -13,30 +13,30 @@ dashedName: step-60 # --hints-- -يجب عليك إنشاء عنصر `p` و `div` في نهاية عنصر `.daily-value.sm-text` الخاص بك. +يجب عليك إنشاء عنصر `p` و `div` جديدان في نهاية عنصرك `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` يجب أن يحتوي عنصر `p` الجديد على نص `Protein 3g`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.innerText.match(/Protein[\s|\n]+3g/)); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.innerText.match(/Protein[\s|\n]+3g/)); ``` يجب أن يحتوي عنصر `p` الجديد على سمة `class` بقيمة `no-divider`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('no-divider')); ``` -يجب أن يحتوي عنصر `div` الجديد على سمة `class` بقيمة `divider lg`. +يجب أن يحتوي عنصر `div` الجديد على سمة `class` بقيمة `divider large`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('lg')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('large')); ``` # --seed-- @@ -46,48 +46,53 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                  -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  -
                                  -
                                  -

                                  Amount per serving

                                  -

                                  Calories 230

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

                                  % Daily Value *

                                  -
                                  -

                                  Total Fat 8g10%

                                  -

                                  Saturated Fat 1g 5%

                                  -
                                  -

                                  Trans Fat 0g

                                  -
                                  -

                                  Cholesterol 0mg 0%

                                  -

                                  Sodium 160mg 7%

                                  -

                                  Total Carbohydrate 37g 13%

                                  -

                                  Dietary Fiber 4g

                                  -
                                  -

                                  Total Sugars 12g

                                  -
                                  -

                                  Includes 10g Added Sugars 20% -

                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  +
                                  +
                                  +
                                  +

                                  Amount per serving

                                  +

                                  Calories

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

                                  % Daily Value *

                                  +
                                  +

                                  Total Fat 8g 10%

                                  +

                                  Saturated Fat 1g 5%

                                  +
                                  +

                                  Trans Fat 0g

                                  +
                                  +

                                  Cholesterol 0mg 0%

                                  +

                                  Sodium 160mg 7%

                                  +

                                  Total Carbohydrate 37g 13%

                                  +

                                  Dietary Fiber 4g

                                  +
                                  +

                                  Total Sugars 12g

                                  +
                                  +

                                  Includes 10g Added Sugars 20% +

                                  +
                                  + --fcc-editable-region-- +
                                  + ``` @@ -119,54 +124,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f89e055040ba294719d2f.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f89e055040ba294719d2f.md index 80fdebe6af5..d5ffbfa6d21 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f89e055040ba294719d2f.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f89e055040ba294719d2f.md @@ -1,39 +1,40 @@ --- id: 615f89e055040ba294719d2f -title: الخطوة 61 +title: الخطوة 62 challengeType: 0 -dashedName: step-61 +dashedName: step-62 --- # --description-- -قم بإنشاء عنصر `p` آخر أسفل الـ divider الكبير الخاص بك. اعطي عنصر `p` النص `Vitamin D 2mcg 10%`. استخدم `span` لجعل `10%` محاذاة لليمين، ولكن لا تجعلها bold. +قم بإنشاء عنصر `p` آخر أسفل الـ divider الكبير الخاص بك. اعطي عنصر `p` النص `Vitamin D 2mcg 10%`. + +يحتوي عنصر `p` على نص فقط، يمكنك تغليف النسبة المئوية في عنصر `span` بحيث تعدّ كيانا منفصلا عن بقية النص، وتنتقل إلى اليمين. # --hints-- -يجب عليك إنشاء عنصر `p` جديد في نهاية عنصر `.daily-value.sm-text` الخاص بك. +يجب عليك إنشاء عنصر `p` جديد في نهاية عنصرك `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` -عنصر `p` الجديد الخاص بك يجب أن يحتوي على نص `Vitamin D 2mcg 10%`. +يجب أن يحتوي عنصرك `p` الجديد على نص `Vitamin D 2mcg 10%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Vitamin D 2mcg[\s|\n]+10%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Vitamin D 2mcg[\s|\n]+10%/)); ``` يجب أن يحتوي عنصر `p` الجديد على عنصر `span`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 1); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 1); ``` -يجب أن يحتوي عنصر `span` على `class` بقيمة `right`. تذكر أنه يجب عليك ألا تجعله bold. +يجب ألا يكون عُنصر `span` على هائه bold. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.classList?.contains('right')); -assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.classList?.contains('bold')); +assert(!document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span')?.classList?.contains('bold')); ``` # --seed-- @@ -43,50 +44,55 @@ assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.queryS ```html - - - Nutrition Label - - - - -
                                  -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  -
                                  -
                                  -

                                  Amount per serving

                                  -

                                  Calories 230

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

                                  % Daily Value *

                                  -
                                  -

                                  Total Fat 8g10%

                                  -

                                  Saturated Fat 1g 5%

                                  -
                                  -

                                  Trans Fat 0g

                                  -
                                  -

                                  Cholesterol 0mg 0%

                                  -

                                  Sodium 160mg 7%

                                  -

                                  Total Carbohydrate 37g 13%

                                  -

                                  Dietary Fiber 4g

                                  -
                                  -

                                  Total Sugars 12g

                                  -
                                  -

                                  Includes 10g Added Sugars 20% -

                                  -

                                  Protein 3g

                                  -
                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  +
                                  +
                                  +
                                  +

                                  Amount per serving

                                  +

                                  Calories

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

                                  % Daily Value *

                                  +
                                  +

                                  Total Fat 8g 10%

                                  +

                                  Saturated Fat 1g 5%

                                  +
                                  +

                                  Trans Fat 0g

                                  +
                                  +

                                  Cholesterol 0mg 0%

                                  +

                                  Sodium 160mg 7%

                                  +

                                  Total Carbohydrate 37g 13%

                                  +

                                  Dietary Fiber 4g

                                  +
                                  +

                                  Total Sugars 12g

                                  +
                                  +

                                  Includes 10g Added Sugars 20% +

                                  +

                                  Protein 3g

                                  +
                                  +
                                  + --fcc-editable-region-- +
                                  + ``` @@ -118,54 +124,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8bfe0f30a1a3c340356b.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8bfe0f30a1a3c340356b.md index d28c142d005..d824454e7eb 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8bfe0f30a1a3c340356b.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8bfe0f30a1a3c340356b.md @@ -1,8 +1,8 @@ --- id: 615f8bfe0f30a1a3c340356b -title: الخطوة 62 +title: الخطوة 63 challengeType: 0 -dashedName: step-62 +dashedName: step-63 --- # --description-- @@ -11,55 +11,53 @@ dashedName: step-62 # --hints-- -يجب عليك إنشاء عنصرين `p` جديدين في نهاية عنصر `.daily-value.sm-text` الخاص بك. +يجب عليك إنشاء عنصر `p` جديد في نهاية عنصرك `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); ``` يجب أن يحتوي العنصر `p` الجديد على النص `Calcium 260mg 20%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.innerText?.match(/Calcium 260mg[\s|\n]+20%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.innerText?.match(/Calcium 260mg[\s|\n]+20%/)); ``` يجب أن يحتوي عنصر `p` الجديد على عنصر `span`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.localName === 'span'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.localName === 'span'); ``` -يجب أن يحتوي عنصر `span` الجديد على سمة `class` بقيمة `right`. تذكر، لا تجعله bold. +يجب ألا يكون عُنصر `span` الأول على هيئة bold. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.classList?.contains('right')); -assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.classList?.contains('bold')); +assert(!document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.classList?.contains('bold')); ``` يجب أن يغلف عنصر `span` الاول النص `20%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.innerText === '20%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.innerText === '20%'); ``` عنصر `p` الجديد الثاني يجب أن يحتوي على النص `Iron 8mg 45%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Iron 8mg[\s|\n]+45%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Iron 8mg[\s|\n]+45%/)); ``` يجب أن يحتوي عنصر `p` الجديد الثاني على عنصر `span`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.localName === 'span'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.localName === 'span'); ``` -يجب أن يحتوي عنصر `span` الثاني على سمة `class` بقيمة `right`. تذكر، لا تجعله bold. +يجب ألا يكون عُنصر `span` الثاني على هيئة bold. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('right')); -assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(!document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); ``` # --seed-- @@ -69,51 +67,56 @@ assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstE ```html - - - Nutrition Label - - - - -
                                  -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  -
                                  -
                                  -

                                  Amount per serving

                                  -

                                  Calories 230

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

                                  % Daily Value *

                                  -
                                  -

                                  Total Fat 8g10%

                                  -

                                  Saturated Fat 1g 5%

                                  -
                                  -

                                  Trans Fat 0g

                                  -
                                  -

                                  Cholesterol 0mg 0%

                                  -

                                  Sodium 160mg 7%

                                  -

                                  Total Carbohydrate 37g 13%

                                  -

                                  Dietary Fiber 4g

                                  -
                                  -

                                  Total Sugars 12g

                                  -
                                  -

                                  Includes 10g Added Sugars 20% -

                                  -

                                  Protein 3g

                                  -
                                  -

                                  Vitamin D 2mcg 10%

                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  +
                                  +
                                  +
                                  +

                                  Amount per serving

                                  +

                                  Calories

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

                                  % Daily Value *

                                  +
                                  +

                                  Total Fat 8g 10%

                                  +

                                  Saturated Fat 1g 5%

                                  +
                                  +

                                  Trans Fat 0g

                                  +
                                  +

                                  Cholesterol 0mg 0%

                                  +

                                  Sodium 160mg 7%

                                  +

                                  Total Carbohydrate 37g 13%

                                  +

                                  Dietary Fiber 4g

                                  +
                                  +

                                  Total Sugars 12g

                                  +
                                  +

                                  Includes 10g Added Sugars 20% +

                                  +

                                  Protein 3g

                                  +
                                  +

                                  Vitamin D 2mcg 10%

                                  +
                                  + --fcc-editable-region-- +
                                  + ``` @@ -145,54 +148,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8f1223601fa546e93f31.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8f1223601fa546e93f31.md index fc225144410..0648add1d8f 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8f1223601fa546e93f31.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8f1223601fa546e93f31.md @@ -1,8 +1,8 @@ --- id: 615f8f1223601fa546e93f31 -title: الخطوة 63 +title: الخطوة 64 challengeType: 0 -dashedName: step-63 +dashedName: step-64 --- # --description-- @@ -11,35 +11,34 @@ dashedName: step-63 # --hints-- -يجب عليك إنشاء عنصر `p` جديد في نهاية عنصر `.daily-value.sm-text` الخاص بك. +يجب عليك إنشاء عنصر `p` جديد في نهاية عنصرك `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` يجب أن يحتوي عنصر `p` الجديد على سمة `class` بقيمة `no-divider`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('no-divider')); ``` يجب أن يحتوي عنصر `p` الجديد على نص `Potassium 235mg 6%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Potassium 235mg[\s|\n]+6%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Potassium 235mg[\s|\n]+6%/)); ``` يجب أن يحتوي عنصر `p` الجديد على عنصر `span`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 1); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 1); ``` -يجب أن يحتوي عنصر `span` على `class` بقيمة `right`. تذكر أنه يجب عليك ألا تجعله bold. +يجب ألا يكون عُنصر `span` على هائه bold. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.classList?.contains('right')); -assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.classList?.contains('bold')); +assert(!document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span')?.classList?.contains('bold')); ``` # --seed-- @@ -49,53 +48,58 @@ assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.queryS ```html - - - Nutrition Label - - - - -
                                  -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  -
                                  -
                                  -

                                  Amount per serving

                                  -

                                  Calories 230

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

                                  % Daily Value *

                                  -
                                  -

                                  Total Fat 8g10%

                                  -

                                  Saturated Fat 1g 5%

                                  -
                                  -

                                  Trans Fat 0g

                                  -
                                  -

                                  Cholesterol 0mg 0%

                                  -

                                  Sodium 160mg 7%

                                  -

                                  Total Carbohydrate 37g 13%

                                  -

                                  Dietary Fiber 4g

                                  -
                                  -

                                  Total Sugars 12g

                                  -
                                  -

                                  Includes 10g Added Sugars 20% -

                                  -

                                  Protein 3g

                                  -
                                  -

                                  Vitamin D 2mcg 10%

                                  -

                                  Calcium 260mg 20%

                                  -

                                  Iron 8mg 45%

                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  +
                                  +
                                  +
                                  +

                                  Amount per serving

                                  +

                                  Calories

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

                                  % Daily Value *

                                  +
                                  +

                                  Total Fat 8g 10%

                                  +

                                  Saturated Fat 1g 5%

                                  +
                                  +

                                  Trans Fat 0g

                                  +
                                  +

                                  Cholesterol 0mg 0%

                                  +

                                  Sodium 160mg 7%

                                  +

                                  Total Carbohydrate 37g 13%

                                  +

                                  Dietary Fiber 4g

                                  +
                                  +

                                  Total Sugars 12g

                                  +
                                  +

                                  Includes 10g Added Sugars 20% +

                                  +

                                  Protein 3g

                                  +
                                  +

                                  Vitamin D 2mcg 10%

                                  +

                                  Calcium 260mg 20%

                                  +

                                  Iron 8mg 45%

                                  +
                                  + --fcc-editable-region-- +
                                  + ``` @@ -127,54 +131,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f905fbd1017a65ca224eb.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f905fbd1017a65ca224eb.md index 9a5a511e920..674a88c0a65 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f905fbd1017a65ca224eb.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f905fbd1017a65ca224eb.md @@ -1,8 +1,8 @@ --- id: 615f905fbd1017a65ca224eb -title: الخطوة 64 +title: الخطوة 65 challengeType: 0 -dashedName: step-64 +dashedName: step-65 --- # --description-- @@ -23,11 +23,11 @@ dashedName: step-64 assert(document.querySelector('.daily-value').nextElementSibling?.localName === 'div'); ``` -يجب أن يحتوي عنصر `div` الجديد على سمة `class` بقيمة `divider md`. +يجب أن يحتوي عنصر `div` الجديد على سمة `class` بقيمة `divider medium`. ```js assert(document.querySelector('.daily-value')?.nextElementSibling?.classList?.contains('divider')); -assert(document.querySelector('.daily-value')?.nextElementSibling?.classList?.contains('md')); +assert(document.querySelector('.daily-value')?.nextElementSibling?.classList?.contains('medium')); ``` يجب عليك إنشاء عنصر `p` بعد عنصر `div` الجديد الخاص بك. @@ -55,55 +55,60 @@ assert.equal(document.querySelector('.label')?.lastElementChild?.innerText, '* T ```html - - - Nutrition Label - - - - -
                                  -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  -
                                  -
                                  -

                                  Amount per serving

                                  -

                                  Calories 230

                                  -
                                  -
                                  -
                                  -

                                  % Daily Value *

                                  -
                                  -

                                  Total Fat 8g10%

                                  -

                                  Saturated Fat 1g 5%

                                  -
                                  -

                                  Trans Fat 0g

                                  -
                                  -

                                  Cholesterol 0mg 0%

                                  -

                                  Sodium 160mg 7%

                                  -

                                  Total Carbohydrate 37g 13%

                                  -

                                  Dietary Fiber 4g

                                  -
                                  -

                                  Total Sugars 12g

                                  -
                                  -

                                  Includes 10g Added Sugars 20% -

                                  -

                                  Protein 3g

                                  -
                                  -

                                  Vitamin D 2mcg 10%

                                  -

                                  Calcium 260mg 20%

                                  -

                                  Iron 8mg 45%

                                  -

                                  Potassium 235mg 6%

                                  -
                                  ---fcc-editable-region-- ---fcc-editable-region-- + + + Nutrition Label + + + + + +
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  +
                                  +
                                  +
                                  +

                                  Amount per serving

                                  +

                                  Calories

                                  +
                                  + 230
                                  - +
                                  +
                                  +

                                  % Daily Value *

                                  +
                                  +

                                  Total Fat 8g 10%

                                  +

                                  Saturated Fat 1g 5%

                                  +
                                  +

                                  Trans Fat 0g

                                  +
                                  +

                                  Cholesterol 0mg 0%

                                  +

                                  Sodium 160mg 7%

                                  +

                                  Total Carbohydrate 37g 13%

                                  +

                                  Dietary Fiber 4g

                                  +
                                  +

                                  Total Sugars 12g

                                  +
                                  +

                                  Includes 10g Added Sugars 20% +

                                  +

                                  Protein 3g

                                  +
                                  +

                                  Vitamin D 2mcg 10%

                                  +

                                  Calcium 260mg 20%

                                  +

                                  Iron 8mg 45%

                                  +

                                  Potassium 235mg 6%

                                  +
                                  + --fcc-editable-region-- + + --fcc-editable-region-- +
                                  + ``` @@ -135,54 +140,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f94786869e1a7fec54375.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f94786869e1a7fec54375.md index 41a633cc053..7eda864babc 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f94786869e1a7fec54375.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f94786869e1a7fec54375.md @@ -1,8 +1,8 @@ --- id: 615f94786869e1a7fec54375 -title: الخطوة 65 +title: الخطوة 66 challengeType: 0 -dashedName: step-65 +dashedName: step-66 --- # --description-- @@ -36,54 +36,60 @@ assert(new __helpers.CSSHelp(document).getStyle('.note')?.margin === '5px 0px'); ```html - - - Nutrition Label - - - - -
                                  -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  -
                                  -
                                  -

                                  Amount per serving

                                  -

                                  Calories 230

                                  + + + + Nutrition Label + + + + + +
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  +
                                  +
                                  +
                                  +

                                  Amount per serving

                                  +

                                  Calories

                                  -
                                  -
                                  -

                                  % Daily Value *

                                  -
                                  -

                                  Total Fat 8g 10%

                                  -

                                  Saturated Fat 1g 5%

                                  -
                                  -

                                  Trans Fat 0g

                                  -
                                  -

                                  Cholesterol 0mg 0%

                                  -

                                  Sodium 160mg 7%

                                  -

                                  Total Carbohydrate 37g 13%

                                  -

                                  Dietary Fiber 4g

                                  -
                                  -

                                  Total Sugars 12g

                                  -
                                  -

                                  Includes 10g Added Sugars 20% -

                                  -

                                  Protein 3g

                                  -
                                  -

                                  Vitamin D 2mcg 10%

                                  -

                                  Calcium 260mg 20%

                                  -

                                  Iron 8mg 45%

                                  -

                                  Potassium 235mg 6%

                                  -
                                  -
                                  -

                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. 2,000 calories a day is used for general nutrition advice.

                                  + 230
                                  - +
                                  +
                                  +

                                  % Daily Value *

                                  +
                                  +

                                  Total Fat 8g 10%

                                  +

                                  Saturated Fat 1g 5%

                                  +
                                  +

                                  Trans Fat 0g

                                  +
                                  +

                                  Cholesterol 0mg 0%

                                  +

                                  Sodium 160mg 7%

                                  +

                                  Total Carbohydrate 37g 13%

                                  +

                                  Dietary Fiber 4g

                                  +
                                  +

                                  Total Sugars 12g

                                  +
                                  +

                                  Includes 10g Added Sugars 20% +

                                  +

                                  Protein 3g

                                  +
                                  +

                                  Vitamin D 2mcg 10%

                                  +

                                  Calcium 260mg 20%

                                  +

                                  Iron 8mg 45%

                                  +

                                  Potassium 235mg 6%

                                  +
                                  +
                                  +

                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily + diet. 2,000 calories a day is used for general nutrition advice.

                                  +
                                  + ``` @@ -115,54 +121,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f951dff9317a900ef683f.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f951dff9317a900ef683f.md index 85bafb6170b..d9376f96e75 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f951dff9317a900ef683f.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f951dff9317a900ef683f.md @@ -1,8 +1,8 @@ --- id: 615f951dff9317a900ef683f -title: الخطوة 66 +title: الخطوة 67 challengeType: 0 -dashedName: step-66 +dashedName: step-67 --- # --description-- @@ -35,54 +35,60 @@ assert(new __helpers.CSSHelp(document).getStyle('.note')?.textIndent === '-8px') ```html - - - Nutrition Label - - - - -
                                  -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  -
                                  -
                                  -

                                  Amount per serving

                                  -

                                  Calories 230

                                  + + + + Nutrition Label + + + + + +
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  +
                                  +
                                  +
                                  +

                                  Amount per serving

                                  +

                                  Calories

                                  -
                                  -
                                  -

                                  % Daily Value *

                                  -
                                  -

                                  Total Fat 8g 10%

                                  -

                                  Saturated Fat 1g 5%

                                  -
                                  -

                                  Trans Fat 0g

                                  -
                                  -

                                  Cholesterol 0mg 0%

                                  -

                                  Sodium 160mg 7%

                                  -

                                  Total Carbohydrate 37g 13%

                                  -

                                  Dietary Fiber 4g

                                  -
                                  -

                                  Total Sugars 12g

                                  -
                                  -

                                  Includes 10g Added Sugars 20% -

                                  -

                                  Protein 3g

                                  -
                                  -

                                  Vitamin D 2mcg 10%

                                  -

                                  Calcium 260mg 20%

                                  -

                                  Iron 8mg 45%

                                  -

                                  Potassium 235mg 6%

                                  -
                                  -
                                  -

                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. 2,000 calories a day is used for general nutrition advice.

                                  + 230
                                  - +
                                  +
                                  +

                                  % Daily Value *

                                  +
                                  +

                                  Total Fat 8g 10%

                                  +

                                  Saturated Fat 1g 5%

                                  +
                                  +

                                  Trans Fat 0g

                                  +
                                  +

                                  Cholesterol 0mg 0%

                                  +

                                  Sodium 160mg 7%

                                  +

                                  Total Carbohydrate 37g 13%

                                  +

                                  Dietary Fiber 4g

                                  +
                                  +

                                  Total Sugars 12g

                                  +
                                  +

                                  Includes 10g Added Sugars 20% +

                                  +

                                  Protein 3g

                                  +
                                  +

                                  Vitamin D 2mcg 10%

                                  +

                                  Calcium 260mg 20%

                                  +

                                  Iron 8mg 45%

                                  +

                                  Potassium 235mg 6%

                                  +
                                  +
                                  +

                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily + diet. 2,000 calories a day is used for general nutrition advice.

                                  +
                                  + ``` @@ -114,54 +120,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } @@ -182,54 +202,60 @@ p { ```html - - - Nutrition Label - - - - -
                                  -
                                  -

                                  Nutrition Facts

                                  -
                                  -

                                  8 servings per container

                                  -

                                  Serving size 2/3 cup (55g)

                                  -
                                  -
                                  -
                                  -

                                  Amount per serving

                                  -

                                  Calories 230

                                  + + + + Nutrition Label + + + + + +
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  +
                                  +
                                  +
                                  +

                                  Amount per serving

                                  +

                                  Calories

                                  -
                                  -
                                  -

                                  % Daily Value *

                                  -
                                  -

                                  Total Fat 8g 10%

                                  -

                                  Saturated Fat 1g 5%

                                  -
                                  -

                                  Trans Fat 0g

                                  -
                                  -

                                  Cholesterol 0mg 0%

                                  -

                                  Sodium 160mg 7%

                                  -

                                  Total Carbohydrate 37g 13%

                                  -

                                  Dietary Fiber 4g

                                  -
                                  -

                                  Total Sugars 12g

                                  -
                                  -

                                  Includes 10g Added Sugars 20% -

                                  -

                                  Protein 3g

                                  -
                                  -

                                  Vitamin D 2mcg 10%

                                  -

                                  Calcium 260mg 20%

                                  -

                                  Iron 8mg 45%

                                  -

                                  Potassium 235mg 6%

                                  -
                                  -
                                  -

                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. 2,000 calories a day is used for general nutrition advice.

                                  + 230
                                  - +
                                  +
                                  +

                                  % Daily Value *

                                  +
                                  +

                                  Total Fat 8g 10%

                                  +

                                  Saturated Fat 1g 5%

                                  +
                                  +

                                  Trans Fat 0g

                                  +
                                  +

                                  Cholesterol 0mg 0%

                                  +

                                  Sodium 160mg 7%

                                  +

                                  Total Carbohydrate 37g 13%

                                  +

                                  Dietary Fiber 4g

                                  +
                                  +

                                  Total Sugars 12g

                                  +
                                  +

                                  Includes 10g Added Sugars 20% +

                                  +

                                  Protein 3g

                                  +
                                  +

                                  Vitamin D 2mcg 10%

                                  +

                                  Calcium 260mg 20%

                                  +

                                  Iron 8mg 45%

                                  +

                                  Potassium 235mg 6%

                                  +
                                  +
                                  +

                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily + diet. 2,000 calories a day is used for general nutrition advice.

                                  +
                                  + ``` @@ -261,54 +287,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/635bde33c91c80540eae239b.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/635bde33c91c80540eae239b.md new file mode 100644 index 00000000000..f46fad9a73b --- /dev/null +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/635bde33c91c80540eae239b.md @@ -0,0 +1,153 @@ +--- +id: 635bde33c91c80540eae239b +title: الخطوة 41 +challengeType: 0 +dashedName: step-41 +--- + +# --description-- + +يجب أن ينحاز النص `* Daily Value %` إلى اليمين. أنشئ منتقي `.right` وأضف خاصية `justify-content`. + +# --hints-- + +يجب أن يكون لديك منتقي `.right` جديد. + +```js +const hasRight = new __helpers.CSSHelp(document).getStyle('.right'); +assert(hasRight); + +``` + +يجب أن يحتوي منتقيك `.right` على `justify-content` بقيمة `flex-end`. + +```js +const rightJustifyContent = new __helpers.CSSHelp(document).getStyle('.right')?.getPropertyValue('justify-content'); +assert(rightJustifyContent === 'flex-end'); + +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Nutrition Label + + + + + +
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  +
                                  +
                                  +
                                  +

                                  Amount per serving

                                  +

                                  Calories

                                  +
                                  + 230 +
                                  +
                                  +
                                  +

                                  % Daily Value *

                                  +
                                  +
                                  + + +``` + +```css +* { + box-sizing: border-box; +} + +html { + font-size: 16px; +} + +body { + font-family: 'Open Sans', sans-serif; +} + +.label { + border: 2px solid black; + width: 270px; + margin: 20px auto; + padding: 0 7px; +} + +header h1 { + text-align: center; + margin: -4px 0; + letter-spacing: 0.15px +} + +p { + margin: 0; + display: flex; + justify-content: space-between; +} + +.divider { + border-bottom: 1px solid #888989; + margin: 2px 0; +} + +.bold { + font-weight: 800; +} + +.large { + height: 10px; +} + +.large, .medium { + background-color: black; + border: 0; +} + +.medium { + height: 5px; +} + +.small-text { + font-size: 0.85rem; +} + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { + margin: -5px -2px; + font-size: 2em; + font-weight: 700; +} + +.calories-info span { + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +--fcc-editable-region-- + +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6395d33ab5d91bf317107c48.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6395d33ab5d91bf317107c48.md new file mode 100644 index 00000000000..f6b7b6335b9 --- /dev/null +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6395d33ab5d91bf317107c48.md @@ -0,0 +1,117 @@ +--- +id: 6395d33ab5d91bf317107c48 +title: الخطوة 32 +challengeType: 0 +dashedName: step-32 +--- + +# --description-- + +أنشئ منتقي `.calories-info h2` وإزال جميع الـ margins. + +# --hints-- + +أنشئ منتقي `.calories-info h2`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info h2')); +``` + +يجب أن يحتوي منتقيك `.calories-info h2` علي `margin` بقيمة `0`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info h2')?.margin === '0px'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Nutrition Label + + + + + +
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  +
                                  +
                                  +
                                  +

                                  Amount per serving

                                  +
                                  +
                                  +
                                  + + +``` + +```css +* { + box-sizing: border-box; +} + +html { + font-size: 16px; +} + +body { + font-family: 'Open Sans', sans-serif; +} + +.label { + border: 2px solid black; + width: 270px; + margin: 20px auto; + padding: 0 7px; +} + +header h1 { + text-align: center; + margin: -4px 0; + letter-spacing: 0.15px +} + +p { + margin: 0; + display: flex; + justify-content: space-between; +} + +.divider { + border-bottom: 1px solid #888989; + margin: 2px 0; +} + +.bold { + font-weight: 800; +} + +.large { + height: 10px; +} + +.large, .medium { + background-color: black; + border: 0; +} + +.small-text { + font-size: 0.85rem; +} + +--fcc-editable-region-- + +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6396e33fe478dd264ebbf278.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6396e33fe478dd264ebbf278.md new file mode 100644 index 00000000000..559fc034579 --- /dev/null +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6396e33fe478dd264ebbf278.md @@ -0,0 +1,135 @@ +--- +id: 6396e33fe478dd264ebbf278 +title: الخطوة 34 +challengeType: 0 +dashedName: step-34 +--- + +# --description-- + +أنشئ منتقي `.calories-info` جديد وإعطائه خاصية `display` بقيمة `flex`. أعطيه خاصية `justify-content` بقيمة `space-between` و`align-items` بقيمة `flex-end` أيضًا. + +# --hints-- + +يجب عليك إنشاء منتقي `.calories-info`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info')); +``` + +يجب أن يحتوي منتقي `.calories-info` على خاصية `display` بقيمة `flex`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info')?.display === 'flex'); +``` + +يجب أن يحتوي منتقيك `.calories-info` على `justify-content` بقيمة `space-between`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info')?.justifyContent === 'space-between'); +``` + +يجب أن يحتوي منتقي `.calories-info` على خاصية `align-items` بقيمة `flex-end`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info')?.alignItems === 'flex-end'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Nutrition Label + + + + + +
                                  +
                                  +

                                  Nutrition Facts

                                  +
                                  +

                                  8 servings per container

                                  +

                                  Serving size 2/3 cup (55g)

                                  +
                                  +
                                  +
                                  +
                                  +

                                  Amount per serving

                                  +

                                  Calories

                                  +
                                  + 230 +
                                  +
                                  + + +``` + +```css +* { + box-sizing: border-box; +} + +html { + font-size: 16px; +} + +body { + font-family: 'Open Sans', sans-serif; +} + +.label { + border: 2px solid black; + width: 270px; + margin: 20px auto; + padding: 0 7px; +} + +header h1 { + text-align: center; + margin: -4px 0; + letter-spacing: 0.15px +} + +p { + margin: 0; + display: flex; + justify-content: space-between; +} + +.divider { + border-bottom: 1px solid #888989; + margin: 2px 0; +} + +.bold { + font-weight: 800; +} + +.large { + height: 10px; +} + +.large, .medium { + background-color: black; + border: 0; +} + +.small-text { + font-size: 0.85rem; +} + +--fcc-editable-region-- + +--fcc-editable-region-- + +.calories-info h2 { + margin: 0; +} +``` diff --git a/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/build-a-caesars-cipher-project/caesars-cipher.md b/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/build-a-caesars-cipher-project/caesars-cipher.md index 46c493ad260..9994a599779 100644 --- a/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/build-a-caesars-cipher-project/caesars-cipher.md +++ b/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/build-a-caesars-cipher-project/caesars-cipher.md @@ -1,6 +1,6 @@ --- id: 56533eb9ac21ba0edf2244e2 -title: Build a Caesars Cipher +title: بناء شفرة قيصر challengeType: 5 forumTopicId: 16003 dashedName: build-a-caesars-cipher diff --git a/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/build-a-cash-register-project/cash-register.md b/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/build-a-cash-register-project/cash-register.md index 4653f6358b1..636ef9a1212 100644 --- a/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/build-a-cash-register-project/cash-register.md +++ b/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/build-a-cash-register-project/cash-register.md @@ -1,6 +1,6 @@ --- id: aa2e6f85cab2ab736c9a9b24 -title: Build A Cash Register +title: أنشئ مكنة لتسجيل النقود challengeType: 5 forumTopicId: 16012 dashedName: build-a-cash-register @@ -8,11 +8,11 @@ dashedName: build-a-cash-register # --description-- -Design a cash register drawer function `checkCashRegister()` that accepts purchase price as the first argument (`price`), payment as the second argument (`cash`), and cash-in-drawer (`cid`) as the third argument. +صمم وظيفة درج لتسجيل النقود `checkCashRegister()` التي تقبل سعر الشراء كمعطى أولى (`price`)، و الدفع كمعطى ثاني (`cash`)، و cash-in-drawer أي النقود في الدرج (`cid`) كمعطى ثالث. `cid` is a 2D array listing available currency. -The `checkCashRegister()` function should always return an object with a `status` key and a `change` key. +يجب أن تقوم وظيفة `checkCashRegister()` دائما بإنتاج كائن يحتوي على الهوية (key) المسمى `status` و الهوية `change`. Return `{status: "INSUFFICIENT_FUNDS", change: []}` if cash-in-drawer is less than the change due, or if you cannot return the exact change. @@ -40,7 +40,7 @@ See below for an example of a cash-in-drawer array: # --hints-- -`checkCashRegister(19.5, 20, [["PENNY", 1.01], ["NICKEL", 2.05], ["DIME", 3.1], ["QUARTER", 4.25], ["ONE", 90], ["FIVE", 55], ["TEN", 20], ["TWENTY", 60], ["ONE HUNDRED", 100]])` should return an object. +يجب أن ينتج `checkCashRegister(19.5, 20, [["PENNY", 1.01], ["NICKEL", 2.05], ["DIME", 3.1], ["QUARTER", 4.25], ["ONE", 90], ["FIVE", 55], ["TEN", 20], ["TWENTY", 60], ["ONE HUNDRED", 100]])` كائن. ```js assert.deepEqual( @@ -61,7 +61,7 @@ assert.deepEqual( ); ``` -`checkCashRegister(19.5, 20, [["PENNY", 1.01], ["NICKEL", 2.05], ["DIME", 3.1], ["QUARTER", 4.25], ["ONE", 90], ["FIVE", 55], ["TEN", 20], ["TWENTY", 60], ["ONE HUNDRED", 100]])` should return `{status: "OPEN", change: [["QUARTER", 0.5]]}`. +يجب أن ينتج `checkCashRegister(19.5, 20, [["PENNY", 1.01], ["NICKEL", 2.05], ["DIME", 3.1], ["QUARTER", 4.25], ["ONE", 90], ["FIVE", 55], ["TEN", 20], ["TWENTY", 60], ["ONE HUNDRED", 100]])` كائن `{status: "OPEN", change: [["QUARTER", 0.5]]}`. ```js assert.deepEqual( @@ -80,7 +80,7 @@ assert.deepEqual( ); ``` -`checkCashRegister(3.26, 100, [["PENNY", 1.01], ["NICKEL", 2.05], ["DIME", 3.1], ["QUARTER", 4.25], ["ONE", 90], ["FIVE", 55], ["TEN", 20], ["TWENTY", 60], ["ONE HUNDRED", 100]])` should return `{status: "OPEN", change: [["TWENTY", 60], ["TEN", 20], ["FIVE", 15], ["ONE", 1], ["QUARTER", 0.5], ["DIME", 0.2], ["PENNY", 0.04]]}`. +يجب أن ينتج `checkCashRegister(3.26, 100, [["PENNY", 1.01], ["NICKEL", 2.05], ["DIME", 3.1], ["QUARTER", 4.25], ["ONE", 90], ["FIVE", 55], ["TEN", 20], ["TWENTY", 60], ["ONE HUNDRED", 100]])` كائن `{status: "OPEN", change: [["TWENTY", 60], ["TEN", 20], ["FIVE", 15], ["ONE", 1], ["QUARTER", 0.5], ["DIME", 0.2], ["PENNY", 0.04]]}`. ```js assert.deepEqual( @@ -110,7 +110,7 @@ assert.deepEqual( ); ``` -`checkCashRegister(19.5, 20, [["PENNY", 0.01], ["NICKEL", 0], ["DIME", 0], ["QUARTER", 0], ["ONE", 0], ["FIVE", 0], ["TEN", 0], ["TWENTY", 0], ["ONE HUNDRED", 0]])` should return `{status: "INSUFFICIENT_FUNDS", change: []}`. +يجب أن ينتج `checkCashRegister(19.5, 20, [["PENNY", 0.01], ["NICKEL", 0], ["DIME", 0], ["QUARTER", 0], ["ONE", 0], ["FIVE", 0], ["TEN", 0], ["TWENTY", 0], ["ONE HUNDRED", 0]])` كائن `{status: "INSUFFICIENT_FUNDS", change: []}`. ```js assert.deepEqual( @@ -129,7 +129,7 @@ assert.deepEqual( ); ``` -`checkCashRegister(19.5, 20, [["PENNY", 0.01], ["NICKEL", 0], ["DIME", 0], ["QUARTER", 0], ["ONE", 1], ["FIVE", 0], ["TEN", 0], ["TWENTY", 0], ["ONE HUNDRED", 0]])` should return `{status: "INSUFFICIENT_FUNDS", change: []}`. +يجب أن ينتج `checkCashRegister(19.5, 20, [["PENNY", 0.01], ["NICKEL", 0], ["DIME", 0], ["QUARTER", 0], ["ONE", 1], ["FIVE", 0], ["TEN", 0], ["TWENTY", 0], ["ONE HUNDRED", 0]])` كائن `{status: "INSUFFICIENT_FUNDS", change: []}`. ```js assert.deepEqual( @@ -148,7 +148,7 @@ assert.deepEqual( ); ``` -`checkCashRegister(19.5, 20, [["PENNY", 0.5], ["NICKEL", 0], ["DIME", 0], ["QUARTER", 0], ["ONE", 0], ["FIVE", 0], ["TEN", 0], ["TWENTY", 0], ["ONE HUNDRED", 0]])` should return `{status: "CLOSED", change: [["PENNY", 0.5], ["NICKEL", 0], ["DIME", 0], ["QUARTER", 0], ["ONE", 0], ["FIVE", 0], ["TEN", 0], ["TWENTY", 0], ["ONE HUNDRED", 0]]}`. +يجب أن ينتج `checkCashRegister(19.5, 20, [["PENNY", 0.5], ["NICKEL", 0], ["DIME", 0], ["QUARTER", 0], ["ONE", 0], ["FIVE", 0], ["TEN", 0], ["TWENTY", 0], ["ONE HUNDRED", 0]])` كائن `{status: "CLOSED", change: [["PENNY", 0.5], ["NICKEL", 0], ["DIME", 0], ["QUARTER", 0], ["ONE", 0], ["FIVE", 0], ["TEN", 0], ["TWENTY", 0], ["ONE HUNDRED", 0]]}`. ```js assert.deepEqual( diff --git a/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/build-a-palindrome-checker-project/palindrome-checker.md b/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/build-a-palindrome-checker-project/palindrome-checker.md index 5f7ca896a8c..536578941f6 100644 --- a/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/build-a-palindrome-checker-project/palindrome-checker.md +++ b/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/build-a-palindrome-checker-project/palindrome-checker.md @@ -1,6 +1,6 @@ --- id: aaa48de84e1ecc7c742e1124 -title: Build A Palindrome Checker +title: أنشئ مدقق لمعاكس المقطع النصي challengeType: 5 forumTopicId: 16004 dashedName: build-a-palindrome-checker diff --git a/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/build-a-roman-numeral-converter-project/roman-numeral-converter.md b/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/build-a-roman-numeral-converter-project/roman-numeral-converter.md index 06f0c991879..a5d065b3da7 100644 --- a/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/build-a-roman-numeral-converter-project/roman-numeral-converter.md +++ b/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/build-a-roman-numeral-converter-project/roman-numeral-converter.md @@ -1,6 +1,6 @@ --- id: a7f4d8f2483413a6ce226cac -title: Build A Roman Numeral Converter +title: أنشئ محول للأرقام الرومانية challengeType: 5 forumTopicId: 16044 dashedName: build-a-roman-numeral-converter diff --git a/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/build-a-telephone-number-validator-project/telephone-number-validator.md b/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/build-a-telephone-number-validator-project/telephone-number-validator.md index 282f77b4be9..5e651f8faaa 100644 --- a/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/build-a-telephone-number-validator-project/telephone-number-validator.md +++ b/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/build-a-telephone-number-validator-project/telephone-number-validator.md @@ -1,6 +1,6 @@ --- id: aff0395860f5d3034dc0bfc9 -title: Build a Telephone Number Validator +title: بناء مدقق الأرقام الهواتف challengeType: 5 forumTopicId: 16090 dashedName: build-a-telephone-number-validator diff --git a/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c8bf3980c14c438d2aed.md b/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c8bf3980c14c438d2aed.md index 7bec654ec15..ae7f2b797d2 100644 --- a/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c8bf3980c14c438d2aed.md +++ b/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c8bf3980c14c438d2aed.md @@ -7,7 +7,7 @@ dashedName: step-39 # --description-- -For now, make your `goStore` function output the message `Going to store.` to the console. For example, here is a function that outputs the message "Hello World". +For now, make your `goStore` function output the message `Going to store.` to the console. For example, here is a function that outputs the message `Hello World`. ```js function functionName() { diff --git a/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b0b5053f16111b0b6b5f.md b/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b0b5053f16111b0b6b5f.md index c60cf5907da..8cbcb969f78 100644 --- a/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b0b5053f16111b0b6b5f.md +++ b/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b0b5053f16111b0b6b5f.md @@ -47,7 +47,7 @@ Your `update` function should set `button3.onclick` to `fightDragon`. assert.match(update.toString(), /button3\.onclick\s*=\s*fightDragon/); ``` -Your `update` function should set `text.innerText` to `You are in the town square. You see a sign that says "Store".`. +Your `update` function should set `text.innerText` to `You are in the town square. You see a sign that says \"Store\".`. ```js assert.match(update.toString(), /text\.innerText\s*=\s*"You are in the town square. You see a sign that says \\"Store\\"\."/); diff --git a/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md b/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md index a8bef26a706..294662a5750 100644 --- a/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md +++ b/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md @@ -7,7 +7,7 @@ dashedName: step-62 # --description-- -The `locations` array contains two locations: the town square and the store. Currently you are passing that entire array into the update functions. Pass in only the first element of the `locations` array by adding `[0]` at the end of the variable. For example: `myFunction(arg[0]);`. +The `locations` array contains two locations: the `town square` and the `store`. Currently you are passing that entire array into the `update` function. Pass in only the first element of the `locations` array by adding `[0]` at the end of the variable. For example: `myFunction(arg[0]);`. This is called bracket notation. Values in an array are accessed by index. Indices are numerical values and start at 0 - this is called zero-based indexing. `arg[0]` would be the first element in the `arg` array. diff --git a/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md b/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md index ca8a532ec15..1506701e4ab 100644 --- a/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md +++ b/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md @@ -7,7 +7,7 @@ dashedName: step-67 # --description-- -Finally, update the `text.innerText` assignment to equal the `text` from the location object. However, instead of using bracket notation, use dot notation. Here is an example of accessing the `name` property of an object called `obj`: `obj.name`. +Finally, update the `text.innerText` assignment to equal the `text` from the `location` object. However, instead of using bracket notation, use dot notation. Here is an example of accessing the `name` property of an object called `obj`: `obj.name`. # --hints-- diff --git a/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c89e4272512d44fc1c66.md b/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c89e4272512d44fc1c66.md index cded49b4395..dab6fabe2b3 100644 --- a/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c89e4272512d44fc1c66.md +++ b/curriculum/challenges/arabic/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c89e4272512d44fc1c66.md @@ -7,7 +7,7 @@ dashedName: step-83 # --description-- -Similar to your `buyHealth` function, set `gold` equal to 30 less than its current value. Make sure this is inside your `if` statement. +Similar to your `buyHealth` function, set `gold` equal to `30` less than its current value. Make sure this is inside your `if` statement. # --hints-- diff --git a/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/basic-javascript/subtract-one-number-from-another-with-javascript.md b/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/basic-javascript/subtract-one-number-from-another-with-javascript.md index bf077920297..8b767dfabbc 100644 --- a/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/basic-javascript/subtract-one-number-from-another-with-javascript.md +++ b/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/basic-javascript/subtract-one-number-from-another-with-javascript.md @@ -22,17 +22,17 @@ const myVar = 12 - 6; 現在,變量 `myVar` 的值爲 `6`。 # --instructions-- -改變數字`0`讓變量 difference 的值爲 `12`。 +改變數字 `0` 讓變量 difference 的值爲 `12`。 # --hints-- -變量 `difference` 的值應該爲 12。 +變量 `difference` 的值應該爲 `12`。 ```js assert(difference === 12); ``` -您只能從 45 中減去一個數字。 +你只能從 `45` 中減去一個數。 ```js assert(/difference=45-33;?/.test(__helpers.removeWhiteSpace(code))); diff --git a/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/back-end-development-and-apis-projects/exercise-tracker.md b/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/back-end-development-and-apis-projects/exercise-tracker.md index a2eb17b91b7..a65d04cdb71 100644 --- a/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/back-end-development-and-apis-projects/exercise-tracker.md +++ b/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/back-end-development-and-apis-projects/exercise-tracker.md @@ -20,7 +20,7 @@ dashedName: exercise-tracker - 接着,你將看到一個 `.replit` 窗口。 - 選擇 `Use run command` 並點擊 `Done` 按鈕. -當你完成後,請將一個確保正常運行的demo(項目演示)託管在可以公開訪問的平臺上。 然後將 URL 提交到 `Solution Link` 中。 此外,還可以將項目的源碼提交到 `GitHub Link` 中。 +當你完成後,請將一個確保正常運行的demo(項目演示)託管在可以公開訪問的平臺上。 然後將 demo 的 URL 提交到 Solution Link 字段中。 也可以將項目的源碼鏈接提交到 GitHub Link 字段中。 # --instructions-- @@ -411,7 +411,7 @@ async(getUserInput) => { ```js async(getUserInput) => { const url = getUserInput('url'); - const res = await fetch(url + '/api/users/', { + const res = await fetch(url + '/api/users', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', @@ -458,7 +458,7 @@ async(getUserInput) => { ```js async(getUserInput) => { const url = getUserInput('url'); - const res = await fetch(url + '/api/users/', { + const res = await fetch(url + '/api/users', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', @@ -505,7 +505,7 @@ async(getUserInput) => { ```js async(getUserInput) => { const url = getUserInput('url'); - const res = await fetch(url + '/api/users/', { + const res = await fetch(url + '/api/users', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', diff --git a/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/back-end-development-and-apis-projects/file-metadata-microservice.md b/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/back-end-development-and-apis-projects/file-metadata-microservice.md index 3df58ea32eb..a468cdf2e05 100644 --- a/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/back-end-development-and-apis-projects/file-metadata-microservice.md +++ b/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/back-end-development-and-apis-projects/file-metadata-microservice.md @@ -20,7 +20,7 @@ dashedName: file-metadata-microservice - 接着,你將看到一個 `.replit` 窗口。 - 選擇 `Use run command` 並點擊 `Done` 按鈕。 -當你完成後,請將一個確保正常運行的 demo(項目演示)託管在可以公開訪問的平臺上。 然後將 demo 的 URL 提交到 `Solution Link` 中。 此外,還可以將項目的源碼鏈接提交到 `GitHub Link` 中。 +當你完成後,請將一個確保正常運行的 demo(項目演示)託管在可以公開訪問的平臺上。 然後將 demo 的 URL 提交到 Solution Link 字段中。 也可以將項目的源碼鏈接提交到 GitHub Link 字段中。 # --instructions-- diff --git a/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/back-end-development-and-apis-projects/request-header-parser-microservice.md b/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/back-end-development-and-apis-projects/request-header-parser-microservice.md index fecb280b413..749c197fb56 100644 --- a/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/back-end-development-and-apis-projects/request-header-parser-microservice.md +++ b/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/back-end-development-and-apis-projects/request-header-parser-microservice.md @@ -20,7 +20,7 @@ dashedName: request-header-parser-microservice - 接着,你將看到一個 `.replit` 窗口。 - 選擇 `Use run command` 並點擊 `Done` 按鈕。 -當你完成後,請將一個確保正常運行的 demo(項目演示)託管在可以公開訪問的平臺上。 然後將 demo 的 URL 提交到 `Solution Link` 中。 此外,將項目的源碼鏈接提交到 `GitHub Link` 字段中。 +當你完成後,請將一個確保正常運行的 demo(項目演示)託管在可以公開訪問的平臺上。 然後將 demo 的 URL 提交到 Solution Link 字段中。 也可以將項目的源碼鏈接提交到 GitHub Link 字段中。 # --hints-- diff --git a/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md b/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md index e9fe3854660..0b422b5d442 100644 --- a/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md +++ b/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md @@ -20,7 +20,7 @@ dashedName: timestamp-microservice - 接着,你將看到一個 `.replit` 窗口。 - 選擇 `Use run command` 並點擊 `Done` 按鈕。 -當你完成後,請將一個確保正常運行的 demo(項目演示)託管在可以公開訪問的平臺上。 然後將 demo 的 URL 提交到 `Solution Link` 字段中。 此外,將項目的源碼鏈接提交到 `GitHub Link` 字段中。 +當你完成後,請將一個確保正常運行的 demo(項目演示)託管在可以公開訪問的平臺上。 然後將 demo 的 URL 提交到 Solution Link 字段中。 也可以將項目的源碼鏈接提交到 GitHub Link 字段中。 **注意:**時區轉換不是本項目的目的,因此假設所有發送的有效日期將使用 `new Date()` 解析爲 GMT 日期。 @@ -106,7 +106,7 @@ dashedName: timestamp-microservice ); ``` -如果輸入的日期字符串無效,api 將返回一個具有結構 `{ error : "Invalid Date" }` 的對象。 +如果輸入的日期字符串無效,API 將返回一個具有結構 `{ error : "Invalid Date" }` 的對象。 ```js (getUserInput) => diff --git a/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/back-end-development-and-apis-projects/url-shortener-microservice.md b/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/back-end-development-and-apis-projects/url-shortener-microservice.md index 606d5b25af7..5b3d5074571 100644 --- a/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/back-end-development-and-apis-projects/url-shortener-microservice.md +++ b/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/back-end-development-and-apis-projects/url-shortener-microservice.md @@ -20,7 +20,7 @@ dashedName: url-shortener-microservice - 接着,你將看到一個 `.replit` 窗口。 - 選擇 `Use run command` 並點擊 `Done` 按鈕。 -當你完成後,請將一個確保正常運行的 demo(項目演示)託管在可以公開訪問的平臺上。 然後將 demo 的 URL 提交到 `Solution Link` 字段中。 此外,將項目的源碼鏈接提交到 `GitHub Link` 字段中。 +當你完成後,請將一個確保正常運行的 demo(項目演示)託管在可以公開訪問的平臺上。 然後將 demo 的 URL 提交到 Solution Link 字段中。 也可以將項目的源碼鏈接提交到 GitHub Link 字段中。 # --instructions-- diff --git a/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/basic-node-and-express/meet-the-node-console.md b/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/basic-node-and-express/meet-the-node-console.md index e7f5cb98ca1..9d2922ff0eb 100644 --- a/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/basic-node-and-express/meet-the-node-console.md +++ b/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/basic-node-and-express/meet-the-node-console.md @@ -20,7 +20,7 @@ dashedName: meet-the-node-console - 接着,你將看到一個 `.replit` 窗口。 - 選擇 `Use run command` 並點擊 `Done` 按鈕。 -當你完成後,請將一個確保正常運行的 demo(項目演示)託管在可以公開訪問的平臺上。 然後將 demo 的 URL 提交到 `Solution Link` 字段中。 +當你完成後,請將一個確保正常運行的 demo(項目演示)託管在可以公開訪問的平臺上。 然後將 demo 的 URL 提交到 Solution Link 字段中。 在開發過程中,能夠隨時看到代碼的運行結果是非常重要的。 diff --git a/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/basic-node-and-express/serve-json-on-a-specific-route.md b/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/basic-node-and-express/serve-json-on-a-specific-route.md index f1f922903fe..6c88348c664 100644 --- a/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/basic-node-and-express/serve-json-on-a-specific-route.md +++ b/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/basic-node-and-express/serve-json-on-a-specific-route.md @@ -18,7 +18,7 @@ HTML 服務器提供 HTML 服務,而 API 提供數據服務。 REST # --hints-- -訪問端口 `/json` 應該返回一個 json 對象 `{"message": "Hello json"}` +The endpoint `/json` should serve the JSON object `{"message": "Hello json"}` ```js (getUserInput) => diff --git a/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/basic-node-and-express/use-the-.env-file.md b/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/basic-node-and-express/use-the-.env-file.md index 651166b0791..dd133ae2854 100644 --- a/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/basic-node-and-express/use-the-.env-file.md +++ b/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/basic-node-and-express/use-the-.env-file.md @@ -18,11 +18,11 @@ dashedName: use-the--env-file 在項目根目錄創建一個 `.env` 文件,並存儲變量 `MESSAGE_STYLE=uppercase`。 -然後,在你在上個挑戰中創建的 `/json` GET 路由處理程序中訪問 `process.env.MESSAGE_STYLE`,並且如果變量等於 `uppercase`,將響應對象的 `message` 轉換爲大寫。 響應對象應該是 `{"message": "Hello json"}` or `{"message": "HELLO JSON"}`,取決於 `MESSAGE_STYLE` 的值。 Note that you must read the value of `process.env.MESSAGE_STYLE` **inside** the route handler, not outside of it, due to the way our tests run. +然後,在你在上個挑戰中創建的 `/json` GET 路由處理程序中訪問 `process.env.MESSAGE_STYLE`,並且如果變量等於 `uppercase`,將響應對象的 `message` 轉換爲大寫。 響應對象應該是 `{"message": "Hello json"}` or `{"message": "HELLO JSON"}`,取決於 `MESSAGE_STYLE` 的值。 請注意,因爲我們的測試運行的方式,你必須閱讀路由處理器**裏面**(而不是外面)`process.env.MESSAGE_STYLE` 的值。 **注意:** 如果你正在使用 Replit,你無法創建一個 `.env` 文件。 相反,使用內置的 SECRETS 標籤添加變量。 -如果你在本地工作,你將需要 `dotenv` 包。 它將環境變量從你的 `.env` 文件加載到 `process.env` 中。 `dotenv` 包已經安裝,並且在你項目的 `package.json` 文件中。 At the top of your `myApp.js` file, add `require('dotenv').config()` to load the environment variables. +如果你在本地工作,你將需要 `dotenv` 包。 它將環境變量從你的 `.env` 文件加載到 `process.env` 中。 `dotenv` 包已經安裝,並且在你項目的 `package.json` 文件中。 在你的 `myApp.js` 文件的頂端,添加 `require('dotenv').config()` 以加載環境變量。 # --hints-- diff --git a/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/managing-packages-with-npm/how-to-use-package.json-the-core-of-any-node.js-project-or-npm-package.md b/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/managing-packages-with-npm/how-to-use-package.json-the-core-of-any-node.js-project-or-npm-package.md index eafc25a9b80..047550f1b83 100644 --- a/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/managing-packages-with-npm/how-to-use-package.json-the-core-of-any-node.js-project-or-npm-package.md +++ b/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/managing-packages-with-npm/how-to-use-package.json-the-core-of-any-node.js-project-or-npm-package.md @@ -20,7 +20,7 @@ dashedName: how-to-use-package-json-the-core-of-any-node-js-project-or-npm-packa - 接着,你將看到一個 `.replit` 窗口。 - 選擇 `Use run command` 並點擊 `Done` 按鈕。 -當你完成後,請將一個確保正常運行的 demo(項目演示)託管在可以公開訪問的平臺上。 然後將 demo 的 URL 提交到 `Solution Link` 字段中。 +當你完成後,請將一個確保正常運行的 demo(項目演示)託管在可以公開訪問的平臺上。 然後將 demo 的 URL 提交到 Solution Link 字段中。 `package.json` 文件是所有 Node.js 項目和 npm 包的樞紐, 和 HTML 文檔中的 <head> 部分用來描述網頁的配置信息(元數據)一樣,它存儲你的項目的相關信息。 它由單個 JSON 對象組成,並以鍵值對的形式存儲項目信息, 且至少包含兩個必填字段:“name” 和 “version”——但是最好提供有關項目的其他信息,這將對用戶或者維護者有所幫助。 diff --git a/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/mongodb-and-mongoose/install-and-set-up-mongoose.md b/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/mongodb-and-mongoose/install-and-set-up-mongoose.md index ce7b72c05c8..27fb292061c 100644 --- a/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/mongodb-and-mongoose/install-and-set-up-mongoose.md +++ b/curriculum/challenges/chinese-traditional/05-back-end-development-and-apis/mongodb-and-mongoose/install-and-set-up-mongoose.md @@ -20,7 +20,7 @@ dashedName: install-and-set-up-mongoose - 接着,你將看到一個 `.replit` 窗口。 - 選擇 `Use run command` 並點擊 `Done` 按鈕。 -當你完成後,請將一個確保正常運行的 demo(項目演示)託管在可以公開訪問的平臺上。 然後將 demo 的 URL 提交到 `Solution Link` 字段中。 +當你完成後,請將一個確保正常運行的 demo(項目演示)託管在可以公開訪問的平臺上。 然後將 demo 的 URL 提交到 Solution Link 字段中。 在這個挑戰中,你將建立一個 MongoDB Atlas 數據庫並導入連接到它所需的軟件包。 diff --git a/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md b/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md index 38f9d304ac3..4b76aab166c 100644 --- a/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md +++ b/curriculum/challenges/chinese-traditional/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md @@ -20,7 +20,7 @@ dashedName: set-up-a-template-engine - 接着,你將看到一個 `.replit` 窗口。 - 選擇 `Use run command` 並點擊 `Done` 按鈕。 -當你完成後,請將一個確保正常運行的 demo(項目演示)託管在可以公開訪問的平臺上。 然後將 demo 的 URL 提交到 `Solution Link` 字段中。 +當你完成後,請將一個確保正常運行的 demo(項目演示)託管在可以公開訪問的平臺上。 然後將 demo 的 URL 提交到 Solution Link 字段中。 模板引擎使你可以在應用程序中使用靜態模板文件(例如用 *Pug* 編寫的文件)。 在運行時,模版引擎會用服務端的真實數據替換掉模版文件中的變量。 然後將模版轉譯成發送給客戶端的 HTML 靜態文件。 這樣可以輕鬆地構造 HTML 頁面,允許在頁面直接顯示變量內容而不需要從客戶端發送 API 請求。 diff --git a/curriculum/challenges/chinese-traditional/06-quality-assurance/quality-assurance-and-testing-with-chai/learn-how-javascript-assertions-work.md b/curriculum/challenges/chinese-traditional/06-quality-assurance/quality-assurance-and-testing-with-chai/learn-how-javascript-assertions-work.md index 422dc986df7..ea566e96900 100644 --- a/curriculum/challenges/chinese-traditional/06-quality-assurance/quality-assurance-and-testing-with-chai/learn-how-javascript-assertions-work.md +++ b/curriculum/challenges/chinese-traditional/06-quality-assurance/quality-assurance-and-testing-with-chai/learn-how-javascript-assertions-work.md @@ -20,7 +20,7 @@ dashedName: learn-how-javascript-assertions-work - 接着,你將看到一個 `.replit` 窗口。 - 選擇 `Use run command` 並點擊 `Done` 按鈕。 -當你完成後,請將一個確保正常運行的 demo(項目演示)託管在可以公開訪問的平臺上。 然後將 demo 的 URL 提交到 `Solution Link` 字段中。 +當你完成後,請將一個確保正常運行的 demo(項目演示)託管在可以公開訪問的平臺上。 然後將 demo 的 URL 提交到 Solution Link 字段中。 # --instructions-- diff --git a/curriculum/challenges/chinese-traditional/06-quality-assurance/quality-assurance-projects/american-british-translator.md b/curriculum/challenges/chinese-traditional/06-quality-assurance/quality-assurance-projects/american-british-translator.md index 3350af23388..e12ecc8b78b 100644 --- a/curriculum/challenges/chinese-traditional/06-quality-assurance/quality-assurance-projects/american-british-translator.md +++ b/curriculum/challenges/chinese-traditional/06-quality-assurance/quality-assurance-projects/american-british-translator.md @@ -20,7 +20,7 @@ dashedName: american-british-translator - 接着,你將看到一個 `.replit` 窗口。 - 選擇 `Use run command` 並點擊 `Done` 按鈕。 -當你完成後,請將一個確保正常運行的 demo(項目演示)託管在可以公開訪問的平臺上。 然後將 demo 的 URL 提交到 `Solution Link` 字段中。 也可以將項目的源碼鏈接提交到 `GitHub Link` 字段中。 +當你完成後,請將一個確保正常運行的 demo(項目演示)託管在可以公開訪問的平臺上。 然後將 demo 的 URL 提交到 Solution Link 字段中。 也可以將項目的源碼鏈接提交到 GitHub Link 字段中。 # --instructions-- diff --git a/curriculum/challenges/chinese-traditional/06-quality-assurance/quality-assurance-projects/issue-tracker.md b/curriculum/challenges/chinese-traditional/06-quality-assurance/quality-assurance-projects/issue-tracker.md index 6c533b5f4bb..67bdbb4ddf2 100644 --- a/curriculum/challenges/chinese-traditional/06-quality-assurance/quality-assurance-projects/issue-tracker.md +++ b/curriculum/challenges/chinese-traditional/06-quality-assurance/quality-assurance-projects/issue-tracker.md @@ -20,7 +20,7 @@ dashedName: issue-tracker - 接着,你將看到一個 `.replit` 窗口。 - 選擇 `Use run command` 並點擊 `Done` 按鈕。 -當你完成後,請將一個確保正常運行的 demo(項目演示)託管在可以公開訪問的平臺上。 然後將 demo 的 URL 提交到 `Solution Link` 字段中。 也可以將項目的源碼鏈接提交到 `GitHub Link` 字段中。 +當你完成後,請將一個確保正常運行的 demo(項目演示)託管在可以公開訪問的平臺上。 然後將 demo 的 URL 提交到 Solution Link 字段中。 也可以將項目的源碼鏈接提交到 GitHub Link 字段中。 # --instructions-- diff --git a/curriculum/challenges/chinese-traditional/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md b/curriculum/challenges/chinese-traditional/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md index 36d165e75cc..46ce5712b83 100644 --- a/curriculum/challenges/chinese-traditional/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md +++ b/curriculum/challenges/chinese-traditional/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md @@ -20,7 +20,7 @@ dashedName: metric-imperial-converter - 接着,你將看到一個 `.replit` 窗口。 - 選擇 `Use run command` 並點擊 `Done` 按鈕。 -當你完成後,請將一個確保正常運行的 demo(項目演示)託管在可以公開訪問的平臺上。 然後將 demo 的 URL 提交到 `Solution Link` 字段中。 也可以將項目的源碼鏈接提交到 `GitHub Link` 字段中。 +當你完成後,請將一個確保正常運行的 demo(項目演示)託管在可以公開訪問的平臺上。 然後將 demo 的 URL 提交到 Solution Link 字段中。 也可以將項目的源碼鏈接提交到 GitHub Link 字段中。 # --instructions-- diff --git a/curriculum/challenges/chinese-traditional/06-quality-assurance/quality-assurance-projects/personal-library.md b/curriculum/challenges/chinese-traditional/06-quality-assurance/quality-assurance-projects/personal-library.md index 12e5df1a092..1afbb9ffd6f 100644 --- a/curriculum/challenges/chinese-traditional/06-quality-assurance/quality-assurance-projects/personal-library.md +++ b/curriculum/challenges/chinese-traditional/06-quality-assurance/quality-assurance-projects/personal-library.md @@ -20,7 +20,7 @@ dashedName: personal-library - 接着,你將看到一個 `.replit` 窗口。 - 選擇 `Use run command` 並點擊 `Done` 按鈕。 -當你完成後,請將一個確保正常運行的 demo(項目演示)託管在可以公開訪問的平臺上。 然後將 demo 的 URL 提交到 `Solution Link` 字段中。 也可以將項目的源碼鏈接提交到 `GitHub Link` 字段中。 +當你完成後,請將一個確保正常運行的 demo(項目演示)託管在可以公開訪問的平臺上。 然後將 demo 的 URL 提交到 Solution Link 字段中。 也可以將項目的源碼鏈接提交到 GitHub Link 字段中。 # --instructions-- diff --git a/curriculum/challenges/chinese-traditional/06-quality-assurance/quality-assurance-projects/sudoku-solver.md b/curriculum/challenges/chinese-traditional/06-quality-assurance/quality-assurance-projects/sudoku-solver.md index 89852b56693..625e99cf81b 100644 --- a/curriculum/challenges/chinese-traditional/06-quality-assurance/quality-assurance-projects/sudoku-solver.md +++ b/curriculum/challenges/chinese-traditional/06-quality-assurance/quality-assurance-projects/sudoku-solver.md @@ -20,7 +20,7 @@ dashedName: sudoku-solver - 接着,你將看到一個 `.replit` 窗口。 - 選擇 `Use run command` 並點擊 `Done` 按鈕。 -當你完成後,請將一個確保正常運行的 demo(項目演示)託管在可以公開訪問的平臺上。 然後將 demo 的 URL 提交到 `Solution Link` 字段中。 也可以將項目的源碼鏈接提交到 `GitHub Link` 字段中。 +當你完成後,請將一個確保正常運行的 demo(項目演示)託管在可以公開訪問的平臺上。 然後將 demo 的 URL 提交到 Solution Link 字段中。 也可以將項目的源碼鏈接提交到 GitHub Link 字段中。 # --instructions-- diff --git a/curriculum/challenges/chinese-traditional/09-information-security/information-security-projects/anonymous-message-board.md b/curriculum/challenges/chinese-traditional/09-information-security/information-security-projects/anonymous-message-board.md index 5a30860e6ec..2e8af239bfe 100644 --- a/curriculum/challenges/chinese-traditional/09-information-security/information-security-projects/anonymous-message-board.md +++ b/curriculum/challenges/chinese-traditional/09-information-security/information-security-projects/anonymous-message-board.md @@ -22,7 +22,7 @@ dashedName: anonymous-message-board - 接着,你將看到一個 `.replit` 窗口。 - 選擇 `Use run command` 並點擊 `Done` 按鈕。 -完成本項目後,請將一個正常運行的 demo(項目演示)託管在可以公開訪問的平臺。 然後將 URL 提交到 `Solution Link` 中。 此外,將項目的源碼鏈接提交到 `GitHub Link` 字段中。 +完成本項目後,請將一個正常運行的 demo(項目演示)託管在可以公開訪問的平臺。 然後將 demo 的 URL 提交到 Solution Link 字段中。 也可以將項目的源碼鏈接提交到 GitHub Link 字段中。 # --instructions-- diff --git a/curriculum/challenges/chinese-traditional/09-information-security/information-security-projects/secure-real-time-multiplayer-game.md b/curriculum/challenges/chinese-traditional/09-information-security/information-security-projects/secure-real-time-multiplayer-game.md index 33382f8416b..ec51dd90551 100644 --- a/curriculum/challenges/chinese-traditional/09-information-security/information-security-projects/secure-real-time-multiplayer-game.md +++ b/curriculum/challenges/chinese-traditional/09-information-security/information-security-projects/secure-real-time-multiplayer-game.md @@ -20,7 +20,7 @@ dashedName: secure-real-time-multiplayer-game - 接着,你將看到一個 `.replit` 窗口。 - 選擇 `Use run command` 並點擊 `Done` 按鈕。 -當你完成後,請將一個確保正常運行的 demo(項目演示)託管在可以公開訪問的平臺上。 然後將 demo 的 URL 提交到 `Solution Link` 字段中。 也可以將項目的源碼鏈接提交到 `GitHub Link` 字段中。 +當你完成後,請將一個確保正常運行的 demo(項目演示)託管在可以公開訪問的平臺上。 然後將 demo 的 URL 提交到 Solution Link 字段中。 也可以將項目的源碼鏈接提交到 GitHub Link 字段中。 # --instructions-- diff --git a/curriculum/challenges/chinese-traditional/09-information-security/information-security-projects/stock-price-checker.md b/curriculum/challenges/chinese-traditional/09-information-security/information-security-projects/stock-price-checker.md index bfe7cc07528..f77f7ec1b69 100644 --- a/curriculum/challenges/chinese-traditional/09-information-security/information-security-projects/stock-price-checker.md +++ b/curriculum/challenges/chinese-traditional/09-information-security/information-security-projects/stock-price-checker.md @@ -24,7 +24,7 @@ dashedName: stock-price-checker - 接着,你將看到一個 `.replit` 窗口。 - 選擇 `Use run command` 並點擊 `Done` 按鈕。 -當你完成後,請將一個確保正常運行的 demo(項目演示)託管在可以公開訪問的平臺上。 然後將 demo 的 URL 提交到 `Solution Link` 字段中。 也可以將項目的源碼鏈接提交到 `GitHub Link` 字段中。 +當你完成後,請將一個確保正常運行的 demo(項目演示)託管在可以公開訪問的平臺上。 然後將 demo 的 URL 提交到 Solution Link 字段中。 也可以將項目的源碼鏈接提交到 GitHub Link 字段中。 # --instructions-- diff --git a/curriculum/challenges/chinese-traditional/09-information-security/information-security-with-helmetjs/install-and-require-helmet.md b/curriculum/challenges/chinese-traditional/09-information-security/information-security-with-helmetjs/install-and-require-helmet.md index 68415879d0c..2bd980416a1 100644 --- a/curriculum/challenges/chinese-traditional/09-information-security/information-security-with-helmetjs/install-and-require-helmet.md +++ b/curriculum/challenges/chinese-traditional/09-information-security/information-security-with-helmetjs/install-and-require-helmet.md @@ -20,7 +20,7 @@ dashedName: install-and-require-helmet - 接着,你將看到一個 `.replit` 窗口。 - 選擇 `Use run command` 並點擊 `Done` 按鈕。 -當你完成後,請將一個確保正常運行的 demo(項目演示)託管在可以公開訪問的平臺上。 然後將 demo 的 URL 提交到 `Solution Link` 字段中。 +當你完成後,請將一個確保正常運行的 demo(項目演示)託管在可以公開訪問的平臺上。 然後將 demo 的 URL 提交到 Solution Link 字段中。 Helmet 通過設置各種 HTTP 頭來保護你的 Express 應用程序。 diff --git a/curriculum/challenges/chinese-traditional/10-coding-interview-prep/algorithms/implement-binary-search.md b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/algorithms/implement-binary-search.md index 6994926d584..87329b30326 100644 --- a/curriculum/challenges/chinese-traditional/10-coding-interview-prep/algorithms/implement-binary-search.md +++ b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/algorithms/implement-binary-search.md @@ -10,9 +10,10 @@ dashedName: implement-binary-search 二分搜索是一種 **O(log(n))** 效率的算法,用於在已排序的數組以查找元素。 它通過以下步驟運行: -1. 查找已排序數組的中間值 `value`。 如果 `value == target`,則返回(找到了!)。 +1. 查找已排序數組的中間值 `value`。 If `value == target` return `true` (The value has been found and the search is complete). 1. 如果中間值 `value < target`,則在下一次比較中搜索數組的右半部分。 1. 如果中間值 `value > target`,則在下一次比較中搜索數組的左半部分。 +1. If after searching the whole array the value is not present, return `false` (The array has been searched and the value is not in the array). 如你所見,你連續將數組減半,這爲你提供了 log(n) 效率。 對於這個挑戰,我們希望你展示你的工作——你是如何到達目標值的……你走過的路! @@ -20,7 +21,7 @@ dashedName: implement-binary-search 編寫一個函數 `binarySearch` 來實現對數組的二分查找算法,返回在數組中查找目標所採用的路徑(每個中間值比較)。 -該函數將一個排序的整數數組和一個目標值作爲輸入。 它返回一個數組,其中包含(按順序)你在原始數組的每個減半處找到的中間值,直到你找到目標值。 目標值應該是返回數組的最後一個元素。 如果未找到值,則返回字符串 `Value Not Found`。 +該函數將一個排序的整數數組和一個目標值作爲輸入。 它返回一個數組,其中包含(按順序)你在原始數組的每個減半處找到的中間值,直到你找到目標值。 目標值應該是返回數組的最後一個元素。 If the value is not found, return the string `Value Not Found`. 例如,`binarySearch([1,2,3,4,5,6,7], 5)` 將返回 `[4,6,5]`。 diff --git a/curriculum/challenges/chinese-traditional/10-coding-interview-prep/take-home-projects/build-a-nightlife-coordination-app.md b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/take-home-projects/build-a-nightlife-coordination-app.md index 39f5f66bc84..5716b200d11 100644 --- a/curriculum/challenges/chinese-traditional/10-coding-interview-prep/take-home-projects/build-a-nightlife-coordination-app.md +++ b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/take-home-projects/build-a-nightlife-coordination-app.md @@ -22,7 +22,7 @@ Here are the specific user stories you should implement for this project: **Hint:** Try using the Yelp API to find venues in the cities your users search for. 如果使用 Yelp 的 API,請務必在應用中提及。 -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --solutions-- diff --git a/curriculum/challenges/chinese-traditional/10-coding-interview-prep/take-home-projects/build-a-voting-app.md b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/take-home-projects/build-a-voting-app.md index c5e1f8c05dd..e70b3566764 100644 --- a/curriculum/challenges/chinese-traditional/10-coding-interview-prep/take-home-projects/build-a-voting-app.md +++ b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/take-home-projects/build-a-voting-app.md @@ -28,7 +28,7 @@ Here are the specific user stories you should implement for this project: **User Story:** As an authenticated user, if you don't like the options on a poll, you can create a new option. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --solutions-- diff --git a/curriculum/challenges/chinese-traditional/10-coding-interview-prep/take-home-projects/build-an-image-search-abstraction-layer.md b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/take-home-projects/build-an-image-search-abstraction-layer.md index 47cee2ababe..4c4540d7fce 100644 --- a/curriculum/challenges/chinese-traditional/10-coding-interview-prep/take-home-projects/build-an-image-search-abstraction-layer.md +++ b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/take-home-projects/build-an-image-search-abstraction-layer.md @@ -18,7 +18,7 @@ Here are the specific user stories you should implement for this project: **User Story:** You can get a list of the most recently submitted search strings. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --solutions-- diff --git a/curriculum/challenges/chinese-traditional/10-coding-interview-prep/take-home-projects/chart-the-stock-market.md b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/take-home-projects/chart-the-stock-market.md index a5562365284..c43de0dbaef 100644 --- a/curriculum/challenges/chinese-traditional/10-coding-interview-prep/take-home-projects/chart-the-stock-market.md +++ b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/take-home-projects/chart-the-stock-market.md @@ -20,7 +20,7 @@ Here are the specific user stories you should implement for this project: **User Story:** You can see changes in real-time when any other user adds or removes a stock. For this you will need to use Web Sockets. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --solutions-- diff --git a/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/elements-and-tags-question-a.md b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/elements-and-tags-question-a.md new file mode 100644 index 00000000000..f4b05b12871 --- /dev/null +++ b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/elements-and-tags-question-a.md @@ -0,0 +1,54 @@ +--- +id: 637f4e0e72c65bc8e73dfe1e +videoId: LGQuIIv2RVA +title: Elements and Tags Question A +challengeType: 15 +dashedName: elements-and-tags-question-a +--- + +# --description-- + +Almost all elements on an HTML page are just pieces of content wrapped in opening and closing HTML tags. + +Opening tags tell the browser this is the start of an HTML element. They are comprised of a keyword enclosed in angle brackets `<>`. For example, an opening paragraph tag looks like this: `

                                  `. + +Closing tags tell the browser where an element ends. They are almost the same as opening tags; the only difference is that they have a forward slash before the keyword. For example, a closing paragraph tag looks like this: `

                                  `. + +A full paragraph element looks like this: + +element diagram + +You can think of elements as containers for content. The opening and closing tags tell the browser what content the element contains. The browser can then use that information to determine how it should interpret and format the content. + +There are some HTML elements that do not have a closing tag. These elements often look like this: `
                                  ` or ``, but some can also be used without the closing forward slash such as `
                                  ` or ``. These are known as self-closing tags or empty elements because they don’t wrap any content. You will encounter a few of these in later lessons, but for the most part, elements will have both opening and closing tags. + +HTML has a vast list of predefined tags that you can use to create all kinds of different elements. It is important to use the correct tags for content. Using the correct tags can have a big impact on two aspects of your sites: how they are ranked in search engines; and how accessible they are to users who rely on assistive technologies, like screen readers, to use the internet. + +Using the correct elements for content is called semantic HTML. You will explore this in much more depth later on in the curriculum. + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s [Introduction to HTML video](https://www.youtube.com/watch?v=LGQuIIv2RVA&list=PL4-IK0AVhVjM0xE0K2uZRvsM7LkIhsPT-) + +## --text-- + +What are HTML tags? + +## --answers-- + +HTML tags tell the browser what content an element contains. + +--- + +HTML tags tell the browser when to load its content. + +--- + +HTML tags tell the browser what content the next element contains. + + +## --video-solution-- + +1 diff --git a/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/elements-and-tags-question-b.md b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/elements-and-tags-question-b.md new file mode 100644 index 00000000000..9e8720616fb --- /dev/null +++ b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/elements-and-tags-question-b.md @@ -0,0 +1,50 @@ +--- +id: 637f4e1672c65bc8e73dfe1f +videoId: LGQuIIv2RVA +title: Elements and Tags Question B +challengeType: 15 +dashedName: elements-and-tags-question-b +--- + +# --description-- + +Almost all elements on an HTML page are just pieces of content wrapped in opening and closing HTML tags. + +Opening tags tell the browser this is the start of an HTML element. They are comprised of a keyword enclosed in angle brackets <>. For example, an opening paragraph tag looks like this: `

                                  `. + +Closing tags tell the browser where an element ends. They are almost the same as opening tags; the only difference is that they have a forward slash before the keyword. For example, a closing paragraph tag looks like this: `

                                  `. + +A full paragraph element looks like this: + +element diagram + +You can think of elements as containers for content. The opening and closing tags tell the browser what content the element contains. The browser can then use that information to determine how it should interpret and format the content. + +There are some HTML elements that do not have a closing tag. These elements often look like this: `
                                  ` or ``, but some can also be used without the closing forward slash such as `
                                  ` or ``. These are known as self-closing tags or empty elements because they don’t wrap any content. You will encounter a few of these in later lessons, but for the most part, elements will have both opening and closing tags. + +HTML has a vast list of predefined tags that you can use to create all kinds of different elements. It is important to use the correct tags for content. Using the correct tags can have a big impact on two aspects of your sites: how they are ranked in search engines; and how accessible they are to users who rely on assistive technologies, like screen readers, to use the internet. + +Using the correct elements for content is called semantic HTML. You will explore this in much more depth later on in the curriculum. + +# --question-- + +## --text-- + +What are the three parts of most HTML elements? + +## --answers-- + +An opening tag, self closing tag, and content. + +--- + +An opening tag, closing tag, and content. + +--- + +An opening tag, closing tag, and attribute. + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/html-boilerplate-question-a.md b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/html-boilerplate-question-a.md new file mode 100644 index 00000000000..d563ebf0ac3 --- /dev/null +++ b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/html-boilerplate-question-a.md @@ -0,0 +1,55 @@ +--- +id: 637f4e1c72c65bc8e73dfe20 +videoId: V8UAEoOvqFg +title: HTML Boilerplate Question A +challengeType: 15 +dashedName: html-boilerplate-question-a +--- + +# --description-- + +To demonstrate an HTML boilerplate, you first need an HTML file to work with. + +Create a new folder on your computer and name it `html-boilerplate`. Within that folder create a new file and name it `index.html`. + +You’re probably already familiar with a lot of different types of files, for example doc, pdf, and image files. + +To let the computer know you want to create an HTML file, you need to append the filename with the `.html` extension as you have done when creating the `index.html` file. + +It is worth noting that you named your HTML file index. You should always name the HTML file that will contain the homepage of your websites `index.html`. This is because web servers will by default look for an index.html page when users land on your websites - and not having one will cause big problems. + +## The DOCTYPE + +Every HTML page starts with a doctype declaration. The doctype’s purpose is to tell the browser what version of HTML it should use to render the document. The latest version of HTML is HTML5, and the doctype for that version is simply ``. + +The doctypes for older versions of HTML were a bit more complicated. For example, this is the doctype declaration for HTML4: + +```html + +``` + +However, you probably won’t ever want to be using an older version of HTML, and so you’ll always use ``. + +Open the `index.html` file created earlier in your text editor and add `` to the very first line. + +# --question-- +## --text-- + +What is the purpose of the `DOCTYPE` declaration? + +## --answers-- + +It tells the browser which version of HTML to use to render the document. + +--- + +It tells the browser that this document uses JavaScript. + +--- + +It tells the browser the title of the document. + + +## --video-solution-- + +1 diff --git a/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/html-boilerplate-question-b.md b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/html-boilerplate-question-b.md new file mode 100644 index 00000000000..7a528432239 --- /dev/null +++ b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/html-boilerplate-question-b.md @@ -0,0 +1,47 @@ +--- +id: 637f4e2872c65bc8e73dfe21 +videoId: V8UAEoOvqFg +title: HTML Boilerplate Question B +challengeType: 15 +dashedName: html-boilerplate-question-b +--- + +# --description-- + +After you declare the doctype, you need to provide an `` element. This is what’s known as the root element of the document, meaning that every other element in the document will be a descendant of it. + +This becomes more important later on when you learn about manipulating HTML with JavaScript. For now, just know that the `html` element should be included on every HTML document. + +Back in the `index.html` file, let’s add the `` element by typing out its opening and closing tags, like so: + +```html + + + +``` + +## What is the lang attribute? +`lang` specifies the language of the text content in that element. This attribute is primarily used for improving accessibility of the webpage. It allows assistive technologies, for example screen readers, to adapt according to the language and invoke correct pronunciation. + +# --question-- + +## --text-- + +What is the `html` element? + +## --answers-- + +It is the root element in the document and tells the browser which version of HTML it should use. + +--- + +It is the root element in the document and all other elements should descend from it. + +--- + +It is the root element in the document and all other elements should come after it. + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/html-boilerplate-question-c.md b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/html-boilerplate-question-c.md new file mode 100644 index 00000000000..76ceb2841e5 --- /dev/null +++ b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/html-boilerplate-question-c.md @@ -0,0 +1,66 @@ +--- +id: 637f4e2f72c65bc8e73dfe22 +videoId: LGQuIIv2RVA +title: HTML Boilerplate Question C +challengeType: 15 +dashedName: html-boilerplate-question-c +--- + +# --description-- + +The `` element is where you put important meta-information about your webpages, and stuff required for your webpages to render correctly in the browser. Inside the ``, you should not use any element that displays content on the webpage. + +## The Charset Meta Element +You should always have the `meta` tag for the charset encoding of the webpage in the head element: ``. + +Setting the encoding is very important because it ensures that the webpage will display special symbols and characters from different languages correctly in the browser. + +## Title Element +Another element you should always include in the head of an HTML document is the `title` element: + +```html +My First Webpage +``` + +The `title` element is used to give webpages a human-readable title which is displayed in your webpage’s browser tab. + +If you didn’t include a `title` element, the webpage’s title would default to its file name. In your case that would be `index.html`, which isn’t very meaningful for users; this would make it very difficult to find your webpage if the user has many browser tabs open. + +There are many more elements that can go within the `head` of an HTML document. However, for now it’s only crucial to know about the two elements you have covered here. You will introduce more elements that go into the `head` throughout the rest of the curriculum. + +Back in `index.html` file, let’s add a `head` element with a `charset` `meta` element and a `title` within it. The head element goes within the HTML element and should always be the first element under the opening `` tag: + + +```html + + + + + + My First Webpage + + +``` + +# --question-- + +## --text-- + +What is the purpose of the `head` element? + +## --answers-- + +The `head` element is used to display all elements that are displayed on the webpage. + +--- + +The `head` element is used to display important information about your webpage and is used to render web pages correctly with `meta` elements. + +--- + +The `head` element is used to display the header content on top of the webpage. + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/html-boilerplate-question-d.md b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/html-boilerplate-question-d.md new file mode 100644 index 00000000000..302b6a95d44 --- /dev/null +++ b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/html-boilerplate-question-d.md @@ -0,0 +1,48 @@ +--- +id: 637f4e3672c65bc8e73dfe23 +videoId: V8UAEoOvqFg +title: HTML Boilerplate Question D +challengeType: 15 +dashedName: html-boilerplate-question-d +--- + +# --description-- + +The final element needed to complete the HTML boilerplate is the `` element. This is where all the content that will be displayed to users will go - the text, images, lists, links, and so on. + +To complete the boilerplate, add a `body` element to the `index.html` file. The `body` element also goes within the `html` element and is always below the `head` element, like so: + +# --question-- + +## --assignment-- + +Watch and follow along to Kevin Powell’s brilliant Building your first web page video above. + +--- + +Build some muscle memory by deleting the contents of the `index.html` file and trying to write out all the boilerplate again from memory. Don’t worry if you have to peek at the lesson content the first few times if you get stuck. Just keep going until you can do it a couple of times from memory. + +--- + +Run your boilerplate through this [HTML validator](https://www.freeformatter.com/html-validator.html). Validators ensure your markup is correct and are an excellent learning tool, as they provide feedback on syntax errors you may be making often and aren’t aware of, such as missing closing tags and extra spaces in your HTML. + +## --text-- + +What is the purpose of the `body` element? + +## --answers-- + +This is where all important information about the webpage is displayed such as the `title` and `meta` tags. + +--- + +This is where you tell the browser how to render the webpage correctly. + +--- + +This is where all content will be displayed on the page such images, text, and links. + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-a.md b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-a.md new file mode 100644 index 00000000000..aa20f137e89 --- /dev/null +++ b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-a.md @@ -0,0 +1,42 @@ +--- +id: 6374f208de18c50e48ba767b +videoId: LGQuIIv2RVA +title: Introduction To HTML and CSS Question A +challengeType: 15 +dashedName: introduction-to-html-and-css-question-a +--- + +# --description-- + +HTML and CSS are two languages that work together to create everything that you see when you look at something on the internet. HTML is the raw data that a webpage is built out of. All the text, links, cards, lists, and buttons are created in HTML. CSS is what adds style to those plain elements. HTML puts information on a webpage, and CSS positions that information, gives it color, changes the font, and makes it look great! + +Many helpful resources out there keep referring to HTML and CSS as programming languages, but if you want to get technical, labeling them as such is not quite accurate. This is because they are only concerned with presenting information. They are not used to program logic. JavaScript, which you will learn in the next section, is a programming language because it’s used to make webpages do things. Yet, there is quite a lot you can do with just HTML and CSS, and you will definitely need them both. Throughout our curriculum, the following lessons focus on giving you the tools you need to succeed once you reach JavaScript content. + +# --question-- + +## --assignment-- + +Read the HTML vs CSS vs JavaScript article. It is a quick overview of the relationships between HTML, CSS, and JavaScript. + +## --text-- + +Which of the following statements is true? + +## --answers-- + +CSS is used to create the basic structure of a webpage, and HTML is used to add style. + +--- + +HTML is used to create the basic structure of a webpage, and CSS is used to add style. + +--- + +HTML and CSS are used to add style to a webpage, and JavaScript is used to create the basic structure. + + +## --video-solution-- + +2 + + diff --git a/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-b.md b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-b.md new file mode 100644 index 00000000000..cd9cf900330 --- /dev/null +++ b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-b.md @@ -0,0 +1,37 @@ +--- +id: 6376327e2724a688c04636e3 +videoId: LGQuIIv2RVA +title: Introduction To HTML and CSS Question B +challengeType: 15 +dashedName: introduction-to-html-and-css-question-b +--- + +# --description-- + + +HTML and CSS are two languages that work together to create everything that you see when you look at something on the internet. HTML is the raw data that a webpage is built out of. All the text, links, cards, lists, and buttons are created in HTML. CSS is what adds style to those plain elements. HTML puts information on a webpage, and CSS positions that information, gives it color, changes the font, and makes it look great! + +Many helpful resources out there keep referring to HTML and CSS as programming languages, but if you want to get technical, labeling them as such is not quite accurate. This is because they are only concerned with presenting information. They are not used to program logic. JavaScript, which you will learn in the next section, is a programming language because it’s used to make webpages do things. Yet, there is quite a lot you can do with just HTML and CSS, and you will definitely need them both. Throughout our curriculum, the following lessons focus on giving you the tools you need to succeed once you reach JavaScript content. + +# --question-- + +## --text-- + +Between HTML and CSS, which should you use to add paragraphs of text on a webpage? + +## --answers-- + +CSS + +--- + +JavaScript + +--- + +HTML + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-c.md b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-c.md new file mode 100644 index 00000000000..eb759394680 --- /dev/null +++ b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-c.md @@ -0,0 +1,34 @@ +--- +id: 637633162724a688c04636e4 +videoId: LGQuIIv2RVA +title: Introduction To HTML and CSS Question C +challengeType: 15 +dashedName: introduction-to-html-and-css-question-c +--- + +# --description-- + +HTML and CSS are two languages that work together to create everything that you see when you look at something on the internet. HTML is the raw data that a webpage is built out of. All the text, links, cards, lists, and buttons are created in HTML. CSS is what adds style to those plain elements. HTML puts information on a webpage, and CSS positions that information, gives it color, changes the font, and makes it look great! + +Many helpful resources out there keep referring to HTML and CSS as programming languages, but if you want to get technical, labeling them as such is not quite accurate. This is because they are only concerned with presenting information. They are not used to program logic. JavaScript, which you will learn in the next section, is a programming language because it’s used to make webpages do things. Yet, there is quite a lot you can do with just HTML and CSS, and you will definitely need them both. Throughout our curriculum, the following lessons focus on giving you the tools you need to succeed once you reach JavaScript content. +# --question-- + +## --text-- + +Between HTML and CSS, which should you use to change the font and background color of a button? + +## --answers-- + +You should use CSS to change the background color and font of a button. + +--- + +You should use JavaScript to change the background color and font of a button. + +--- + +You should use HTML to change the background color and font of a button. + +## --video-solution-- + +1 diff --git a/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-d.md b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-d.md new file mode 100644 index 00000000000..9e9ee049b75 --- /dev/null +++ b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-d.md @@ -0,0 +1,35 @@ +--- +id: 637633672724a688c04636e5 +videoId: LGQuIIv2RVA +title: Introduction To HTML and CSS Question D +challengeType: 15 +dashedName: introduction-to-html-and-css-question-d +--- + +# --description-- + +HTML and CSS are two languages that work together to create everything that you see when you look at something on the internet. HTML is the raw data that a webpage is built out of. All the text, links, cards, lists, and buttons are created in HTML. CSS is what adds style to those plain elements. HTML puts information on a webpage, and CSS positions that information, gives it color, changes the font, and makes it look great! + +Many helpful resources out there keep referring to HTML and CSS as programming languages, but if you want to get technical, labeling them as such is not quite accurate. This is because they are only concerned with presenting information. They are not used to program logic. JavaScript, which you will learn in the next section, is a programming language because it’s used to make webpages do things. Yet, there is quite a lot you can do with just HTML and CSS, and you will definitely need them both. Throughout our curriculum, the following lessons focus on giving you the tools you need to succeed once you reach JavaScript content. + +# --question-- + +## --text-- + +What is the difference between HTML, CSS, and JavaScript? + +## --answers-- + +HTML is for creating interactive elements, CSS is for the look and feel, and JavaScript is for creating the structure of a webpage. + +--- + +CSS is for the look and feel, JavaScript is for creating interactive elements, and HTML is for creating the structure of a webpage. + +--- + +JavaScript is for the look and feel, CSS is for creating the structure, and HTML is for creating interactive elements of a webpage. + +## --video-solution-- + +2 diff --git a/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/links-and-images-question-a.md b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/links-and-images-question-a.md new file mode 100644 index 00000000000..b4d237448f3 --- /dev/null +++ b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/links-and-images-question-a.md @@ -0,0 +1,66 @@ +--- +id: 637f704072c65bc8e73dfe36 +videoId: tsEQgGjSmkM +title: Links and Images Question A +challengeType: 15 +dashedName: links-and-images-question-a +--- + +# --description-- + +To get some practice using links and images throughout this lesson you need an HTML project to work with. + +- Create a new directory named `odin-links-and-images`. + +- Within that directory, create a new file named `index.html`. + +- Fill in the usual HTML boilerplate. + +- Finally, add the following `h1` to the `body`: `

                                  Homepage

                                  ` + +## Anchor Elements +To create a link in HTML, you use the anchor element. An anchor element is defined by wrapping the text or another HTML element you want to be a link with an `` tag. Add the following to the `body` of the `index.html` page you created and open it in the browser: + +```html +click me +``` + +You may have noticed that clicking this link doesn’t do anything. This is because an anchor tag on its own won’t know where you want to link to. You have to tell it a destination to go to. You do this by using an HTML attribute. + +An HTML attribute gives additional information to an HTML element and always goes in the element’s opening tag. An attribute is usually made up of two parts: a name, and a value; however, not all attributes require a value. In your case, you need to add a `href` (hyperlink reference) attribute to the opening anchor tag. The value of the `href` attribute is the destination you want your link to go to. + +Add the following `href` attribute to the anchor element you created previously and try clicking it again, don’t forget to refresh the browser so the new changes can be applied. + +```html +click me +``` + +By default, any text wrapped with an anchor tag without a `href` attribute will look like plain text. If the `href` attribute is present, the browser will give the text a blue color and underline it to signify it is a link. + +It’s worth noting you can use anchor tags to link to any kind of resource on the internet, not just other HTML documents. You can link to videos, pdf files, images, and so on, but for the most part, you will be linking to other HTML documents. + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s HTML Links video above. + +## --text-- + +What HTML tag is used to create a link? + +## --answers-- + +`` + +--- + +`

                                  ` + +--- + +`

                                    ` + +## --video-solution-- + +1 diff --git a/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/links-and-images-question-b.md b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/links-and-images-question-b.md new file mode 100644 index 00000000000..164fb01214f --- /dev/null +++ b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/links-and-images-question-b.md @@ -0,0 +1,55 @@ +--- +id: 637f703572c65bc8e73dfe35 +videoId: tsEQgGjSmkM +title: Links and Images Question B +challengeType: 15 +dashedName: links-and-images-question-b +--- + +# --description-- + +To get some practice using links and images throughout this lesson you need an HTML project to work with. + +- Create a new directory named odin-links-and-images. + +- Within that directory, create a new file named index.html. + +- Fill in the usual HTML boilerplate. + +- finally, add the following h1 to the body: `

                                    Homepage

                                    ` + +## Anchor Elements +To create a link in HTML, you use the anchor element. An anchor element is defined by wrapping the text or another HTML element you want to be a link with an `
                                    ` tag. Add the following to the body of the index.html page you created and open it in the browser: + +```html +click me +``` + +You may have noticed that clicking this link doesn’t do anything. This is because an anchor tag on its own won’t know where you want to link to. You have to tell it a destination to go to. You do this by using an HTML attribute. An HTML attribute gives additional information to an HTML element and always goes in the element’s opening tag. An attribute is usually made up of two parts: a name, and a value; however, not all attributes require a value. In your case, you need to add a href (hyperlink reference) attribute to the opening anchor tag. The value of the href attribute is the destination you want your link to go to. Add the following href attribute to the anchor element you created previously and try clicking it again, don’t forget to refresh the browser so the new changes can be applied. + +```html +click me +``` + +By default, any text wrapped with an anchor tag without a `href` attribute will look like plain text. If the `href` attribute is present, the browser will give the text a blue color and underline it to signify it is a link. It’s worth noting you can use anchor tags to link to any kind of resource on the internet, not just other HTML documents. You can link to videos, pdf files, images, and so on, but for the most part, you will be linking to other HTML documents. + +# --question-- +## --text-- + +What is an attribute? +## --answers-- + +An HTML attribute gives additional information to an HTML element and always goes in the element’s closing tag. + +--- + +An HTML attribute is used to tell the browser what the element contains. + +--- + +An HTML attribute gives additional information to an HTML element and always goes in the element’s opening tag. + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/links-and-images-question-c.md b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/links-and-images-question-c.md new file mode 100644 index 00000000000..c8a3913d77e --- /dev/null +++ b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/links-and-images-question-c.md @@ -0,0 +1,56 @@ +--- +id: 637f703072c65bc8e73dfe34 +videoId: tsEQgGjSmkM +title: Links and Images Question C +challengeType: 15 +dashedName: links-and-images-question-c +--- + +# --description-- + +To get some practice using links and images throughout this lesson you need an HTML project to work with. + +- Create a new directory named odin-links-and-images. + +- Within that directory, create a new file named index.html. + +- Fill in the usual HTML boilerplate. + +- finally, add the following h1 to the body: `

                                    Homepage

                                    ` + +## Anchor Elements +To create a link in HTML, you use the anchor element. An anchor element is defined by wrapping the text or another HTML element you want to be a link with an `` tag. Add the following to the body of the index.html page you created and open it in the browser: + +```html +click me +``` + +You may have noticed that clicking this link doesn’t do anything. This is because an anchor tag on its own won’t know where you want to link to. You have to tell it a destination to go to. You do this by using an HTML attribute. An HTML attribute gives additional information to an HTML element and always goes in the element’s opening tag. An attribute is usually made up of two parts: a name, and a value; however, not all attributes require a value. In your case, you need to add a href (hyperlink reference) attribute to the opening anchor tag. The value of the href attribute is the destination you want your link to go to. Add the following href attribute to the anchor element you created previously and try clicking it again, don’t forget to refresh the browser so the new changes can be applied. + +```html +click me +``` + +By default, any text wrapped with an anchor tag without a `href` attribute will look like plain text. If the `href` attribute is present, the browser will give the text a blue color and underline it to signify it is a link. It’s worth noting you can use anchor tags to link to any kind of resource on the internet, not just other HTML documents. You can link to videos, pdf files, images, and so on, but for the most part, you will be linking to other HTML documents. + +# --question-- + +## --text-- + +What attribute tells links where to go to? + +## --answers-- + +`src` + +--- + +`href` + +--- + +`link` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/links-and-images-question-d.md b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/links-and-images-question-d.md new file mode 100644 index 00000000000..2b6a665eb87 --- /dev/null +++ b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/links-and-images-question-d.md @@ -0,0 +1,112 @@ +--- +id: 637f702872c65bc8e73dfe33 +videoId: ta3Oxx7Yqbo +title: Links and Images Question D +challengeType: 15 +dashedName: links-and-images-question-d +--- + +# --description-- + + +Generally, there are two kinds of links you will create: + +- Links to pages on other websites on the internet + +- Links to pages located on your own websites + + +## Absolute Links +Links to pages on other websites on the internet are called absolute links. A typical absolute link will be made up of the following parts: `protocol://domain/path`. An absolute link will always contain the protocol and domain of the destination. + +You’ve already seen an absolute link in action. The link you created to The Odin Project’s About page earlier was an absolute link as it contains the protocol and domain. + +`https://www.theodinproject.com/about` + +## Relative Links +Links to other pages within your own website are called relative links. Relative links do not include the domain name, since it is another page on the same site, it assumes the domain name will be the same as the page you created the link on. + +Relative links only include the file path to the other page, relative to the page you are creating the link on. This is quite abstract, let’s see this in action using an example. + +Within the `odin-links-and-images` directory, create another HTML file named `about.html` and paste the following code into it: + +```html + + + + + Odin Links and Images + + + +

                                    About Page

                                    + + +``` + +Back in the index page, add the following anchor element to create a link to the about page: + +```html + +

                                    Homepage

                                    + click me + + About + +``` + +Open the index file in a browser and click on the about link to make sure it is all wired together correctly. Clicking the link should go to the about page you just created. + +This works because the index and about page are in the same directory. That means you can simply use its name (`about.html`) as the link’s href value. + +But you will usually want to organize your website directories a little better. Normally you would only have the `index.html` at the root directory and all other HTML files in their own directory. + +Create a directory named `pages` within the `odin-links-and-images` directory and move the `about.html` file into this new directory. + +Refresh the index page in the browser and then click on the about link. It will now be broken. This is because the location of the about page file has changed. + +To fix this, you just need to update the about link `href` value to include the `pages/` directory since that is the new location of the about file relative to the index file. + +```html + +

                                    Homepage

                                    + About + +``` + +Refresh the index page in the browser and try clicking the about link again, it should now be back in working order. + +In many cases, this will work just fine; however, you can still run into unexpected issues with this approach. Prepending `./` before the link will in most cases prevent such issues. By adding `./` you are specifying to your code that it should start looking for the file/directory relative to the **current** directory. + +```html + +

                                    Homepage

                                    + About + +``` + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s HTML File Structure video above. + +## --text-- + +What is the difference between an absolute and a relative link? + +## --answers-- + +An absolute link is a link to another page on the current website. A relative link is a link to another website. + +--- + +An absolute link is a link to another website. A relative link is a link another page on the current website. + +--- + +There is no difference between absolute and relative links. + +## --video-solution-- + +2 diff --git a/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/links-and-images-question-e.md b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/links-and-images-question-e.md new file mode 100644 index 00000000000..a935ae3262a --- /dev/null +++ b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/links-and-images-question-e.md @@ -0,0 +1,98 @@ +--- +id: 637f702372c65bc8e73dfe32 +videoId: 0xoztJCHpbQ +title: Links and Images Question E +challengeType: 15 +dashedName: links-and-images-question-e +--- + +# --description-- + +Websites would be fairly boring if they could only display text. Luckily HTML provides a wide variety of elements for displaying all sorts of different media. The most widely used of these is the image element. + +To display an image in HTML you use the `` element. Unlike the other elements you have encountered, the `` element is self-closing. Empty, self-closing HTML elements do not need a closing tag. + +Instead of wrapping content with an opening and closing tag, it embeds an image into the page using a `src` attribute which tells the browser where the image file is located. The `src` attribute works much like the `href` attribute for anchor tags. It can embed an image using both absolute and relative paths. + +For example, using an absolute path you can display an image located on The Odin Project site: + + + +To use images that you have on your own websites, you can use a relative path. + +- Create a new directory named `images` within the `odin-links-and-images` project. + +- Next, download [this image](https://unsplash.com/photos/Mv9hjnEUHR4/download?force=true&w=640) and move it into the `images` directory you just created. + +- Rename the image to `dog.jpg`. + +Finally add the image to the `index.html` file: + +```html + +

                                    Homepage

                                    + click me + + About + + + +``` + +Save the `index.html` file and open it in a browser to view Charles in all his glory. + + +## Parent Directories + +What if you want to use the dog image in the about page? You would first have to go up one level out of the pages directory into its parent directory so you could then access the images directory. + +To go to the parent directory you need to use two dots in the relative filepath like this: `../.` Let’s see this in action, within the body of the `about.html` file, add the following image below the heading you added earlier: + +```html + +``` + +To break this down: + +- First, you are going to the parent directory of the pages directory which is `odin-links-and-images`. + +- Then, from the parent directory, you can go into the `images` directory. + +- Finally, you can access the `dog.jpg` file. + +Using the metaphor we used earlier, using `../` in a filepath is kind of like stepping out from the room you are currently in to the main hallway so you can go to another room. + +## `Alt` attribute + +Besides the `src` attribute, every image element should also have an `alt` (alternative text) attribute. + +The `alt` attribute is used to describe an image. It will be used in place of the image if it cannot be loaded. It is also used with screen readers to describe what the image is to visually impaired users. + +This is how the The Odin Project logo example you used earlier looks with an `alt` attribute included: + + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s HTML Images Video above. + +## --text-- + +Which tag is used to display an image? + +## --answers-- + +`` + +--- + +`` + +--- + +`` + +## --video-solution-- + +3 diff --git a/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/links-and-images-question-f.md b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/links-and-images-question-f.md new file mode 100644 index 00000000000..ba4eb809e5d --- /dev/null +++ b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/links-and-images-question-f.md @@ -0,0 +1,94 @@ +--- +id: 637f701c72c65bc8e73dfe31 +videoId: 0xoztJCHpbQ +title: Links and Images Question F +challengeType: 15 +dashedName: links-and-images-question-f +--- + +# --description-- + +Websites would be fairly boring if they could only display text. Luckily HTML provides a wide variety of elements for displaying all sorts of different media. The most widely used of these is the image element. + +To display an image in HTML you use the `` element. Unlike the other elements you have encountered, the `` element is self-closing. Empty, self-closing HTML elements do not need a closing tag. + +Instead of wrapping content with an opening and closing tag, it embeds an image into the page using a src attribute which tells the browser where the image file is located. The src attribute works much like the href attribute for anchor tags. It can embed an image using both absolute and relative paths. + +For example, using an absolute path you can display an image located on The Odin Project site: + + + +To use images that you have on your own websites, you can use a relative path. + +- Create a new directory named `images` within the `odin-links-and-images` project. + +- Next, download [this image](https://unsplash.com/photos/Mv9hjnEUHR4/download?force=true&w=640) and move it into the images directory you just created. + +- Rename the image to `dog.jpg`. + +Finally add the image to the `index.html` file: + +```html + +

                                    Homepage

                                    +
                                    click me + + About + + + +``` + +Save the `index.html` file and open it in a browser to view Charles in all his glory. + + +## Parent Directories + +What if you want to use the dog image in the about page? You would first have to go up one level out of the pages directory into its parent directory so you could then access the images directory. + +To go to the parent directory you need to use two dots in the relative filepath like this: `../.` Let’s see this in action, within the body of the `about.html` file, add the following image below the heading you added earlier: + +```html + +``` + +To break this down: + +- First, you are going to the parent directory of the pages directory which is `odin-links-and-images`. + +- Then, from the parent directory, you can go into the `images` directory. + +- Finally, you can access the `dog.jpg` file. + +Using the metaphor we used earlier, using `../` in a filepath is kind of like stepping out from the room you are currently in to the main hallway so you can go to another room. + +## Alt attribute + +Besides the src attribute, every image element should also have an alt (alternative text) attribute. + +The alt attribute is used to describe an image. It will be used in place of the image if it cannot be loaded. It is also used with screen readers to describe what the image is to visually impaired users. + +This is how the The Odin Project logo example you used earlier looks with an alt attribute included: + + +# --question-- + +## --text-- + +What two attributes do images always need to have? + +## --answers-- + +`href` and `alt` + +--- + +`name` and `href` + +--- + +`alt` and `src` + +## --video-solution-- + +3 diff --git a/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/links-and-images-question-g.md b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/links-and-images-question-g.md new file mode 100644 index 00000000000..d1a6fcd4406 --- /dev/null +++ b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/links-and-images-question-g.md @@ -0,0 +1,94 @@ +--- +id: 637f701572c65bc8e73dfe30 +videoId: 0xoztJCHpbQ +title: Links and Images Question G +challengeType: 15 +dashedName: links-and-images-question-g +--- + +# --description-- + +Websites would be fairly boring if they could only display text. Luckily HTML provides a wide variety of elements for displaying all sorts of different media. The most widely used of these is the image element. + +To display an image in HTML you use the `` element. Unlike the other elements you have encountered, the `` element is self-closing. Empty, self-closing HTML elements do not need a closing tag. + +Instead of wrapping content with an opening and closing tag, it embeds an image into the page using a src attribute which tells the browser where the image file is located. The src attribute works much like the href attribute for anchor tags. It can embed an image using both absolute and relative paths. + +For example, using an absolute path you can display an image located on The Odin Project site: + + + +To use images that you have on your own websites, you can use a relative path. + +- Create a new directory named `images` within the `odin-links-and-images` project. + +- Next, download [this image](https://unsplash.com/photos/Mv9hjnEUHR4/download?force=true&w=640) and move it into the images directory you just created. + +- Rename the image to `dog.jpg`. + +Finally add the image to the `index.html` file: + +```html + +

                                    Homepage

                                    + click me + + About + + + +``` + +Save the `index.html` file and open it in a browser to view Charles in all his glory. + + +## Parent Directories + +What if you want to use the dog image in the about page? You would first have to go up one level out of the pages directory into its parent directory so you could then access the images directory. + +To go to the parent directory you need to use two dots in the relative filepath like this: `../.` Let’s see this in action, within the body of the `about.html` file, add the following image below the heading you added earlier: + +```html + +``` + +To break this down: + +- First, you are going to the parent directory of the pages directory which is `odin-links-and-images`. + +- Then, from the parent directory, you can go into the `images` directory. + +- Finally, you can access the `dog.jpg` file. + +Using the metaphor we used earlier, using `../` in a filepath is kind of like stepping out from the room you are currently in to the main hallway so you can go to another room. + +## Alt attribute + +Besides the src attribute, every image element should also have an alt (alternative text) attribute. + +The alt attribute is used to describe an image. It will be used in place of the image if it cannot be loaded. It is also used with screen readers to describe what the image is to visually impaired users. + +This is how the The Odin Project logo example you used earlier looks with an alt attribute included: + + +# --question-- + +## --text-- + +How do you access a parent directory in a filepath? + +## --answers-- + +`../` + +--- + +`./` + +--- + +`.../` + +## --video-solution-- + +1 diff --git a/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/links-and-images-question-h.md b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/links-and-images-question-h.md new file mode 100644 index 00000000000..cfd73fcfbc1 --- /dev/null +++ b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/links-and-images-question-h.md @@ -0,0 +1,98 @@ +--- +id: 637f700b72c65bc8e73dfe2f +videoId: 0xoztJCHpbQ +title: Links and Images Question H +challengeType: 15 +dashedName: links-and-images-question-h +--- + +# --description-- + +Websites would be fairly boring if they could only display text. Luckily HTML provides a wide variety of elements for displaying all sorts of different media. The most widely used of these is the image element. + +To display an image in HTML you use the `` element. Unlike the other elements you have encountered, the `` element is self-closing. Empty, self-closing HTML elements do not need a closing tag. + +Instead of wrapping content with an opening and closing tag, it embeds an image into the page using a src attribute which tells the browser where the image file is located. The src attribute works much like the href attribute for anchor tags. It can embed an image using both absolute and relative paths. + +For example, using an absolute path you can display an image located on The Odin Project site: + + + +To use images that you have on your own websites, you can use a relative path. + +- Create a new directory named `images` within the `odin-links-and-images` project. + +- Next, download [this image](https://unsplash.com/photos/Mv9hjnEUHR4/download?force=true&w=640) and move it into the images directory you just created. + +- Rename the image to `dog.jpg`. + +Finally add the image to the `index.html` file: + +```html + +

                                    Homepage

                                    + click me + + About + + + +``` + +Save the `index.html` file and open it in a browser to view Charles in all his glory. + + +## Parent Directories + +What if you want to use the dog image in the about page? You would first have to go up one level out of the pages directory into its parent directory so you could then access the images directory. + +To go to the parent directory you need to use two dots in the relative filepath like this: `../.` Let’s see this in action, within the body of the `about.html` file, add the following image below the heading you added earlier: + +```html + +``` + +To break this down: + +- First, you are going to the parent directory of the pages directory which is `odin-links-and-images`. + +- Then, from the parent directory, you can go into the `images` directory. + +- Finally, you can access the `dog.jpg` file. + +Using the metaphor we used earlier, using `../` in a filepath is kind of like stepping out from the room you are currently in to the main hallway so you can go to another room. + +## Alt attribute + +Besides the src attribute, every image element should also have an alt (alternative text) attribute. + +The alt attribute is used to describe an image. It will be used in place of the image if it cannot be loaded. It is also used with screen readers to describe what the image is to visually impaired users. + +This is how the The Odin Project logo example you used earlier looks with an alt attribute included: + + +# --question-- + +## --assignment-- + +Read about the four main image formats that can be used on the web. + +## --text-- + +What are the four main image formats that you can use for images on the web? + +## --answers-- + +TIFF, GIF, PNG, and SVG. + +--- + +JPG, PNG, GIF, and SVG. + +--- + +JPG, PDF, SVG, and GIF. + +## --video-solution-- + +2 diff --git a/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/project-create-a-recipe-page.md b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/project-create-a-recipe-page.md new file mode 100644 index 00000000000..657a3f6e32d --- /dev/null +++ b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/project-create-a-recipe-page.md @@ -0,0 +1,204 @@ +--- +id: 6391d1a4f7ac71efd0621380 +title: Build a Recipe Page Project +challengeType: 14 +dashedName: project-create-a-recipe-page +--- + +# --description-- + +The website will consist of a main index page which will have links to a few recipes. The website won’t look very pretty by the time you’ve finished. + +**User Stories:** + +1. Your recipe page should contain a `DOCTYPE` tag. +1. Your recipe page should include an `html` element with a `head` and `body` element as children. +1. You should have a `title` element within the `head` element with the text `The Odin Recipes`. +1. You should see an `h1` element that has the text `Creamy Chocolate Fudge`. +1. You should see an image with the url `*placeholder-fcc-cdn*` with a fitting `alt` text. +1. There should be an `h2` element with the text `Description` under the image. +1. You should see a couple of paragraphs under `Description` that describe the recipe. +1. There should be an `h2` element with the text `Ingredients` +1. Under the `Ingredients` heading there should be an unordered list with the ingredients needed for the recipe. +1. Under the list of ingredients add another heading called `Steps`. +1. You should see an ordered list with a couple of steps needed to complete the recipe. +1. Under the steps there should be an `h2` element with the text `More Recipes` +1. You should see a couple of links to other recipes inside an unordered list which has a couple of list items with anchor elements within. +1. These anchor elements should have `href` attribute with the value set to `#` + +# --hints-- + +You should have a `DOCTYPE` tag. + +```js +assert(code.match(//gi)); +``` + +You should have a `html` element with `head` and `body` element. + +```js +const html = document.querySelectorAll('html')[0]; +const head = document.querySelectorAll('html > head')[0]; +const body = document.querySelectorAll('html > body')[0]; + +assert(html && head && body); +``` + +You should have a `title` element within the `head` element that contains the text `The Odin Recipes`. + +```js +assert(document.querySelectorAll('HEAD > TITLE')[0].innerText == 'The Odin Recipes'); +``` + +You should have a `h1` element within your `body` element that contains the text `Creamy Chocolate Fudge`. + +```js +assert(document.querySelectorAll('BODY > H1')[0].innerText == 'Creamy Chocolate Fudge'); +``` + +You should have an image with the url `*placeholder-fcc-cdn*` with an `alt` attribute that has a fitting text. + +```js +const img = document.querySelectorAll('IMG')[0]; + +assert(img && img.alt !='' && img.src === 'https://i.imgur.com/p0J5baJ.jpg') +``` + +You should have an `h2` element with the text `Description`. + +```js +const h2 = document.querySelectorAll('H2')[0]; + +assert(h2.innerText == 'Description'); +``` + +You should have at least two `p` elements describing the recipe. + +```js +const paragraphs = document.querySelectorAll('P'); + +assert(paragraphs.length > 1); +``` + +You should have an `h2` element with the text `Ingredients`. + +```js +const h2 = document.querySelectorAll('H2')[1]; + +assert(h2.innerText == 'Ingredients'); +``` + +You should have an unordered list `
                                      ` with some ingredients as the list items `
                                    • `. + +```js +const unorderedList = document.querySelectorAll('UL')[0]; +const listItems = document.querySelectorAll('UL > LI'); + +assert(unorderedList && listItems && listItems.length > 1); +``` + +You should have an `h2` element with the text `Steps`. + +```js +const h2 = document.querySelectorAll('H2')[2]; + +assert(h2.innerText == 'Steps'); +``` + +You should have a `
                                        ` with the the steps as the list items `
                                      1. `. + +```js +const orderedList = document.querySelectorAll('OL')[0]; +const listItems = document.querySelectorAll('OL > LI'); + +assert(orderedList && listItems && listItems.length > 1); +``` + +You should have an `h2` element with the text `More Recipes`. + +```js +const h2 = document.querySelectorAll('H2')[3]; + +assert(h2.innerText == 'More Recipes'); +``` + +You should have an unordered list `
                                          ` element with list items `
                                        • ` that contain `` tags which lead to other recipes. + +```js +const unorderedList = document.querySelectorAll('UL')[1]; +const listItems = unorderedList.querySelectorAll('LI'); + +const allAreListItems = unorderedList.children.length == listItems.length; + +const containsAnchors = [...listItems].every(function(listItem) { + return listItem.querySelector("a") !== null; +}); + +assert(unorderedList && allAreListItems && containsAnchors && listItems.length > 1); +``` + +Your anchor tags linking to the recipes should have a `href` attribute with the value set to `#` + +```js +const anchorTags = document.querySelectorAll("a"); + +const allAnchorsHaveHrefHash = [...anchorTags].every(function(anchorTag) { + return anchorTag.hasAttribute("href") && anchorTag.getAttribute("href") === "#"; +}); + +assert(allAnchorsHaveHrefHash && anchorTags.length > 0); +``` + +# --seed-- + +## --seed-contents-- + +```html + +``` + +```css + +``` + +## --solutions-- + +```html + + + + The Odin Recipes + + +

                                          Creamy Chocolate Fudge

                                          + A delicious chocolate fudge dessert +

                                          Description

                                          +

                                          This recipe is for a rich and creamy chocolate fudge that is sure to satisfy your sweet tooth. It's perfect for a special occasion or as a tasty treat for any time of the year.

                                          +

                                          This recipe is easy to follow and only requires a few simple ingredients. With just a few steps, you'll be able to create a delicious dessert that everyone will love.

                                          +

                                          Ingredients

                                          +
                                            +
                                          • 1 cup sugar
                                          • +
                                          • 1/2 cup unsalted butter
                                          • +
                                          • 1/4 cup milk
                                          • +
                                          • 1/4 cup cocoa powder
                                          • +
                                          • 1/4 cup chocolate chips
                                          • +
                                          • 1/4 tsp salt
                                          • +
                                          • 1 tsp vanilla extract
                                          • +
                                          +

                                          Steps

                                          +
                                            +
                                          1. In a medium saucepan, melt the butter over medium heat.
                                          2. +
                                          3. Add the sugar, milk, cocoa powder, and salt to the saucepan and stir until well combined.
                                          4. +
                                          5. Bring the mixture to a boil, stirring constantly, and then reduce the heat to low and simmer for 5 minutes.
                                          6. +
                                          7. Remove the saucepan from the heat and stir in the chocolate chips and vanilla extract until the chocolate is melted and the mixture is smooth.
                                          8. +
                                          9. Pour the fudge into a greased 8-inch square pan and let it cool completely before cutting into squares.
                                          10. +
                                          +

                                          More Recipes

                                          +
                                          + + +``` diff --git a/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-a.md b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-a.md new file mode 100644 index 00000000000..f4625eb7e31 --- /dev/null +++ b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-a.md @@ -0,0 +1,65 @@ +--- +id: 637f4e3e72c65bc8e73dfe24 +videoId: kcHKFZBVtf4 +title: Understand Ordered and Unordered List Question A +challengeType: 15 +dashedName: understand-ordered-and-unordered-list-question-a +--- + +# --description-- + +If you want to have a list of items where the order doesn’t matter, like a shopping list of items that can be bought in any order, then you can use an unordered list. + +Unordered lists are created using the `
                                            ` element, and each item within the list is created using the list item element `
                                          • `. + +Each list item in an unordered list begins with a bullet point: + + + +If you instead want to create a list of items where the order does matter, like step-by-step instructions for a recipe, or your top 10 favorite TV shows, then you can use an ordered list. + +Ordered lists are created using the `
                                              ` element. Each individual item in them is again created using the list item element `
                                            1. `. However, each list item in an ordered list begins with a number instead: + + + +# --question-- + +## --assignment-- + +Watch the first three minutes of Kevin Powell's video on Ordered and Unordered lists above. + +--- + +Make an unordered shopping list of your favorite foods. + +--- + +Make an ordered list of todo’s you need to get done today. + +--- + +Make an unordered list of places you’d like to visit someday. + +--- + +Make an ordered list of your all time top 5 favorite video games or movies. + +## --text-- + +What HTML tag is used to create an unordered list? + +## --answers-- + +`
                                            2. ` + +--- + +`
                                                ` + +--- + +`
                                                  ` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-b.md b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-b.md new file mode 100644 index 00000000000..4c6822fc504 --- /dev/null +++ b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-b.md @@ -0,0 +1,45 @@ +--- +id: 637f4e4672c65bc8e73dfe25 +videoId: LGQuIIv2RVA +title: Understand Ordered and Unordered List Question B +challengeType: 15 +dashedName: understand-ordered-and-unordered-list-question-b +--- + +# --description-- + +If you want to have a list of items where the order doesn’t matter, like a shopping list of items that can be bought in any order, then you can use an unordered list. + +Unordered lists are created using the `
                                                    ` element, and each item within the list is created using the list item element `
                                                  • `. + +Each list item in an unordered list begins with a bullet point: + + + +If you instead want to create a list of items where the order does matter, like step-by-step instructions for a recipe, or your top 10 favorite TV shows, then you can use an ordered list. + +Ordered lists are created using the `
                                                      ` element. Each individual item in them is again created using the list item element `
                                                    1. `. However, each list item in an ordered list begins with a number instead: + + + +# --question-- + +## --text-- + +What HTML tag is used to create an ordered list? + +## --answers-- + +`
                                                        ` + +--- + +`
                                                      1. ` + +--- + +`
                                                          ` + +## --video-solution-- + +1 diff --git a/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-c.md b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-c.md new file mode 100644 index 00000000000..c766990ca22 --- /dev/null +++ b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-c.md @@ -0,0 +1,45 @@ +--- +id: 637f4e5172c65bc8e73dfe26 +videoId: LGQuIIv2RVA +title: Understand Ordered and Unordered List Question C +challengeType: 15 +dashedName: understand-ordered-and-unordered-list-question-c +--- + +# --description-- + +If you want to have a list of items where the order doesn’t matter, like a shopping list of items that can be bought in any order, then you can use an unordered list. + +Unordered lists are created using the `
                                                            ` element, and each item within the list is created using the list item element `
                                                          • `. + +Each list item in an unordered list begins with a bullet point: + + + +If you instead want to create a list of items where the order does matter, like step-by-step instructions for a recipe, or your top 10 favorite TV shows, then you can use an ordered list. + +Ordered lists are created using the `
                                                              ` element. Each individual item in them is again created using the list item element `
                                                            1. `. However, each list item in an ordered list begins with a number instead: + + + +# --question-- + +## --text-- + +What HTML tag is used to create list items within both unordered and ordered lists? + +## --answers-- + +`
                                                                ` + +--- + +`
                                                              1. ` + +--- + +`
                                                                  ` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/working-with-text-question-a.md b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/working-with-text-question-a.md new file mode 100644 index 00000000000..8698b62aca8 --- /dev/null +++ b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/working-with-text-question-a.md @@ -0,0 +1,60 @@ +--- +id: 637f4e5872c65bc8e73dfe27 +videoId: yqcd-XkxZNM +title: Working With Text Question A +challengeType: 15 +dashedName: working-with-text-question-a +--- + +# --description-- + +What would you expect the following text to output on an HTML page? + +```html + + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor + incididunt ut labore et dolore magna aliqua. + + Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris + nisi ut aliquip ex ea commodo consequat. + +``` + +It looks like two paragraphs of text, and so you might expect it to display in that way. However that is not the case, as you can see in the output below: + + + +When the browser encounters new lines like this in your HTML, it will compress them down into one single space. The result of this compression is that all of the text is clumped together into one long line. + +If you want to create paragraphs in HTML, you need to use the paragraph element, which will add a newline after each of your paragraphs. A paragraph element is defined by wrapping text content with a `

                                                                  ` tag. + +Changing our example from before to use paragraph elements fixes the issue: + + + +# --question-- + +## --assignment-- + +Watch and follow along to Kevin Powell’s HTML Paragraph and Headings Video above. + +## --text-- + +How do you create a paragraph in HTML? + +## --answers-- + +`

                                                                  This is a paragraph

                                                                  ` + +--- + +`

                                                                  This is a paragraph

                                                                  ` + +--- + +`This is a paragraph` + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/working-with-text-question-b.md b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/working-with-text-question-b.md new file mode 100644 index 00000000000..a74d8d11452 --- /dev/null +++ b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/working-with-text-question-b.md @@ -0,0 +1,40 @@ +--- +id: 637f4e5f72c65bc8e73dfe28 +videoId: yqcd-XkxZNM +title: Working With Text Question B +challengeType: 15 +dashedName: working-with-text-question-b +--- + +# --description-- + +Headings are different from other HTML text elements: they are displayed larger and bolder than other text to signify that they are headings. + +There are 6 different levels of headings starting from `

                                                                  ` to `

                                                                  `. The number within a heading tag represents that heading’s level. The largest and most important heading is `h1`, while `h6` is the tiniest heading at the lowest level. + +Headings are defined much like paragraphs. For example, to create an `h1` heading, we wrap our heading text in a `

                                                                  ` tag. + + + +Using the correct level of heading is important as levels provide a hierarchy to the content. An `h1` heading should always be used for the heading of the overall page, and the lower level headings should be used as the headings for content in smaller sections of the page. + +# --question-- +## --text-- + +How many different levels of headings are there and what is the difference between them? + +## --answers-- + +There are 5 different levels of headings. `h5` is the smallest and least important heading, and `h1` is the largest and most important heading. + +--- + +There are 6 different levels of headings. `h6` is the largest and most important heading, and `h1` is the smallest and least important heading. + +--- + +There are 6 different levels of headings. `h1` is the largest and most important heading, and `h6` is the smallest and least important heading. + +## --video-solution-- + +3 diff --git a/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/working-with-text-question-c.md b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/working-with-text-question-c.md new file mode 100644 index 00000000000..6ccf0e06658 --- /dev/null +++ b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/working-with-text-question-c.md @@ -0,0 +1,47 @@ +--- +id: 637f4e6672c65bc8e73dfe29 +videoId: gW6cBZLUk6M +title: Working With Text Question C +challengeType: 15 +dashedName: working-with-text-question-c +--- + +# --description-- + +The `` element makes text bold. It also semantically marks text as important; this affects tools, like screen readers, that users with visual impairments will rely on to use your website. The tone of voice on some screen readers will change to communicate the importance of the text within a `strong` element. To define a `strong` element you wrap text content in a `` tag. + +You can use `strong` on its own: + + + +But you will probably find yourself using the `strong` element much more in combination with other text elements, like this: + + + +Sometimes you will want to make text bold without giving it an important meaning. You’ll learn how to do that in the CSS lessons later in the curriculum. + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s HTML Bold and Italic Text Video above. + +## --text-- + +What element should you use to make text bold and important? + +## --answers-- + +`This is an important message` + +--- + +`

                                                                  This is an important message

                                                                  ` + +--- + +`This is an important message` + +## --video-solution-- + +3 diff --git a/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/working-with-text-question-d.md b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/working-with-text-question-d.md new file mode 100644 index 00000000000..d6647f9a7ea --- /dev/null +++ b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/working-with-text-question-d.md @@ -0,0 +1,39 @@ +--- +id: 637f4e6e72c65bc8e73dfe2a +videoId: gW6cBZLUk6M +title: Working With Text Question D +challengeType: 15 +dashedName: working-with-text-question-d +--- + +# --description-- + +The `em` element makes text italic. It also semantically places emphasis on the text, which again may affect things like screen readers. To define an emphasized element you wrap text content in a `` tag. + +To use `em` on its own: + + +Again, like the `strong` element, you will find yourself mostly using the `em` element with other text elements: + + + +# --question-- +## --text-- + +What element should you use to make text italicized to add emphasis? + +## --answers-- + +`This is an italic message` + +--- + +`This is an italic message` + +--- + +`This is an italic message` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/working-with-text-question-e.md b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/working-with-text-question-e.md new file mode 100644 index 00000000000..d022a6331e9 --- /dev/null +++ b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/working-with-text-question-e.md @@ -0,0 +1,66 @@ +--- +id: 637f4e7972c65bc8e73dfe2b +videoId: gW6cBZLUk6M +title: Working With Text Question E +challengeType: 15 +dashedName: working-with-text-question-e +--- + +# --description-- + +You may have noticed that in all the examples in this lesson you indent any elements that are within other elements. This is known as nesting elements. + +When you nest elements within other elements, you create a parent and child relationship between them. The nested elements are the children and the element they are nested within is the parent. + +In the following example, the `body` element is the parent and the `p` is the child: + +```html + + + + +

                                                                  Lorem ipsum dolor sit amet.

                                                                  + + +``` + +Just as in human relationships, HTML parent elements can have many children. Elements at the same level of nesting are considered to be siblings. + +For example, the two `p` elements in the following code are siblings, since they are both children of the `body` tag and are at the same level of nesting as each other: + +```html + + + + +

                                                                  Lorem ipsum dolor sit amet.

                                                                  +

                                                                  Ut enim ad minim veniam.

                                                                  + + +``` + +You use indentation to make the level of nesting clear and readable for yourselves and other developers who will work with your HTML in the future. It is recommended to indent any child elements by two spaces. + +The parent, child, and sibling relationships between elements will become much more important later when you start styling your HTML with CSS and adding behavior with JavaScript. For now, however, it is just important to know the distinction between how elements are related and the terminology used to describe their relationships. + +# --question-- + +## --text-- + +What relationship do two elements have if they are at the same level of nesting? + +## --answers-- + +The elements are each other's parents. + +--- + +The elements are each other's children. + +--- + +The elements are siblings. + +## --video-solution-- + +3 diff --git a/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/working-with-text-question-f.md b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/working-with-text-question-f.md new file mode 100644 index 00000000000..2ace3f4e36d --- /dev/null +++ b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/working-with-text-question-f.md @@ -0,0 +1,67 @@ +--- +id: 637f4e8072c65bc8e73dfe2c +videoId: gW6cBZLUk6M +title: Working With Text Question F +challengeType: 15 +dashedName: working-with-text-question-f +--- + +# --description-- + +You may have noticed that in all the examples in this lesson you indent any elements that are within other elements. This is known as nesting elements. + +When you nest elements within other elements, you create a parent and child relationship between them. The nested elements are the children and the element they are nested within is the parent. + +In the following example, the body element is the parent and the paragraph is the child: + +```html + + + + +

                                                                  Lorem ipsum dolor sit amet.

                                                                  + + +``` + +Just as in human relationships, HTML parent elements can have many children. Elements at the same level of nesting are considered to be siblings. + +For example, the two paragraphs in the following code are siblings, since they are both children of the body tag and are at the same level of nesting as each other: + +```html + + + + +

                                                                  Lorem ipsum dolor sit amet.

                                                                  +

                                                                  Ut enim ad minim veniam.

                                                                  + + +``` + +You use indentation to make the level of nesting clear and readable for yourselves and other developers who will work with your HTML in the future. It is recommended to indent any child elements by two spaces. + +The parent, child, and sibling relationships between elements will become much more important later when you start styling your HTML with CSS and adding behavior with JavaScript. For now, however, it is just important to know the distinction between how elements are related and the terminology used to describe their relationships. + +# --question-- + +## --text-- + +What relationship does an element have with any nested element within it? + +## --answers-- + +The element within the other element is called the parent element. + +--- + +The element within the other element is called the child element. + +--- + +The element within the other element is called the sibling element. + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/working-with-text-question-g.md b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/working-with-text-question-g.md new file mode 100644 index 00000000000..fe83f0ef062 --- /dev/null +++ b/curriculum/challenges/chinese-traditional/10-coding-interview-prep/the-odin-project/working-with-text-question-g.md @@ -0,0 +1,49 @@ +--- +id: 637f4e8772c65bc8e73dfe2d +videoId: gW6cBZLUk6M +title: Working With Text Question G +challengeType: 15 +dashedName: working-with-text-question-g +--- + +# --description-- + +HTML comments are not visible to the browser; they allow us to comment on your code so that other developers or your future selves can read them and get some context about something that might not be clear in the code. + +Writing an HTML comment is simple: You just enclose the comment with ``tags. For example: + +```html +

                                                                  View the html to see the hidden comments

                                                                  + + + +

                                                                  Some paragraph text

                                                                  + + +``` + +# --question-- + +## --assignment-- + +To get some practice working with text in HTML, create a plain blog article page which uses different headings, uses paragraphs, and has some text in the paragraphs bolded and italicized. You can use [Lorem Ipsum](https://loremipsum.io) to generate dummy text, in place of real text as you build your sites. + +## --text-- + +How do you create HTML comments? + +## --answers-- + +`/* This is an HTML comment */` + +--- + +`` + +--- + +`<-- This is an HTML comment --!>` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d1ac33c68d27dcda5796.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d1ac33c68d27dcda5796.md index faf4e7a44c5..8a45830bc07 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d1ac33c68d27dcda5796.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d1ac33c68d27dcda5796.md @@ -14,13 +14,25 @@ dashedName: step-23 應該使用 `transform` 屬性來旋轉元素。 ```js -assert.notEmpty(new __helpers.CSSHelp(document).getStyle('.back-mountain')?.transform); +const backMountain = new __helpers.CSSHelp(document).getStyle('.back-mountain'); + +if (backMountain?.transform) { + assert.notEmpty(backMountain?.transform); +} else { + assert.notEmpty(backMountain?.rotate); +} ``` 應該設置 `.back-mountain` 的 `transform` 值爲 `--fcc-expected--`,而不是 `--fcc-actual--`。 ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.back-mountain')?.transform, 'rotate(45deg)'); +const backMountain = new __helpers.CSSHelp(document).getStyle('.back-mountain'); + +if (backMountain?.transform) { + assert.equal(backMountain?.transform, 'rotate(45deg)'); +} else { + assert.equal(backMountain?.rotate, '45deg'); +} ``` `.back-mountain` 應該有一個 `left` 屬性。 diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d229b0e542520cd91c685.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d229b0e542520cd91c685.md index b245962fa7b..72666055d05 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d229b0e542520cd91c685.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d229b0e542520cd91c685.md @@ -14,13 +14,25 @@ dashedName: step-84 應該將 `.foot.left` 的 `transform` 設置爲 `rotate(80deg)`。 ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.foot.left').getPropVal('transform', true), 'rotate(80deg)'); +const leftFoot = new __helpers.CSSHelp(document).getStyle('.foot.left'); + +if (leftFoot?.transform) { + assert.equal(leftFoot.getPropVal('transform', true), 'rotate(80deg)'); +} else { + assert.equal(leftFoot.getPropVal('rotate', true), '80deg'); +} ``` 應該將 `.foot.right` 的 `transform` 設置爲 `rotate(-80deg)`。 ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.foot.right').getPropVal('transform', true), 'rotate(-80deg)'); +const rightFoot = new __helpers.CSSHelp(document).getStyle('.foot.right'); + +if (rightFoot?.transform) { + assert.equal(rightFoot.getPropVal('transform', true), 'rotate(-80deg)'); +} else { + assert.equal(rightFoot.getPropVal('rotate', true), '-80deg'); +} ``` # --seed-- diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2d4e80400325ff89664a.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2d4e80400325ff89664a.md index d93cf1767f9..b00761013a2 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2d4e80400325ff89664a.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2d4e80400325ff89664a.md @@ -14,7 +14,14 @@ dashedName: step-91 你應該將 `.arm.left` 的 `transform` 設置爲 `rotate(130deg) scaleX(-1)`。 ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.arm.left').getPropVal('transform', true), 'rotate(130deg)scaleX(-1)'); +const leftArm = new __helpers.CSSHelp(document).getStyle('.arm.left'); + +if (leftArm?.rotate && leftArm?.transform) { + assert.equal(leftArm.getPropVal('rotate', true), '130deg'); + assert.equal(leftArm.getPropVal('transform', true), 'scaleX(-1)'); +} else { + assert.equal(leftArm.getPropVal('transform', true), 'rotate(130deg)scaleX(-1)'); +} ``` # --seed-- @@ -281,7 +288,6 @@ body { top: 35%; left: 5%; transform-origin: top left; - } --fcc-editable-region-- diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2ebc81ba81271460850d.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2ebc81ba81271460850d.md index eb8e358766b..5a47b63079c 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2ebc81ba81271460850d.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2ebc81ba81271460850d.md @@ -14,7 +14,13 @@ dashedName: step-92 你應該將 `.arm.right` 的 `transform` 設置爲 `rotate(-45deg)`。 ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.arm.right')?.getPropVal('transform', true), 'rotate(-45deg)'); +const rightArm = new __helpers.CSSHelp(document).getStyle('.arm.right'); + +if (rightArm?.transform) { + assert.equal(rightArm?.getPropVal('transform', true), 'rotate(-45deg)'); +} else { + assert.equal(rightArm?.getPropVal('rotate', true), '-45deg'); +} ``` # --seed-- @@ -287,7 +293,6 @@ body { .arm.right { top: 0%; right: -5%; - } --fcc-editable-region-- diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d32c7fa21f32aaa91d499.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d32c7fa21f32aaa91d499.md index f05ebbeee8c..efdcb998ebc 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d32c7fa21f32aaa91d499.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d32c7fa21f32aaa91d499.md @@ -14,7 +14,16 @@ dashedName: step-97 應該在 `10%` 位置關鍵幀設置 `transform` 爲 `rotate(110deg) scaleX(-1)`。 ```js -assert([...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '10%')?.style?.transform?.replace(/\s+/g, '') === 'rotate(110deg)scaleX(-1)'); +const wave10Percent = [...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '10%'); +const rotateProp = wave10Percent?.style?.rotate?.replace(/\s+/g, ''); +const transformProp = wave10Percent?.style?.transform?.replace(/\s+/g, ''); + +if (rotateProp && transformProp) { + assert(rotateProp === '110deg'); + assert(transformProp === 'scaleX(-1)'); +} else { + assert(transformProp === 'rotate(110deg)scaleX(-1)'); +} ``` # --seed-- diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d333b738e3c2b5d58b095.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d333b738e3c2b5d58b095.md index 932ca1d8e16..9d3a0860f68 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d333b738e3c2b5d58b095.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d333b738e3c2b5d58b095.md @@ -14,7 +14,16 @@ dashedName: step-98 應該在 `20%` 位置關鍵幀設置 `transform` 爲 `rotate(130deg) scaleX(-1)`。 ```js -assert([...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '20%')?.style?.transform?.replace(/\s+/g, '') === 'rotate(130deg)scaleX(-1)'); +const wave20Percent = [...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '20%'); +const transformProp = wave20Percent?.style?.transform?.replace(/\s+/g, ''); +const rotateProp = wave20Percent?.style?.rotate?.replace(/\s+/g, ''); + +if (rotateProp && transformProp) { + assert(rotateProp === '130deg'); + assert(transformProp === 'scaleX(-1)'); +} else { + assert(transformProp === 'rotate(130deg)scaleX(-1)'); +} ``` # --seed-- diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d337765b9f02c10e93722.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d337765b9f02c10e93722.md index 41523654b36..0ad9d2d95b3 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d337765b9f02c10e93722.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d337765b9f02c10e93722.md @@ -14,13 +14,31 @@ dashedName: step-99 應該在 `30%` 位置關鍵幀設置 `transform` 爲 `rotate(110deg) scaleX(-1)`。 ```js -assert([...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '30%')?.style?.transform?.replace(/\s+/g, '') === 'rotate(110deg)scaleX(-1)'); +const wave30Percent = [...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '30%'); +const transformProp = wave30Percent?.style?.transform?.replace(/\s+/g, ''); +const rotateProp = wave30Percent?.style?.rotate?.replace(/\s+/g, ''); + +if (rotateProp && transformProp) { + assert(rotateProp === '110deg'); + assert(transformProp === 'scaleX(-1)'); +} else { + assert(transformProp === 'rotate(110deg)scaleX(-1)'); +} ``` 應該在 `40%` 位置關鍵幀設置 `transform` 爲 `rotate(130deg) scaleX(-1)`。 ```js -assert([...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '40%')?.style?.transform?.replace(/\s+/g, '') === 'rotate(130deg)scaleX(-1)'); +const wave40Percent = [...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '40%'); +const transformProp = wave40Percent?.style?.transform?.replace(/\s+/g, ''); +const rotateProp = wave40Percent?.style?.rotate?.replace(/\s+/g, ''); + +if (rotateProp && transformProp) { + assert(rotateProp === '130deg'); + assert(transformProp === 'scaleX(-1)'); +} else { + assert(transformProp === 'rotate(130deg)scaleX(-1)'); +} ``` # --seed-- diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98f0.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98f0.md index 6114aa60c83..876e3f33b22 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98f0.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98f0.md @@ -16,11 +16,11 @@ gradient-type( ); ``` -在示例中,`color1` 在頂部是實心的,`color2` 在底部是實心的,並且在它們之間均勻地從一個過渡到下一個。 在 `.bb1a` 中,使用 `--building-color1` 作爲第一個顏色、 `--window-color1` 作爲第二個顏色,將 `linear-gradient` 類型的漸變添加到 `background` 屬性。 +在示例中,`color1` 在頂部是實心的,`color2` 在底部是實心的,並且在它們之間均勻地從一個過渡到下一個。 在 `.bb1a` 中,在 `background-color` 屬性下添加 `background` 屬性。 將其設置爲 `linear-gradient` 類型的梯度,使用 `--building-color1` 作爲其第一種顏色,使用 `--window-color1` 作爲第二種顏色。 # --hints-- -你應該將 `background` 應用到 `.bb1a`。 +你應該給 `.bb1a` 應用 `background`,就在 `background-color` 後面。 ```js assert(new __helpers.CSSHelp(document).getStyle('.bb1a')?.background); diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dc17d3bf86c76b9248c6eb4.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dc17d3bf86c76b9248c6eb4.md index a84c644d914..1f6b27d981a 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dc17d3bf86c76b9248c6eb4.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dc17d3bf86c76b9248c6eb4.md @@ -25,7 +25,7 @@ assert(document.querySelector('p')); assert(code.match(/<\/p\>/)); ``` -Your `p` element's text should be `See more cat photos in our gallery.` 你可能忽略了文本或有拼寫錯誤。 +你的 `p` 元素的文本應該是 `See more cat photos in our gallery.` 你可能忽略了文本或有拼寫錯誤。 ```js const extraSpacesRemoved = document diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dc2385ff86c76b9248c6eb7.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dc2385ff86c76b9248c6eb7.md index 53e6476f7dc..a25dca40bca 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dc2385ff86c76b9248c6eb7.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dc2385ff86c76b9248c6eb7.md @@ -41,7 +41,7 @@ const collection = [...document.querySelectorAll('main,h1')].map( assert(collection.indexOf('MAIN') < collection.indexOf('H1')); ``` -你的 `main` 元素的開始標籤應該在 `p` 元素的下方。 你把順序寫錯了。 +你的 `main` 元素的結束標籤應該在 `p` 元素的下方。 你把順序寫錯了。 ```js const mainNode = document.querySelector('main'); diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dc23991f86c76b9248c6eb8.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dc23991f86c76b9248c6eb8.md index 7daa82b6e6d..0adb9d3de89 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dc23991f86c76b9248c6eb8.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dc23991f86c76b9248c6eb8.md @@ -65,7 +65,7 @@ assert( assert(document.querySelector('p')); ``` -The text of the `p` element should be `See more cat photos in our gallery.` 不要更改 `p` 元素的文本、間距或標點符號。 +`p` 元素的文本應該是 `See more cat photos in our gallery.` 不要更改 `p` 元素的文本、間距或標點符號。 ```js assert( diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa22d1b521be39a3de7be0.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa22d1b521be39a3de7be0.md index 5c0bc4a6958..88d01aa01ee 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa22d1b521be39a3de7be0.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa22d1b521be39a3de7be0.md @@ -38,7 +38,7 @@ assert( ); ``` -After nesting the anchor (`a`) element, the only `p` element content visible in the browser should be `See more cat photos in our gallery.` Double check the text, spacing, or punctuation of both the `p` and nested anchor element. +在嵌套了錨點元素(`a`)之後,瀏覽器中顯示的 `p` 元素應該僅爲 `See more cat photos in our gallery.`。再次檢查 `p` 和嵌套其中的錨點元素的文本、間距或標點。 ```js const pText = document diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa2407b521be39a3de7be1.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa2407b521be39a3de7be1.md index ba936cbd849..c7eced800ef 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa2407b521be39a3de7be1.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa2407b521be39a3de7be1.md @@ -45,7 +45,7 @@ assert(document.querySelector('a').getAttribute('target') === '_blank');

                                                                  Cat Photos

                                                                  --fcc-editable-region-- -

                                                                  See more cat photos in our gallery.

                                                                  +

                                                                  See more cat photos in our gallery.

                                                                  --fcc-editable-region-- A cute orange cat lying on its back. diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/62dabe2ef403a12d5d295273.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/62dabe2ef403a12d5d295273.md index ff0e1d69796..8eb9b9f526c 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/62dabe2ef403a12d5d295273.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/62dabe2ef403a12d5d295273.md @@ -41,7 +41,7 @@ assert( ); ``` -The `p` element content visible in the browser should be `See more cat photos in our gallery.` Double check the text, spacing, or punctuation of both the `p` and nested anchor element. +瀏覽器中顯示的 `p` 元素應該僅爲 `See more cat photos in our gallery.`。再次檢查 `p` 和嵌套其中的錨點元素的文本、間距或標點。 ```js const pText = document diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60fab9f17fa294054b74228c.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60fab9f17fa294054b74228c.md index 07f1c9d422d..f1a6809e54a 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60fab9f17fa294054b74228c.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60fab9f17fa294054b74228c.md @@ -9,7 +9,7 @@ dashedName: step-31 現在到了最後一個 `fieldset`。 如果你想允許用戶上傳個人資料圖片,應該怎麼做呢? -類型爲 `file` 的 `input` 可以實現。 Add a `label` with the text `Upload a profile picture:`, and nest an `input` accepting a file upload. +類型爲 `file` 的 `input` 可以實現。 添加一個 `label`,其文本爲 `Upload a profile picture:`,嵌套一個 `input` 以接收上傳的文件。 # --hints-- diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2abbe7d18d49a1e0e1c8.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2abbe7d18d49a1e0e1c8.md index 937ef4537f4..1f61381a2ec 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2abbe7d18d49a1e0e1c8.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2abbe7d18d49a1e0e1c8.md @@ -39,13 +39,15 @@ assert(document.querySelector('h1')?.innerText === 'Nutrition Facts'); --fcc-editable-region-- - - - Nutrition Label - - - + + + Nutrition Label + + + + + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2d4150fe0d4cbd0f2628.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2d4150fe0d4cbd0f2628.md index 7d7cc42eb7c..34dc3575e06 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2d4150fe0d4cbd0f2628.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2d4150fe0d4cbd0f2628.md @@ -43,14 +43,16 @@ assert(document.querySelector('p')?.innerText === '8 servings per container'); --fcc-editable-region-- - - - Nutrition Label - - -

                                                                  Nutrition Facts

                                                                  - + + + Nutrition Label + + + +

                                                                  Nutrition Facts

                                                                  + + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34948891834dd77655a6.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34948891834dd77655a6.md index f72657bdb21..a4ad76a90d7 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34948891834dd77655a6.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34948891834dd77655a6.md @@ -43,15 +43,17 @@ assert(document.querySelectorAll('p')?.[1]?.innerText === 'Serving size 2/3 cup --fcc-editable-region-- - - - Nutrition Label - - -

                                                                  Nutrition Facts

                                                                  -

                                                                  8 servings per container

                                                                  - + + + Nutrition Label + + + +

                                                                  Nutrition Facts

                                                                  +

                                                                  8 servings per container

                                                                  + + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34ecc1091b4fd5a8a484.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34ecc1091b4fd5a8a484.md index cc19bea9578..9cd5c10c277 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34ecc1091b4fd5a8a484.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34ecc1091b4fd5a8a484.md @@ -49,16 +49,18 @@ assert(links.find(link => link?.getAttribute('href') === 'https://fonts.googleap --fcc-editable-region-- - - - Nutrition Label - - -

                                                                  Nutrition Facts

                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  - + + + Nutrition Label + + + + +

                                                                  Nutrition Facts

                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f357957e370510f21ea16.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f357957e370510f21ea16.md index eb430c365f8..48e3d173cba 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f357957e370510f21ea16.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f357957e370510f21ea16.md @@ -32,17 +32,19 @@ assert(new __helpers.CSSHelp(document).getStyle('body')?.fontFamily === '"Open S ```html - - - Nutrition Label - - - - -

                                                                  Nutrition Facts

                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  - + + + + Nutrition Label + + + + + +

                                                                  Nutrition Facts

                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  + ``` diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f378014c2da526a109c81.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f378014c2da526a109c81.md index e4f24b52fd1..448031c7a91 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f378014c2da526a109c81.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f378014c2da526a109c81.md @@ -30,17 +30,19 @@ assert(new __helpers.CSSHelp(document).getStyle('html')?.fontSize === '16px'); ```html - - - Nutrition Label - - - - -

                                                                  Nutrition Facts

                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  - + + + + Nutrition Label + + + + + +

                                                                  Nutrition Facts

                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  + ``` diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38279e5c3d53692ea441.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38279e5c3d53692ea441.md index 8ce15ab60c3..4f9d9146d83 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38279e5c3d53692ea441.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38279e5c3d53692ea441.md @@ -37,18 +37,20 @@ assert(children?.every(child => child?.parentElement?.classList?.contains('label ```html - - - Nutrition Label - - - + + + + Nutrition Label + + + + --fcc-editable-region-- - -

                                                                  Nutrition Facts

                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  - + +

                                                                  Nutrition Facts

                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38cabc64e3556f98cc1a.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38cabc64e3556f98cc1a.md index 2f53bb24ade..1b353ddfbe9 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38cabc64e3556f98cc1a.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38cabc64e3556f98cc1a.md @@ -32,19 +32,21 @@ assert(new __helpers.CSSHelp(document).getStyle('.label')?.border === '2px solid ```html - - - Nutrition Label - - - - -
                                                                  -

                                                                  Nutrition Facts

                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  - + + + + Nutrition Label + + + + + +
                                                                  +

                                                                  Nutrition Facts

                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  + ``` diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3949f58e12577dcefb00.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3949f58e12577dcefb00.md index adaa32f6335..07595831240 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3949f58e12577dcefb00.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3949f58e12577dcefb00.md @@ -26,19 +26,21 @@ assert(new __helpers.CSSHelp(document).getStyle('.label')?.width === '270px'); ```html - - - Nutrition Label - - - - -
                                                                  -

                                                                  Nutrition Facts

                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  - + + + + Nutrition Label + + + + + +
                                                                  +

                                                                  Nutrition Facts

                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  + ``` diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f39d7da41b15851fa3fb9.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f39d7da41b15851fa3fb9.md index 08da186bd41..1fa6fa2fac7 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f39d7da41b15851fa3fb9.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f39d7da41b15851fa3fb9.md @@ -30,19 +30,21 @@ assert(new __helpers.CSSHelp(document).getStyle('.label')?.padding === '0px 7px' ```html - - - Nutrition Label - - - - -
                                                                  -

                                                                  Nutrition Facts

                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  - + + + + Nutrition Label + + + + + +
                                                                  +

                                                                  Nutrition Facts

                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  + ``` diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3b091162165948e1cb33.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3b091162165948e1cb33.md index 222fb70ea0e..a1afe366310 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3b091162165948e1cb33.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3b091162165948e1cb33.md @@ -32,19 +32,21 @@ assert(new __helpers.CSSHelp(document).getStyle('*')?.boxSizing === 'border-box' ```html - - - Nutrition Label - - - - -
                                                                  -

                                                                  Nutrition Facts

                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  - + + + + Nutrition Label + + + + + +
                                                                  +

                                                                  Nutrition Facts

                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  + ``` diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3cafd794015aa9547a6d.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3cafd794015aa9547a6d.md index d3d32df9ea8..954c4e6e1ea 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3cafd794015aa9547a6d.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3cafd794015aa9547a6d.md @@ -32,19 +32,21 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')?.fontWeight === '800'); ```html - - - Nutrition Label - - - - -
                                                                  -

                                                                  Nutrition Facts

                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  - + + + + Nutrition Label + + + + + +
                                                                  +

                                                                  Nutrition Facts

                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  + ``` diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3d9e59db4b5b8e960762.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3d9e59db4b5b8e960762.md index 14d594bc201..35e67996814 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3d9e59db4b5b8e960762.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3d9e59db4b5b8e960762.md @@ -24,19 +24,21 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')?.textAlign === 'center'); ```html - - - Nutrition Label - - - - -
                                                                  -

                                                                  Nutrition Facts

                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  - + + + + Nutrition Label + + + + + +
                                                                  +

                                                                  Nutrition Facts

                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  + ``` diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e1b7233ee5c7595771f.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e1b7233ee5c7595771f.md index 152e4587f9c..fedab008f7d 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e1b7233ee5c7595771f.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e1b7233ee5c7595771f.md @@ -24,19 +24,21 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')?.margin === '-4px 0px'); ```html - - - Nutrition Label - - - - -
                                                                  -

                                                                  Nutrition Facts

                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  - + + + + Nutrition Label + + + + + +
                                                                  +

                                                                  Nutrition Facts

                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  + ``` diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e4af8008c5d494d3afe.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e4af8008c5d494d3afe.md index 12f8056a323..78b580a1378 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e4af8008c5d494d3afe.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e4af8008c5d494d3afe.md @@ -30,19 +30,21 @@ assert(new __helpers.CSSHelp(document).getStyle('p')?.margin === '0px'); ```html - - - Nutrition Label - - - - -
                                                                  -

                                                                  Nutrition Facts

                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  - + + + + Nutrition Label + + + + + +
                                                                  +

                                                                  Nutrition Facts

                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  + ``` diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3ed16592445e57941aec.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3ed16592445e57941aec.md index 8e668433c76..8b671de4801 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3ed16592445e57941aec.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3ed16592445e57941aec.md @@ -44,21 +44,23 @@ assert(document.querySelector('.divider')?.previousElementSibling?.localName === ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                                                  -

                                                                  Nutrition Facts

                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  --fcc-editable-region-- - + ``` diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f405b89a7ec5f8e2d11f4.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f405b89a7ec5f8e2d11f4.md index 886238237fb..827eb1ffe0b 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f405b89a7ec5f8e2d11f4.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f405b89a7ec5f8e2d11f4.md @@ -36,20 +36,22 @@ assert(new __helpers.CSSHelp(document).getStyle('.divider')?.margin === '2px 0px ```html - - - Nutrition Label - - - - -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  - + + + + Nutrition Label + + + + + +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  + ``` diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f40b01f680e608d360ed4.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f40b01f680e608d360ed4.md index 59bacd3e070..013ccd86119 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f40b01f680e608d360ed4.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f40b01f680e608d360ed4.md @@ -26,20 +26,22 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')?.letterSpacing === '0.15px ```html - - - Nutrition Label - - - - -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  - + + + + Nutrition Label + + + + + +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  + ``` diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4172e9eec061d6456221.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4172e9eec061d6456221.md index 5e7557aec1b..682aaf04302 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4172e9eec061d6456221.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4172e9eec061d6456221.md @@ -32,22 +32,24 @@ assert(!document.querySelector('p')?.classList?.contains('bold')); ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  --fcc-editable-region-- - + ``` diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f41c979787462e76dab90.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f41c979787462e76dab90.md index 0d50f7eae10..ca2cf721d1d 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f41c979787462e76dab90.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f41c979787462e76dab90.md @@ -44,20 +44,22 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')); ```html - - - Nutrition Label - - - - -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  - + + + + Nutrition Label + + + + + +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  + ``` diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f423cf65d5864132a0956.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f423cf65d5864132a0956.md index a38f5b3e969..dd15fd27ec4 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f423cf65d5864132a0956.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f423cf65d5864132a0956.md @@ -24,22 +24,24 @@ assert(document.querySelector('h1')?.classList?.contains('bold')); ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  --fcc-editable-region-- - + ``` diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f42a021625f656101ef93.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f42a021625f656101ef93.md index 2b4cc5c18ef..71f2c3c5a28 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f42a021625f656101ef93.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f42a021625f656101ef93.md @@ -9,7 +9,7 @@ dashedName: step-22 同樣重要的元素之間的水平間距可以增加文本的可讀性。 -將文本 `2/3 cup (55g)` 包裹在 `span` 元素中,並將 `class` 屬性設置爲 `right`。 +Wrap the text `2/3 cup (55g)` in a `span` element. # --hints-- @@ -19,19 +19,13 @@ dashedName: step-22 assert(document.querySelector('span')); ``` -新的 `span` 元素應該將 `class` 屬性設置爲 `right`。 - -```js -assert(document.querySelector('span')?.classList?.contains('right')); -``` - -你的 `span` 元素應包含文本 `2/3 cup (55g)`。 +Your `span` element should have the text `2/3 cup (55g)`. ```js assert(document.querySelector('span')?.textContent?.trim() === '2/3 cup (55g)'); ``` -`p` 元素仍應包含文本 `Serving size 2/3 cup (55g)`。 +Your `p` element should still have the text `Serving size 2/3 cup (55g)`. ```js assert(document.querySelectorAll('p')?.[1]?.innerText === 'Serving size 2/3 cup (55g)'); @@ -44,22 +38,24 @@ assert(document.querySelectorAll('p')?.[1]?.innerText === 'Serving size 2/3 cup ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  --fcc-editable-region-- - + ``` diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4bfb9de4a16703b56eb6.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4bfb9de4a16703b56eb6.md index a8166fd39f5..b4fa4fa39e5 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4bfb9de4a16703b56eb6.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4bfb9de4a16703b56eb6.md @@ -7,22 +7,20 @@ dashedName: step-23 # --description-- -`float` 屬性用於將元素放置在其容器的左側或右側,允許其他內容(例如文本)環繞它。 - -創建一個新的 `.right` 選擇器,並將 `float` 屬性設置爲 `right`。 +Now we can add the horizontal spacing using `flex`. In your `p` selector, add a `display` property set to `flex` and a `justify-content` property set to `space-between`. # --hints-- -應該創建一個新的 `.right` 選擇器。 +Your `p` selector should have a `display` property set to `flex`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.right')); +assert(new __helpers.CSSHelp(document).getStyle('p')?.display === 'flex'); ``` -`.right` 選擇器應該有一個 `float` 屬性設置爲 `right`。 +Your `p` selector should have a `justify-content` property set to `space-between`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.right')?.float === 'right'); +assert(new __helpers.CSSHelp(document).getStyle('p')?.justifyContent === 'space-between'); ``` # --seed-- @@ -32,20 +30,22 @@ assert(new __helpers.CSSHelp(document).getStyle('.right')?.float === 'right'); ```html - - - Nutrition Label - - - - -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  - + + + + Nutrition Label + + + + + +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  + ``` @@ -75,9 +75,11 @@ h1 { letter-spacing: 0.15px } +--fcc-editable-region-- p { margin: 0; } +--fcc-editable-region-- .divider { border-bottom: 1px solid #888989; @@ -87,8 +89,4 @@ p { .bold { font-weight: 800; } - ---fcc-editable-region-- - ---fcc-editable-region-- ``` diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ce9d877b668417c0c42.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ce9d877b668417c0c42.md index 1b075235337..1aaed3baa5e 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ce9d877b668417c0c42.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ce9d877b668417c0c42.md @@ -40,22 +40,24 @@ assert(children?.[3]?.localName === 'p'); ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  --fcc-editable-region-- - + ``` @@ -87,6 +89,8 @@ h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -97,8 +101,4 @@ p { .bold { font-weight: 800; } - -.right { - float: right; -} ``` diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4dde9d72e3694cb9ee3b.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4dde9d72e3694cb9ee3b.md index 16f81a2addf..fb67344c995 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4dde9d72e3694cb9ee3b.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4dde9d72e3694cb9ee3b.md @@ -39,22 +39,24 @@ assert(style?.letterSpacing === '0.15px'); ```html - - - Nutrition Label - - - - -
                                                                  -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  -
                                                                  - + + + + Nutrition Label + + + + + +
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  +
                                                                  + ``` @@ -88,6 +90,8 @@ h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -98,8 +102,4 @@ p { .bold { font-weight: 800; } - -.right { - float: right; -} ``` diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ec58334106a4170c2a8.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ec58334106a4170c2a8.md index 3398ee37508..9ee35e32e9d 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ec58334106a4170c2a8.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ec58334106a4170c2a8.md @@ -7,7 +7,7 @@ dashedName: step-26 # --description-- -在 `header` 元素下創建一個新的 `div` 元素,並將其 `class` 屬性設置爲 `divider lg`。 +Create a new `div` element below your `header` element, and give it a `class` attribute set to `divider large`. # --hints-- @@ -23,12 +23,12 @@ assert(document.querySelectorAll('div')?.length === 3); assert(document.querySelector('.label')?.lastElementChild?.localName === 'div'); ``` -新的 `div` 元素應該將 `class` 屬性設置爲 `divider lg`。 +Your new `div` element should have the `class` attribute set to `divider large`. ```js const div = document.querySelector('.label')?.lastElementChild; assert(div?.classList?.contains('divider')); -assert(div?.classList?.contains('lg')); +assert(div?.classList?.contains('large')); ``` # --seed-- @@ -38,25 +38,27 @@ assert(div?.classList?.contains('lg')); ```html - - - Nutrition Label - - - - -
                                                                  -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  + + + + Nutrition Label + + + + + +
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  --fcc-editable-region-- --fcc-editable-region-- -
                                                                  - +
                                                                  + ``` @@ -88,6 +90,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -98,8 +102,4 @@ p { .bold { font-weight: 800; } - -.right { - float: right; -} ``` diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4f9e4a40566b776a8f38.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4f9e4a40566b776a8f38.md index 0841f3b3391..715501d014c 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4f9e4a40566b776a8f38.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4f9e4a40566b776a8f38.md @@ -7,32 +7,32 @@ dashedName: step-27 # --description-- -創建一個新的 `.lg` 選擇器,並將其 `height` 屬性設置爲 `10px`。 同時創建一個 `.lg, .md` 選擇器,並將 `background-color` 屬性設置爲 `black`。 +Create a new `.large` selector and give it a `height` property set to `10px`. Also create an `.large, .medium` selector and set the `background-color` property to `black`. # --hints-- -應該有一個新的 `.lg` 選擇器。 +You should have a new `.large` selector. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg')); +assert(new __helpers.CSSHelp(document).getStyle('.large')); ``` -`.lg` 選擇器應該將 `height` 屬性設置爲 `10px`。 +Your `.large` selector should have a `height` property set to `10px`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg')?.height === '10px'); +assert(new __helpers.CSSHelp(document).getStyle('.large')?.height === '10px'); ``` -應該有一個新的 `.lg, .md` 選擇器。 +You should have a new `.large, .medium` selector. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')); +assert(new __helpers.CSSHelp(document).getStyle('.large, .medium')); ``` -`.lg, .md` 選擇器應該有一個 `background-color` 屬性設置爲 `black`。 +Your `.large, .medium` selector should have a `background-color` property set to `black`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')?.backgroundColor === 'black'); +assert(new __helpers.CSSHelp(document).getStyle('.large, .medium')?.backgroundColor === 'black'); ``` # --seed-- @@ -42,23 +42,25 @@ assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')?.backgroundColor === ```html - - - Nutrition Label - - - - -
                                                                  -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  -
                                                                  -
                                                                  - + + + + Nutrition Label + + + + + +
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  +
                                                                  +
                                                                  + ``` @@ -90,6 +92,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -101,10 +105,6 @@ p { font-weight: 800; } -.right { - float: right; -} - --fcc-editable-region-- --fcc-editable-region-- diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f50473cc0196c6dd3892a.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f50473cc0196c6dd3892a.md index bb5b67ae535..ea6eaa1d1df 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f50473cc0196c6dd3892a.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f50473cc0196c6dd3892a.md @@ -7,16 +7,16 @@ dashedName: step-28 # --description-- -你可能會注意到 `.lg` 元素的底部仍有一個小邊框。 要重置它,給 `.lg, .md` 選擇器一個 `border` 屬性設置爲 `0`。 +You may notice there is still a small border at the bottom of your `.large` element. To reset this, give your `.large, .medium` selector a `border` property set to `0`. -注意:`md`(中等)類將在步驟 37 中用於營養標籤的較細柱狀圖。 +Note: the `medium`(medium) class will be utilized in step 37 for the thinner bars of the nutrition label. # --hints-- -`.lg, .md` 選擇器應該將 `border` 屬性設置爲 `0`。 +Your `.large, .medium` selector should have a `border` property set to `0`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')?.borderWidth === '0px'); +assert(new __helpers.CSSHelp(document).getStyle('.large, .medium')?.borderWidth === '0px'); ``` # --seed-- @@ -26,23 +26,25 @@ assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')?.borderWidth === '0p ```html - - - Nutrition Label - - - - -
                                                                  -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  -
                                                                  -
                                                                  - + + + + Nutrition Label + + + + + +
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  +
                                                                  +
                                                                  + ``` @@ -74,6 +76,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -85,16 +89,12 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } --fcc-editable-region-- -.lg, .md { +.large, .medium { background-color: black; } --fcc-editable-region-- diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51257a8a516d80b6c743.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51257a8a516d80b6c743.md index f2d1a52da6f..24bf7e963fd 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51257a8a516d80b6c743.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51257a8a516d80b6c743.md @@ -7,7 +7,7 @@ dashedName: step-29 # --description-- -在 `.lg` 元素下創建一個新的 `div`,並將 `class` 屬性設置爲 `calories-info`。 +Create a new `div` below your `.large` element and give it a `class` attribute set to `calories-info`. # --hints-- @@ -23,10 +23,10 @@ assert(document.querySelectorAll('div')?.length === 4); assert(document.querySelector('.label')?.lastElementChild?.classList?.contains('calories-info')); ``` -新的 `div` 應該在 `.lg` 元素之後。 +Your new `div` should come after the `.large` element. ```js -assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('lg')); +assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('large')); ``` # --seed-- @@ -36,26 +36,28 @@ assert(document.querySelector('.label')?.lastElementChild?.previousElementSiblin ```html - - - Nutrition Label - - - - -
                                                                  -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  -
                                                                  + + + + Nutrition Label + + + + + +
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  +
                                                                  --fcc-editable-region-- --fcc-editable-region-- -
                                                                  - +
                                                                  + ``` @@ -87,6 +89,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -98,15 +102,11 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51e4e5b24a6e80eccce1.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51e4e5b24a6e80eccce1.md index a1680282080..5aa7aac2ab2 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51e4e5b24a6e80eccce1.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51e4e5b24a6e80eccce1.md @@ -7,27 +7,39 @@ dashedName: step-30 # --description-- -在 `.calories-info` 元素中,創建一個 `p` 元素。 給那個 `p` 元素一個 `class` 屬性設置爲 `bold sm-text`,以及文本 `Amount per serving`。 +Within your `.calories-info` element, create a `div` element. Give that `div` element a `class` attribute set to `left-container`. Within the newly created `div` element, create a `h2` element with the text `Amount per serving`. Give the `h2` element a `class` attribute set to `bold small-text`. # --hints-- -應該在 `.calories-info` 元素中創建一個新的 `p` 元素。 +You should create a new `div` element within your `.calories-info` element. ```js -assert(document.querySelector('.calories-info')?.children?.[0]?.localName === 'p'); +assert(document.querySelector('.calories-info')?.children?.[0]?.localName === 'div'); ``` -新的 `p` 元素應該有一個 `class` 屬性設置爲 `bold sm-text`。 +Your new `div` element should have a `class` attribute set to `left-container`. ```js -assert(document.querySelector('.calories-info')?.children?.[0]?.classList.contains('bold')); -assert(document.querySelector('.calories-info')?.children?.[0]?.classList.contains('sm-text')); +assert(document.querySelector('.calories-info')?.children?.[0]?.classList.contains('left-container')); ``` -新的 `p` 元素應包含文本 `Amount per serving`。 +You should create a new `h2` element within your `.left-container` element. ```js -assert(document.querySelector('.calories-info')?.children?.[0]?.innerText === 'Amount per serving'); +assert(document.querySelector('.left-container')?.children?.[0]?.localName === 'h2'); +``` + +Your new `h2` element should have a `class` attribute set to `bold small-text`. + +```js +assert(document.querySelector('.left-container')?.children?.[0]?.classList.contains('bold')); +assert(document.querySelector('.left-container')?.children?.[0]?.classList.contains('small-text')); +``` + +Your new `h2` element should have the text `Amount per serving`. + +```js +assert(document.querySelector('.left-container')?.children?.[0]?.innerText === 'Amount per serving'); ``` # --seed-- @@ -37,28 +49,30 @@ assert(document.querySelector('.calories-info')?.children?.[0]?.innerText === 'A ```html - - - Nutrition Label - - - - -
                                                                  -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  -
                                                                  ---fcc-editable-region-- -
                                                                  -
                                                                  + + + Nutrition Label + + + + + +
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  +
                                                                  --fcc-editable-region-- +
                                                                  +
                                                                  - +--fcc-editable-region-- +
                                                                  + ``` @@ -90,6 +104,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -101,15 +117,11 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md index c8dea5b75ac..7fb1bce09af 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md @@ -9,20 +9,20 @@ dashedName: step-31 `rem` 單位代表 `root em`,與 `html` 元素的字體大小有關。 -創建一個 `.sm-text` 選擇器並將 `font-size` 設置爲 `0.85rem`,計算結果大致爲 `13.6px`(記得你之前將 `html` 設置爲具有 `16px` 的 `font-size`)。 +Create an `.small-text` selector and set the `font-size` to `0.85rem`, which would calculate to be roughly `13.6px` (remember that you set your `html` to have a `font-size` of `16px`). # --hints-- -應該有一個 `.sm-text` 選擇器。 +You should have an `.small-text` selector. ```js -assert(new __helpers.CSSHelp(document).getStyle('.sm-text')); +assert(new __helpers.CSSHelp(document).getStyle('.small-text')); ``` -`.sm-text` 選擇器應該有一個 `font-size` 屬性設置爲 `0.85rem`。 +Your `.small-text` selector should have a `font-size` property set to `0.85rem`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.sm-text')?.fontSize === '0.85rem'); +assert(new __helpers.CSSHelp(document).getStyle('.small-text')?.fontSize === '0.85rem'); ``` # --seed-- @@ -32,26 +32,30 @@ assert(new __helpers.CSSHelp(document).getStyle('.sm-text')?.fontSize === '0.85r ```html - - - Nutrition Label - - - - -
                                                                  -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  -
                                                                  -
                                                                  -

                                                                  Amount per serving

                                                                  + + + + Nutrition Label + + + + + +
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  +
                                                                  +
                                                                  +
                                                                  +

                                                                  Amount per serving

                                                                  - +
                                                                  + ``` @@ -83,6 +87,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -94,15 +100,11 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5486b8fd4b71633f69b0.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5486b8fd4b71633f69b0.md index 094320de3d2..91855ad7f6b 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5486b8fd4b71633f69b0.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5486b8fd4b71633f69b0.md @@ -1,51 +1,50 @@ --- id: 615f5486b8fd4b71633f69b0 -title: 步驟 32 +title: Step 33 challengeType: 0 -dashedName: step-32 +dashedName: step-33 --- # --description-- -在 `.sm-text` 元素下方,使用文本 `Calories 230` 創建一個新的 `h1` 元素。 將文本的 `230` 部分包裹在 `span` 元素中,其中 `class` 設置爲 `right`。 +Below your `.small-text` element, create a new `p` element with the text `Calories`. Also below the `.left-container` element, create a new `span` element with the text `230`. # --hints-- -`.calories-info` 元素中應該有一個新的 `h1` 元素。 +You should have a new `p` element within your `.calories-info` element. ```js -assert(document.querySelector('.calories-info')?.querySelector('h1')) +assert(document.querySelector('.calories-info')?.querySelector('p')) ``` -`h1` 元素應該在 `.sm-text` 元素之後。 +You should have a new `span` element within your `.calories-info` element. ```js -assert(document.querySelector('.sm-text')?.nextElementSibling?.localName === 'h1'); +assert(document.querySelector('.calories-info')?.querySelector('span')) ``` -`h1` 元素應包含文本 `Calories 230`。 +Your `p` element should come after your `.small-text` element. ```js -// the float: right property does weird things to the inner text. -assert(document.querySelector('.calories-info')?.lastElementChild?.innerText.match(/Calories[\s|\n]*230/)); +assert(document.querySelector('.small-text')?.nextElementSibling?.localName === 'p'); ``` -應該在新的 `h1` 元素中創建一個 `span` 元素。 +Your `p` element should have the text `Calories`. ```js -assert(document.querySelector('.calories-info')?.lastElementChild?.querySelector('span')); +assert(document.querySelector('.left-container')?.lastElementChild?.innerText === 'Calories'); ``` -`span` 元素應該將 `class` 設置爲 `right`。 +Your `span` element should come after your `.left-container` element. ```js -assert(document.querySelector('.calories-info')?.lastElementChild?.querySelector('span')?.classList?.contains('right')); +assert(document.querySelector('.left-container')?.nextElementSibling?.localName ==='span'); ``` `span` 元素應包含文本 `230`。 ```js -assert(document.querySelector('.calories-info')?.lastElementChild?.querySelector('span')?.innerText === '230'); +assert(document.querySelector('.calories-info')?.lastElementChild?.innerText === '230'); ``` # --seed-- @@ -55,28 +54,32 @@ assert(document.querySelector('.calories-info')?.lastElementChild?.querySelector ```html - - - Nutrition Label - - - - -
                                                                  -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  -
                                                                  + + + + Nutrition Label + + + + + +
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

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

                                                                  Amount per serving

                                                                  +
                                                                  +
                                                                  +

                                                                  Amount per serving

                                                                  ---fcc-editable-region--
                                                                  - +--fcc-editable-region-- +
                                                                  + ``` @@ -108,6 +111,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -119,20 +124,20 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } + +.calories-info h2 { + margin: 0; +} ``` diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f575b50b91e72af079480.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f575b50b91e72af079480.md index fdb5992cacc..14f20ffb784 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f575b50b91e72af079480.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f575b50b91e72af079480.md @@ -1,29 +1,41 @@ --- id: 615f575b50b91e72af079480 -title: 步驟 33 +title: Step 35 challengeType: 0 -dashedName: step-33 +dashedName: step-35 --- # --description-- -創建一個新的 `.calories-info h1` 選擇器,將上下邊距設置爲 `-5px`,將左右邊距設置爲 `-2px`。 +Create a new `.left-container p` selector setting the top and bottom margin to `-5px`, and the left and right margin to `-2px`. Also set the `font-size` to `2em` and `font-weight` to `700`. # --hints-- -應該有一個新的 `.calories-info h1` 選擇器。 +You should have a new `.left-container p` selector. ```js -assert(new __helpers.CSSHelp(document).getStyle('.calories-info h1')); +assert(new __helpers.CSSHelp(document).getStyle('.left-container p')); ``` -新的 `.calories-info h1` 選擇器應將 `margin` 屬性設置爲 `-5px -2px`。 +Your new `.left-container p` selector should have a `margin` property set to `-5px -2px`. ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marginTop, '-5px'); -assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marginBottom, '-5px'); -assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marginLeft, '-2px'); -assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marginRight, '-2px'); +assert.equal(new __helpers.CSSHelp(document).getStyle('.left-container p')?.marginTop, '-5px'); +assert.equal(new __helpers.CSSHelp(document).getStyle('.left-container p')?.marginBottom, '-5px'); +assert.equal(new __helpers.CSSHelp(document).getStyle('.left-container p')?.marginLeft, '-2px'); +assert.equal(new __helpers.CSSHelp(document).getStyle('.left-container p')?.marginRight, '-2px'); +``` + +Your new `.left-container p` selector should have a `font-size` property set to `2em`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.left-container p')?.fontSize === '2em'); +``` + +Your new `.left-container p` selector should have a `font-weight` property set to `700`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.left-container p')?.fontWeight === '700'); ``` # --seed-- @@ -33,27 +45,32 @@ assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marg ```html - - - Nutrition Label - - - - -
                                                                  -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  -
                                                                  -
                                                                  -

                                                                  Amount per serving

                                                                  -

                                                                  Calories 230

                                                                  + + + + Nutrition Label + + + + + +
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  +
                                                                  +
                                                                  +
                                                                  +

                                                                  Amount per serving

                                                                  +

                                                                  Calories

                                                                  + 230
                                                                  - +
                                                                  + ``` @@ -85,6 +102,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -96,23 +115,29 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + --fcc-editable-region-- --fcc-editable-region-- diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5af373a68e744a3c5a76.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5af373a68e744a3c5a76.md index 1a6cabd2cbd..2c704e144e2 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5af373a68e744a3c5a76.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5af373a68e744a3c5a76.md @@ -1,13 +1,13 @@ --- id: 615f5af373a68e744a3c5a76 -title: 步驟 34 +title: Step 36 challengeType: 0 -dashedName: step-34 +dashedName: step-36 --- # --description-- -創建一個 `.calories-info span` 選擇器並將 `font-size` 設置爲 `1.2em`。 +Create a `.calories-info span` selector, set its `font-size` to `2.4em` and `font-weight` to `700`. # --hints-- @@ -17,10 +17,16 @@ dashedName: step-34 assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')); ``` -`.calories-info span` 選擇器應該將 `font-size` 屬性設置爲 `1.2em`。 +Your `.calories-info span` selector should have a `font-size` property set to `2.4em`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.fontSize === '1.2em'); +assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.fontSize === '2.4em'); +``` + +Your `.calories-info span` selector should have a `font-weight` property set to `700`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.fontWeight === '700'); ``` # --seed-- @@ -30,27 +36,32 @@ assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.fontSize ```html - - - Nutrition Label - - - - -
                                                                  -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  -
                                                                  -
                                                                  -

                                                                  Amount per serving

                                                                  -

                                                                  Calories 230

                                                                  + + + + Nutrition Label + + + + + +
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  +
                                                                  +
                                                                  +
                                                                  +

                                                                  Amount per serving

                                                                  +

                                                                  Calories

                                                                  + 230
                                                                  - +
                                                                  + ``` @@ -82,6 +93,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -93,25 +106,33 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; + font-size: 2em; + font-weight: 700; } --fcc-editable-region-- diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5fd85d0062761f288364.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5fd85d0062761f288364.md index c42c9c47919..2bfa47f0862 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5fd85d0062761f288364.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5fd85d0062761f288364.md @@ -1,22 +1,22 @@ --- id: 615f5fd85d0062761f288364 -title: 步驟 36 +title: Step 37 challengeType: 0 -dashedName: step-36 +dashedName: step-37 --- # --description-- 排版往往是藝術而非科學。 你可能需要調整對齊等內容,直到它看起來正確爲止。 -給 `.calories-info span` 選擇器一個 `margin-top` 設置爲 `-7px`。 這會將 `230` 文本移動到位。 +Give your `.calories-info span` selector a `margin` set to `-7px -2px`. 這會將 `230` 文本移動到位。 # --hints-- -`.calories-info span` 選擇器應將 `margin-top` 設置爲 `-7px`。 +Your `.calories-info span` selector should have a `margin` set to `-7px -2px`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.marginTop === '-7px'); +assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.margin === '-7px -2px'); ``` # --seed-- @@ -26,27 +26,32 @@ assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.marginTo ```html - - - Nutrition Label - - - - -
                                                                  -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  -
                                                                  -
                                                                  -

                                                                  Amount per serving

                                                                  -

                                                                  Calories 230

                                                                  + + + + Nutrition Label + + + + + +
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  +
                                                                  +
                                                                  +
                                                                  +

                                                                  Amount per serving

                                                                  +

                                                                  Calories

                                                                  + 230
                                                                  - +
                                                                  + ``` @@ -78,6 +83,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -89,31 +96,39 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } --fcc-editable-region-- .calories-info span { - font-size: 1.2em; + font-size: 2.4em; + font-weight: 700; } --fcc-editable-region-- ``` diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f61338c8ca176d6445574.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f61338c8ca176d6445574.md index 219145c73b8..2ea3ac3d3a2 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f61338c8ca176d6445574.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f61338c8ca176d6445574.md @@ -1,13 +1,13 @@ --- id: 615f61338c8ca176d6445574 -title: 步驟 37 +title: Step 38 challengeType: 0 -dashedName: step-37 +dashedName: step-38 --- # --description-- -在 `.calories-info` 元素下方,添加一個 `div`,並將 `class` 屬性設置爲 `divider md`。 +Below your `.calories-info` element, add a `div` with the `class` attribute set to `divider medium`. # --hints-- @@ -17,11 +17,11 @@ dashedName: step-37 assert(document.querySelectorAll('.label > div')?.length === 3) ``` -新的 `div` 應該將 `class` 屬性設置爲 `divider md`。 這個 div 應該是 `.label` 元素中的最後一個元素。 +Your new `div` should have the `class` attribute set to `divider medium`. 這個 div 應該是 `.label` 元素中的最後一個元素。 ```js const div = document.querySelector('.label')?.lastElementChild; -assert(div?.classList?.contains('divider') && div?.classList?.contains('md')); +assert(div?.classList?.contains('divider') && div?.classList?.contains('medium')); ``` # --seed-- @@ -31,30 +31,35 @@ assert(div?.classList?.contains('divider') && div?.classList?.contains('md')); ```html - - - Nutrition Label - - - - -
                                                                  -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  -
                                                                  -
                                                                  -

                                                                  Amount per serving

                                                                  -

                                                                  Calories 230

                                                                  + + + + Nutrition Label + + + + + +
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  +
                                                                  +
                                                                  +
                                                                  +

                                                                  Amount per serving

                                                                  +

                                                                  Calories

                                                                  + 230 +
                                                                  --fcc-editable-region-- --fcc-editable-region-- -
                                                                  - +
                                                                  + ``` @@ -86,6 +91,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -97,30 +104,38 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; } ``` diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f666ac5edea782feb7e75.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f666ac5edea782feb7e75.md index 25cc2575b77..f074a2cf764 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f666ac5edea782feb7e75.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f666ac5edea782feb7e75.md @@ -1,26 +1,26 @@ --- id: 615f666ac5edea782feb7e75 -title: 步驟 38 +title: Step 39 challengeType: 0 -dashedName: step-38 +dashedName: step-39 --- # --description-- -創建一個 `.md` 選擇器併爲其賦予 `height` 屬性爲 `5px`。 +Create an `.medium` selector and give it a `height` property of `5px`. # --hints-- -應該創建一個 `.md` 選擇器。 +You should create an `.medium` selector. ```js -assert(new __helpers.CSSHelp(document).getStyle('.md')); +assert(new __helpers.CSSHelp(document).getStyle('.medium')); ``` -`.md` 選擇器應該將 `height` 屬性設置爲 `5px`。 +Your `.medium` selector should have a `height` property set to `5px`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.md')?.height === '5px'); +assert(new __helpers.CSSHelp(document).getStyle('.medium')?.height === '5px'); ``` # --seed-- @@ -30,28 +30,33 @@ assert(new __helpers.CSSHelp(document).getStyle('.md')?.height === '5px'); ```html - - - Nutrition Label - - - - -
                                                                  -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  -
                                                                  -
                                                                  -

                                                                  Amount per serving

                                                                  -

                                                                  Calories 230

                                                                  + + + + Nutrition Label + + + + + +
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  +
                                                                  +
                                                                  +
                                                                  +

                                                                  Amount per serving

                                                                  +

                                                                  Calories

                                                                  -
                                                                  + 230
                                                                  - +
                                                                  +
                                                                  + ``` @@ -83,6 +88,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -94,15 +101,11 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } @@ -111,17 +114,29 @@ p { --fcc-editable-region-- -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; } ``` diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f671b6d1919792745aa5d.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f671b6d1919792745aa5d.md index 8837a875a35..94ddfb4474b 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f671b6d1919792745aa5d.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f671b6d1919792745aa5d.md @@ -1,29 +1,29 @@ --- id: 615f671b6d1919792745aa5d -title: 步驟 39 +title: Step 40 challengeType: 0 -dashedName: step-39 +dashedName: step-40 --- # --description-- -在 `.md` 元素下創建一個新的 `div` 元素。 給它一個 `class` 屬性設置爲 `daily-value sm-text`。 在這個新的 `div` 中,添加帶有文本 `% Daily Value *` 的 `p` 元素,並設置 `class` 屬性 `right bold`。 +Create a new `div` element below your `.medium` element. Give it a `class` attribute set to `daily-value small-text`. Within this new `div`, add a `p` element with the text `% Daily Value *`, and set the `class` attribute to `bold right`. # --hints-- -應該在 `.md` 元素之後創建一個新的 `div` 元素。 +You should create a new `div` element after your `.medium` element. ```js assert(document.querySelector('.label')?.lastElementChild?.localName === 'div'); assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('divider')); -assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('md')); +assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('medium')); ``` -新的 `div` 應該有一個 `class` 屬性設置爲 `daily-value sm-text`。 +Your new `div` should have a `class` attribute set to `daily-value small-text`. ```js assert(document.querySelector('.label')?.lastElementChild?.classList?.contains('daily-value')); -assert(document.querySelector('.label')?.lastElementChild?.classList?.contains('sm-text')); +assert(document.querySelector('.label')?.lastElementChild?.classList?.contains('small-text')); ``` 新的 `div` 元素應該有一個 `p` 元素。 @@ -38,11 +38,11 @@ assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.lo assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.textContent === '% Daily Value *'); ``` -新的 `p` 元素應該有一個 `class` 屬性設置爲 `right bold`。 +Your new `p` element should have a `class` attribute set to `bold right`. ```js -assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.classList?.contains('right')); assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.classList?.contains('right')); ``` # --seed-- @@ -52,32 +52,36 @@ assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.cl ```html - - - Nutrition Label - - - - -
                                                                  -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  -
                                                                  -
                                                                  -

                                                                  Amount per serving

                                                                  -

                                                                  Calories 230

                                                                  -
                                                                  -
                                                                  ---fcc-editable-region-- ---fcc-editable-region-- + + + Nutrition Label + + + + + +
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  +
                                                                  +
                                                                  +
                                                                  +

                                                                  Amount per serving

                                                                  +

                                                                  Calories

                                                                  + 230
                                                                  - + --fcc-editable-region-- +
                                                                  + + --fcc-editable-region-- +
                                                                  + ``` @@ -109,6 +113,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -120,34 +126,42 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; } ``` diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6823d0815b7a991f2a75.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6823d0815b7a991f2a75.md index d00acf73b8f..94a17c3f977 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6823d0815b7a991f2a75.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6823d0815b7a991f2a75.md @@ -1,32 +1,32 @@ --- id: 615f6823d0815b7a991f2a75 -title: 步驟 40 +title: Step 42 challengeType: 0 -dashedName: step-40 +dashedName: step-42 --- # --description-- -`float` 樣式導致新的 `p` 元素位於標籤邊框之外。 以現有的 `.divider` 元素爲例,在 `p` 元素之後添加新的分隔符。 +Use your existing `.divider` element as an example to add a new divider after the `p` element. # --hints-- -應該在 `.daily-value.sm-text` 元素中創建一個新的 `div`。 +You should create a new `div` within your `.daily-value` element. ```js -assert(document.querySelectorAll('.daily-value.sm-text > div')?.length === 1) +assert(document.querySelectorAll('.daily-value.small-text > div')?.length === 1) ``` 新的 `div` 應該將 `class` 屬性設置爲 `divider`。 ```js -assert(document.querySelector('.daily-value.sm-text > div')?.classList?.contains('divider')) +assert(document.querySelector('.daily-value.small-text > div')?.classList?.contains('divider')) ``` 新的 `div` 應該在 `p` 元素之後。 ```js -assert(document.querySelector('.daily-value.sm-text > div')?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text > div')?.previousElementSibling?.localName === 'p'); ``` # --seed-- @@ -36,34 +36,38 @@ assert(document.querySelector('.daily-value.sm-text > div')?.previousElementSibl ```html - - - Nutrition Label - - - - -
                                                                  -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  -
                                                                  -
                                                                  -

                                                                  Amount per serving

                                                                  -

                                                                  Calories 230

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

                                                                  % Daily Value *

                                                                  + + + Nutrition Label + + + + + +
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  +
                                                                  +
                                                                  +
                                                                  +

                                                                  Amount per serving

                                                                  +

                                                                  Calories

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

                                                                  % Daily Value *

                                                                  +
                                                                  + --fcc-editable-region-- +
                                                                  + ``` @@ -95,6 +99,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -106,34 +112,46 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } ``` diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6b2d164f81809efd9bdc.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6b2d164f81809efd9bdc.md index 971c1cf7456..626bbc32457 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6b2d164f81809efd9bdc.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6b2d164f81809efd9bdc.md @@ -1,56 +1,62 @@ --- id: 615f6b2d164f81809efd9bdc -title: 步驟 42 +title: Step 43 challengeType: 0 -dashedName: step-42 +dashedName: step-43 --- # --description-- -在最後一個 `.divider` 元素之後,創建一個 `p` 元素併爲其指定文本 `Total Fat 8g 10%`。 將 `Total Fat` 包裹在 `span` 元素中,並將 `class` 設置爲 `bold`。 將 `10%` 包裹在另一個 `span` 元素中,並將 `class` 設置爲 `bold right`。 +在最後一個 `.divider` 元素之後,創建一個 `p` 元素併爲其指定文本 `Total Fat 8g 10%`。 將 `Total Fat` 包裹在 `span` 元素中,並將 `class` 設置爲 `bold`。 Wrap `10%` in another `span` element with the `class` set to `bold`. Also wrap the words `Total Fat 8g` in an additional `span` element for alignment. # --hints-- 應該在 `.daily-value` 元素的末尾創建一個新的 `p` 元素。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` 新的 `p` 元素應包含文本 `Total Fat 8g 10%`。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Total Fat 8g[\s|\n]+10%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Total Fat[\s|\n]+8g[\s|\n]+10%/)); ``` -`p` 元素應該有兩個 `span` 元素。 +Your `p` element should have three `span` elements. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 2); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 3); ``` -第一個 `span` 元素應該包含文本 `Total Fat`。 +One `span` element should wrap the text `Total Fat`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.innerText === 'Total Fat'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span > span')?.innerText === 'Total Fat'); ``` -第一個 `span` 元素應該將 `class` 設置爲 `bold`。 +The `span` element around `Total Fat` should have the `class` set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.className === 'bold'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span > span')?.className === 'bold'); ``` -第二個 `span` 元素應該包含文本 `10%`。 +A `span` element should wrap the text `10%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.[1]?.innerText === '10%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span + span')?.innerText === '10%'); ``` -第二個 `span` 元素應該將 `class` 設置爲 `bold right`。 +The `span` element around `10%` should have the `class` set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.[1]?.className === 'bold right'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.[1]?.className === 'bold'); +``` + +A `span` element should have the text `Total Fat 8g`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Total Fat[\s|\n]+8g/)); ``` # --seed-- @@ -60,35 +66,39 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySe ```html - - - Nutrition Label - - - - -
                                                                  -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  -
                                                                  -
                                                                  -

                                                                  Amount per serving

                                                                  -

                                                                  Calories 230

                                                                  -
                                                                  -
                                                                  -
                                                                  -

                                                                  % Daily Value *

                                                                  -
                                                                  ---fcc-editable-region-- ---fcc-editable-region-- + + + Nutrition Label + + + + + +
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  +
                                                                  +
                                                                  +
                                                                  +

                                                                  Amount per serving

                                                                  +

                                                                  Calories

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

                                                                  % Daily Value *

                                                                  +
                                                                  +
                                                                  + --fcc-editable-region-- +
                                                                  + ``` @@ -120,46 +130,59 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } ``` diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6cc778f7698258467596.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6cc778f7698258467596.md index bfa02cf3be5..04d4497b806 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6cc778f7698258467596.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6cc778f7698258467596.md @@ -1,46 +1,45 @@ --- id: 615f6cc778f7698258467596 -title: 步驟 43 +title: Step 44 challengeType: 0 -dashedName: step-43 +dashedName: step-44 --- # --description-- -在帶有 `Total Fat` 文本的元素下方,使用文本 `Saturated Fat 1g 5%` 創建一個新的 `p` 元素。 將 `5%` 包裹在 `span` 中,並將 `class` 屬性設置爲 `bold right`。 +在帶有 `Total Fat` 文本的元素下方,使用文本 `Saturated Fat 1g 5%` 創建一個新的 `p` 元素。 Wrap the `5%` in a `span` with the `class` attribute set to `bold`. In this case this is enough to align the percentage to `5%`. # --hints-- 應該使用 `Total Fat` 文本在元素下方創建一個新的 `p` 元素。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.innerText.match(/Total Fat 8g\s*10%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.innerText.match(/Total Fat 8g\s*10%/)); ``` 新 `p` 元素應包含文本 `Saturated Fat 1g 5%`。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText.match(/Saturated Fat 1g\s*5%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText.match(/Saturated Fat 1g\s*5%/)); ``` 新 `p` 元素應該有一個 `span` 元素。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.localName === 'span'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.localName === 'span'); ``` -`span` 元素應該將 `class` 屬性設置爲 `bold right`。 +Your `span` element should have the `class` attribute set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); ``` `span` 元素應該包含 `5%` 文本。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.innerText === "5%"); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === "5%"); ``` # --seed-- @@ -50,36 +49,40 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastEle ```html - - - Nutrition Label - - - - -
                                                                  -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  -
                                                                  -
                                                                  -

                                                                  Amount per serving

                                                                  -

                                                                  Calories 230

                                                                  -
                                                                  -
                                                                  -
                                                                  -

                                                                  % Daily Value *

                                                                  -
                                                                  -

                                                                  Total Fat 8g10%

                                                                  ---fcc-editable-region-- ---fcc-editable-region-- + + + Nutrition Label + + + + + +
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  +
                                                                  +
                                                                  +
                                                                  +

                                                                  Amount per serving

                                                                  +

                                                                  Calories

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

                                                                  % Daily Value *

                                                                  +
                                                                  +

                                                                  Total Fat 8g 10%

                                                                  +
                                                                  + --fcc-editable-region-- +
                                                                  + ``` @@ -111,46 +114,59 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } ``` diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6fddaac1e083502d3e6a.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6fddaac1e083502d3e6a.md index fbc8dcf2a6a..652da1dd958 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6fddaac1e083502d3e6a.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6fddaac1e083502d3e6a.md @@ -1,8 +1,8 @@ --- id: 615f6fddaac1e083502d3e6a -title: 步驟 44 +title: Step 45 challengeType: 0 -dashedName: step-44 +dashedName: step-45 --- # --description-- @@ -14,7 +14,7 @@ dashedName: step-44 帶有文本 `Saturated Fat 1g 5%` 的 `p` 元素應該將 `class` 屬性設置爲 `indent`。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('indent')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('indent')); ``` # --seed-- @@ -24,36 +24,41 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                  -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  -
                                                                  -
                                                                  -

                                                                  Amount per serving

                                                                  -

                                                                  Calories 230

                                                                  -
                                                                  -
                                                                  -
                                                                  -

                                                                  % Daily Value *

                                                                  -
                                                                  -

                                                                  Total Fat 8g10%

                                                                  ---fcc-editable-region-- -

                                                                  Saturated Fat 1g 5%

                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  +
                                                                  +
                                                                  +
                                                                  +

                                                                  Amount per serving

                                                                  +

                                                                  Calories

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

                                                                  % Daily Value *

                                                                  +
                                                                  +

                                                                  Total Fat 8g 10%

                                                                  +

                                                                  Saturated Fat 1g 5%

                                                                  +
                                                                  + --fcc-editable-region-- +
                                                                  + ``` @@ -85,46 +90,59 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } ``` diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f70077a4ff98424236c1e.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f70077a4ff98424236c1e.md index e72db547a58..7bf5dc8a19c 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f70077a4ff98424236c1e.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f70077a4ff98424236c1e.md @@ -1,8 +1,8 @@ --- id: 615f70077a4ff98424236c1e -title: 步驟 45 +title: Step 46 challengeType: 0 -dashedName: step-45 +dashedName: step-46 --- # --description-- @@ -30,34 +30,39 @@ assert(new __helpers.CSSHelp(document).getStyle('.indent')?.marginLeft === '1em' ```html - - - Nutrition Label - - - - -
                                                                  -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  -
                                                                  -
                                                                  -

                                                                  Amount per serving

                                                                  -

                                                                  Calories 230

                                                                  -
                                                                  -
                                                                  -
                                                                  -

                                                                  % Daily Value *

                                                                  -
                                                                  -

                                                                  Total Fat 8g10%

                                                                  -

                                                                  Saturated Fat 1g 5%

                                                                  + + + + Nutrition Label + + + + + +
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  +
                                                                  +
                                                                  +
                                                                  +

                                                                  Amount per serving

                                                                  +

                                                                  Calories

                                                                  + 230
                                                                  - +
                                                                  +
                                                                  +

                                                                  % Daily Value *

                                                                  +
                                                                  +

                                                                  Total Fat 8g 10%

                                                                  +

                                                                  Saturated Fat 1g 5%

                                                                  +
                                                                  +
                                                                  + ``` @@ -89,47 +94,60 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } --fcc-editable-region-- diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f72a872354a850d4f533e.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f72a872354a850d4f533e.md index f6daaec761b..1d9721bc361 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f72a872354a850d4f533e.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f72a872354a850d4f533e.md @@ -1,8 +1,8 @@ --- id: 615f72a872354a850d4f533e -title: 步驟 46 +title: Step 47 challengeType: 0 -dashedName: step-46 +dashedName: step-47 --- # --description-- @@ -30,34 +30,39 @@ assert(new __helpers.CSSHelp(document).getStyle('.daily-value p')?.borderBottom ```html - - - Nutrition Label - - - - -
                                                                  -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  -
                                                                  -
                                                                  -

                                                                  Amount per serving

                                                                  -

                                                                  Calories 230

                                                                  -
                                                                  -
                                                                  -
                                                                  -

                                                                  % Daily Value *

                                                                  -
                                                                  -

                                                                  Total Fat 8g10%

                                                                  -

                                                                  Saturated Fat 1g 5%

                                                                  + + + + Nutrition Label + + + + + +
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  +
                                                                  +
                                                                  +
                                                                  +

                                                                  Amount per serving

                                                                  +

                                                                  Calories

                                                                  + 230
                                                                  - +
                                                                  +
                                                                  +

                                                                  % Daily Value *

                                                                  +
                                                                  +

                                                                  Total Fat 8g 10%

                                                                  +

                                                                  Saturated Fat 1g 5%

                                                                  +
                                                                  +
                                                                  + ``` @@ -89,47 +94,60 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f74a71f1e498619e38ee8.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f74a71f1e498619e38ee8.md index 288a53ab535..746a171b5d8 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f74a71f1e498619e38ee8.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f74a71f1e498619e38ee8.md @@ -1,8 +1,8 @@ --- id: 615f74a71f1e498619e38ee8 -title: 步驟 47 +title: Step 48 challengeType: 0 -dashedName: step-47 +dashedName: step-48 --- # --description-- @@ -14,16 +14,15 @@ dashedName: step-47 帶有文本 `% Daily Value *` 的 `p` 元素應該將 `no-divider` 添加到 `class` 屬性中。 不要刪除現有的類。 ```js -const p = document.querySelector('.daily-value.sm-text')?.firstElementChild; +const p = document.querySelector('.daily-value.small-text')?.firstElementChild; assert(p?.classList?.contains('no-divider')); assert(p?.classList?.contains('bold')); -assert(p?.classList?.contains('right')); ``` 帶有文本 `Saturated Fat 1g 5%` 的 `p` 元素應該將 `no-divider` 添加到 `class` 屬性中。 不要刪除現有的類。 ```js -const p = document.querySelector('.daily-value.sm-text')?.lastElementChild; +const p = document.querySelector('.daily-value.small-text')?.lastElementChild; assert(p?.classList?.contains('no-divider')); assert(p?.classList?.contains('indent')); ``` @@ -35,36 +34,41 @@ assert(p?.classList?.contains('indent')); ```html - - - Nutrition Label - - - - -
                                                                  -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  -
                                                                  -
                                                                  -

                                                                  Amount per serving

                                                                  -

                                                                  Calories 230

                                                                  + + + + Nutrition Label + + + + + +
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  +
                                                                  +
                                                                  +
                                                                  +

                                                                  Amount per serving

                                                                  +

                                                                  Calories

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

                                                                  % Daily Value *

                                                                  -
                                                                  -

                                                                  Total Fat 8g10%

                                                                  -

                                                                  Saturated Fat 1g 5%

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

                                                                  % Daily Value *

                                                                  +
                                                                  +

                                                                  Total Fat 8g 10%

                                                                  +

                                                                  Saturated Fat 1g 5%

                                                                  +
                                                                  + --fcc-editable-region-- +
                                                                  + ``` @@ -96,47 +100,60 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ad94380408d971d14f6.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ad94380408d971d14f6.md index bbc9265a9f3..805fb174c68 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ad94380408d971d14f6.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ad94380408d971d14f6.md @@ -1,8 +1,8 @@ --- id: 615f7ad94380408d971d14f6 -title: 步驟 48 +title: Step 49 challengeType: 0 -dashedName: step-48 +dashedName: step-49 --- # --description-- @@ -44,37 +44,43 @@ assert(style?.borderBottom === '1px solid rgb(136, 137, 137)'); ## --seed-contents-- + ```html - - - Nutrition Label - - - - -
                                                                  -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  -
                                                                  -
                                                                  -

                                                                  Amount per serving

                                                                  -

                                                                  Calories 230

                                                                  -
                                                                  -
                                                                  -
                                                                  -

                                                                  % Daily Value *

                                                                  -
                                                                  -

                                                                  Total Fat 8g10%

                                                                  -

                                                                  Saturated Fat 1g 5%

                                                                  + + + + Nutrition Label + + + + + +
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  +
                                                                  +
                                                                  +
                                                                  +

                                                                  Amount per serving

                                                                  +

                                                                  Calories

                                                                  + 230
                                                                  - +
                                                                  +
                                                                  +

                                                                  % Daily Value *

                                                                  +
                                                                  +

                                                                  Total Fat 8g 10%

                                                                  +

                                                                  Saturated Fat 1g 5%

                                                                  +
                                                                  +
                                                                  + ``` @@ -106,47 +112,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7bc680f7168ea01ebf99.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7bc680f7168ea01ebf99.md index 480cbbb1568..26aa39c949b 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7bc680f7168ea01ebf99.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7bc680f7168ea01ebf99.md @@ -1,8 +1,8 @@ --- id: 615f7bc680f7168ea01ebf99 -title: 步驟 49 +title: Step 50 challengeType: 0 -dashedName: step-49 +dashedName: step-50 --- # --description-- @@ -13,16 +13,16 @@ dashedName: step-49 # --hints-- -應該在 `.daily-value.sm-text` 元素的末尾創建一個新的 `div`。 +You should create a new `div` at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` 新的 `div` 應該將 `class` 屬性設置爲 `divider`。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -32,36 +32,41 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                  -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  -
                                                                  -
                                                                  -

                                                                  Amount per serving

                                                                  -

                                                                  Calories 230

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

                                                                  % Daily Value *

                                                                  -
                                                                  -

                                                                  Total Fat 8g10%

                                                                  -

                                                                  Saturated Fat 1g 5%

                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  +
                                                                  +
                                                                  +
                                                                  +

                                                                  Amount per serving

                                                                  +

                                                                  Calories

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

                                                                  % Daily Value *

                                                                  +
                                                                  +

                                                                  Total Fat 8g 10%

                                                                  +

                                                                  Saturated Fat 1g 5%

                                                                  +
                                                                  + --fcc-editable-region-- +
                                                                  + ``` @@ -93,47 +98,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7c71eab8218f846e4503.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7c71eab8218f846e4503.md index 443e30a8303..9ebce95ba41 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7c71eab8218f846e4503.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7c71eab8218f846e4503.md @@ -1,32 +1,32 @@ --- id: 615f7c71eab8218f846e4503 -title: 步驟 50 +title: Step 51 challengeType: 0 -dashedName: step-50 +dashedName: step-51 --- # --description-- -在最後一個 `.divider` 之後,創建另一個 `p` 元素,其中包含文本 `Trans Fat 0g`。 通過將單詞 `Trans` 包裝在 `i` 元素中,將其變爲斜體。 給新的 `p` 元素的 `class` 屬性設置爲 `indent no-divider`。 +在最後一個 `.divider` 之後,創建另一個 `p` 元素,其中包含文本 `Trans Fat 0g`。 通過將單詞 `Trans` 包裝在 `i` 元素中,將其變爲斜體。 給新的 `p` 元素的 `class` 屬性設置爲 `indent no-divider`。 Wrap `Trans Fat 0g` in a `span` element for alignment. # --hints-- -應該在 `.daily-value.sm-text` 元素的末尾創建一個新的 `p` 元素。 +You should create a new `p` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` 新 `p` 元素應該包含文本 `Trans Fat 0g`。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText === 'Trans Fat 0g'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText === 'Trans Fat 0g'); ``` 新的 `p` 元素應該將 `class` 屬性設置爲 `indent no-divider`。 ```js -const p = document.querySelector('.daily-value.sm-text')?.lastElementChild; +const p = document.querySelector('.daily-value.small-text')?.lastElementChild; assert(p?.classList?.contains('indent')); assert(p?.classList?.contains('no-divider')); ``` @@ -34,13 +34,25 @@ assert(p?.classList?.contains('no-divider')); 新的 `p` 元素應該有一個 `i` 元素。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.localName === 'i'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('i')); ``` `i` 元素應該包含文本 `Trans`。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.innerText === 'Trans'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('i')?.innerText === 'Trans'); +``` + +Your new `p` element should have a `span` element. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span')); +``` + +Your `span` element should wrap the text `Trans Fat 0g`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span')?.innerText?.match(/Trans[\s|\n]+Fat 0g/)); ``` # --seed-- @@ -50,37 +62,42 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstEl ```html - - - Nutrition Label - - - - -
                                                                  -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  -
                                                                  -
                                                                  -

                                                                  Amount per serving

                                                                  -

                                                                  Calories 230

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

                                                                  % Daily Value *

                                                                  -
                                                                  -

                                                                  Total Fat 8g10%

                                                                  -

                                                                  Saturated Fat 1g 5%

                                                                  -
                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  +
                                                                  +
                                                                  +
                                                                  +

                                                                  Amount per serving

                                                                  +

                                                                  Calories

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

                                                                  % Daily Value *

                                                                  +
                                                                  +

                                                                  Total Fat 8g 10%

                                                                  +

                                                                  Saturated Fat 1g 5%

                                                                  +
                                                                  +
                                                                  + --fcc-editable-region-- +
                                                                  + ``` @@ -112,47 +129,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7d489a581590d1350288.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7d489a581590d1350288.md index a23d5df6774..9fc1c5474f9 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7d489a581590d1350288.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7d489a581590d1350288.md @@ -1,8 +1,8 @@ --- id: 615f7d489a581590d1350288 -title: 步驟 51 +title: Step 52 challengeType: 0 -dashedName: step-51 +dashedName: step-52 --- # --description-- @@ -11,16 +11,16 @@ dashedName: step-51 # --hints-- -應該在 `.daily-value.sm-text` 元素的末尾創建一個新的 `div` 元素。 +You should create a new `div` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` 新的 `div` 元素應該將 `class` 屬性設置爲 `divider`。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -30,38 +30,43 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                  -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  -
                                                                  -
                                                                  -

                                                                  Amount per serving

                                                                  -

                                                                  Calories 230

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

                                                                  % Daily Value *

                                                                  -
                                                                  -

                                                                  Total Fat 8g10%

                                                                  -

                                                                  Saturated Fat 1g 5%

                                                                  -
                                                                  -

                                                                  Trans Fat 0g

                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  +
                                                                  +
                                                                  +
                                                                  +

                                                                  Amount per serving

                                                                  +

                                                                  Calories

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

                                                                  % Daily Value *

                                                                  +
                                                                  +

                                                                  Total Fat 8g 10%

                                                                  +

                                                                  Saturated Fat 1g 5%

                                                                  +
                                                                  +

                                                                  Trans Fat 0g

                                                                  +
                                                                  + --fcc-editable-region-- +
                                                                  + ``` @@ -93,47 +98,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7de4487b64919bb4aa5e.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7de4487b64919bb4aa5e.md index 3ed89aa93fc..a2deafd7358 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7de4487b64919bb4aa5e.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7de4487b64919bb4aa5e.md @@ -1,57 +1,62 @@ --- id: 615f7de4487b64919bb4aa5e -title: 步驟 52 +title: Step 53 challengeType: 0 -dashedName: step-52 +dashedName: step-53 --- # --description-- -在最後一個 `.divider` 之後,使用文本 `Cholesterol 0mg 0%` 創建一個新的 `p` 元素。 將文本 `Cholesterol` 包裹在 `span` 元素中,並將 `span` 元素的 `class` 屬性設置爲 `bold`。 將文本 `0%` 包裹在另一個 `span` 元素中,並將 `class` 設置爲 `bold right`。 +在最後一個 `.divider` 之後,使用文本 `Cholesterol 0mg 0%` 創建一個新的 `p` 元素。 將文本 `Cholesterol` 包裹在 `span` 元素中,並將 `span` 元素的 `class` 屬性設置爲 `bold`。 Wrap the text `0%` in another `span` element, with the `class` set to `bold`. Also wrap `Cholesterol 0mg` in an additional `span` element for the alignment. # --hints-- -應該在 `.daily-value.sm-text` 元素的末尾創建一個新的 `p` 元素。 +You should create a new `p` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` 新的 `p` 元素應包含文本 `Cholesterol 0mg 0%`。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Cholesterol 0mg[\s|\n]+0%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Cholesterol[\s|\n]+0mg[\s|\n]+0%/)); ``` -新的 `p` 元素應該有兩個 `span` 元素。 +Your new `p` element should have three `span` elements. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 2); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 3); ``` -第一個 `span` 元素應該將 `class` 屬性設置爲 `bold`。 +Your first `span` `Cholesterol` element should have the `class` attribute set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.classList?.contains('bold')); ``` -第一個 `span` 元素應該包含文本 `Cholesterol`。 +Your first `span` element should wrap the text `Cholesterol 0mg`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.innerText === 'Cholesterol'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.innerText?.match(/Cholesterol[\s|\n]+0mg/)); ``` -第二個 `span` 元素應該將 `class` 屬性設置爲 `bold right`。 +Your first `span` element should wrap the text `Cholesterol`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.innerText === 'Cholesterol'); ``` -第二個 `span` 元素應該包含文本 `0%`。 +Your second `span` element should have the `class` attribute set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.innerText === '0%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); +``` + +Your second `span` element should wrap the text `0%`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === '0%'); ``` # --seed-- @@ -61,39 +66,44 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastEle ```html - - - Nutrition Label - - - - -
                                                                  -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  -
                                                                  -
                                                                  -

                                                                  Amount per serving

                                                                  -

                                                                  Calories 230

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

                                                                  % Daily Value *

                                                                  -
                                                                  -

                                                                  Total Fat 8g10%

                                                                  -

                                                                  Saturated Fat 1g 5%

                                                                  -
                                                                  -

                                                                  Trans Fat 0g

                                                                  -
                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  +
                                                                  +
                                                                  +
                                                                  +

                                                                  Amount per serving

                                                                  +

                                                                  Calories

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

                                                                  % Daily Value *

                                                                  +
                                                                  +

                                                                  Total Fat 8g 10%

                                                                  +

                                                                  Saturated Fat 1g 5%

                                                                  +
                                                                  +

                                                                  Trans Fat 0g

                                                                  +
                                                                  +
                                                                  + --fcc-editable-region-- +
                                                                  + ``` @@ -125,47 +135,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7e7281626a92bbd62da8.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7e7281626a92bbd62da8.md index 84889f3b031..80029a1efe8 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7e7281626a92bbd62da8.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7e7281626a92bbd62da8.md @@ -1,57 +1,62 @@ --- id: 615f7e7281626a92bbd62da8 -title: 步驟 53 +title: Step 54 challengeType: 0 -dashedName: step-53 +dashedName: step-54 --- # --description-- -在最後一個 `p` 元素下方,使用文本 `Sodium 160mg 7%` 創建另一個 `p` 元素。 將文本 `Sodium` 包裹在 `span` 元素中,並將 `class` 屬性設置爲 `bold`。 將 `7%` 文本包裹在另一個 `span` 元素中,其中 `class` 設置爲 `bold right`。 +在最後一個 `p` 元素下方,使用文本 `Sodium 160mg 7%` 創建另一個 `p` 元素。 將文本 `Sodium` 包裹在 `span` 元素中,並將 `class` 屬性設置爲 `bold`。 Wrap the `7%` text in another `span` element with the `class` set to `bold`. Also add an additional `span` element around `Sodium 160mg` for aligning it correctly. # --hints-- -應該在 `.daily-value.sm-text` 元素的末尾創建一個新的 `p` 元素。 +You should create a new `p` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` 新的 `p` 元素應包含文本 `Sodium 160mg 7%`。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Sodium 160mg[\s|\n]+7%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Sodium[\s|\n]160mg[\s|\n]+7%/)); ``` -新的 `p` 元素應該有兩個 `span` 元素。 +Your new `p` element should have three `span` elements. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 2); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 3); ``` -第一個 `span` 元素應該將 `class` 屬性設置爲 `bold`。 +A `span` element should wrap the text `Sodium 360mg`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.innerText?.match(/Sodium[\s|\n]160mg/)); ``` -第一個 `span` 元素應該包含文本 `Sodium`。 +A `span` element should wrap the text `Sodium`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.innerText === 'Sodium'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.innerText === "Sodium"); ``` -第二個 `span` 元素應該將 `class` 屬性設置爲 `bold right`。 +The `span` around `Sodium` should have the `class` attribute set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.classList?.contains('bold')); ``` -第二個 `span` 元素應該包含文本 `7%`。 +A `span` element should wrap the text `7%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.innerText === '7%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === '7%'); +``` + +The `span` element around `7%` should have the `class` attribute set to `bold`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); ``` # --seed-- @@ -61,40 +66,45 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastEle ```html - - - Nutrition Label - - - - -
                                                                  -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  -
                                                                  -
                                                                  -

                                                                  Amount per serving

                                                                  -

                                                                  Calories 230

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

                                                                  % Daily Value *

                                                                  -
                                                                  -

                                                                  Total Fat 8g10%

                                                                  -

                                                                  Saturated Fat 1g 5%

                                                                  -
                                                                  -

                                                                  Trans Fat 0g

                                                                  -
                                                                  -

                                                                  Cholesterol 0mg 0%

                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  +
                                                                  +
                                                                  +
                                                                  +

                                                                  Amount per serving

                                                                  +

                                                                  Calories

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

                                                                  % Daily Value *

                                                                  +
                                                                  +

                                                                  Total Fat 8g 10%

                                                                  +

                                                                  Saturated Fat 1g 5%

                                                                  +
                                                                  +

                                                                  Trans Fat 0g

                                                                  +
                                                                  +

                                                                  Cholesterol 0mg 0%

                                                                  +
                                                                  + --fcc-editable-region-- +
                                                                  + ``` @@ -126,47 +136,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ecb09de9a938ef94756.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ecb09de9a938ef94756.md index 3f4eac30967..3add8f85d7e 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ecb09de9a938ef94756.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ecb09de9a938ef94756.md @@ -1,57 +1,68 @@ --- id: 615f7ecb09de9a938ef94756 -title: 步驟 54 +title: Step 55 challengeType: 0 -dashedName: step-54 +dashedName: step-55 --- # --description-- -添加另一個 `p` 元素,其文本爲 `Total Carbohydrate 37g 13%`。 像以前一樣,使用 `span` 元素使文本 `Total Carbohydrate` 加粗,文本 `13%` 加粗並右對齊。 +添加另一個 `p` 元素,其文本爲 `Total Carbohydrate 37g 13%`。 Like before, use `span` elements to make the text `Total Carbohydrate` and `13%` bold. Also add an additional `span` element to wrap the `Total Carbohydrate 37g` text in a span element so to have it aligned to the left, and `13%` to the right. # --hints-- -應該在 `.daily-value.sm-text` 元素的末尾創建一個新的 `p` 元素。 +You should create a new `p` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` 新的 `p` 元素應包含文本 `Total Carbohydrate 37g 13%`。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Total Carbohydrate 37g[\s|\n]+13%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Total Carbohydrate[\s|\n]+37g[\s|\n]+13%/)); ``` -新的 `p` 元素應該有兩個 `span` 元素。 +Your new `p` element should have three `span` elements. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 2); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 3); ``` -第一個 `span` 元素應該將 `class` 屬性設置爲 `bold`。 +One `span` element should wrap the text `Total Carbohydrate 37g`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.innerText?.match(/Total Carbohydrate[\s|\n]+37g/)); ``` -第一個 `span` 元素應該包含文本 `Total Carbohydrate`。 +One `span` element should wrap the text `Total Carbohydrate`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.innerText === 'Total Carbohydrate'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.innerText === 'Total Carbohydrate'); ``` -第二個 `span` 元素應該將 `class` 屬性設置爲 `bold right`。 +The `span` element around `Total Carbohydrate` should have the `class` attribute set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.classList?.contains('bold')); ``` -第二個 `span` 元素應該包含文本 `13%`。 +A `span` element should wrap the text `13%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.innerText === '13%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === '13%'); +``` + +The `span` element around `13%` should have the `class` attribute set to `bold`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); +``` + +Your second `span` element should wrap the text `13%`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === '13%'); ``` # --seed-- @@ -61,41 +72,46 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastEle ```html - - - Nutrition Label - - - - -
                                                                  -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  -
                                                                  -
                                                                  -

                                                                  Amount per serving

                                                                  -

                                                                  Calories 230

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

                                                                  % Daily Value *

                                                                  -
                                                                  -

                                                                  Total Fat 8g10%

                                                                  -

                                                                  Saturated Fat 1g 5%

                                                                  -
                                                                  -

                                                                  Trans Fat 0g

                                                                  -
                                                                  -

                                                                  Cholesterol 0mg 0%

                                                                  -

                                                                  Sodium 160mg 7%

                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  +
                                                                  +
                                                                  +
                                                                  +

                                                                  Amount per serving

                                                                  +

                                                                  Calories

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

                                                                  % Daily Value *

                                                                  +
                                                                  +

                                                                  Total Fat 8g 10%

                                                                  +

                                                                  Saturated Fat 1g 5%

                                                                  +
                                                                  +

                                                                  Trans Fat 0g

                                                                  +
                                                                  +

                                                                  Cholesterol 0mg 0%

                                                                  +

                                                                  Sodium 160mg 7%

                                                                  +
                                                                  + --fcc-editable-region-- +
                                                                  + ``` @@ -127,47 +143,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7fa959ab75948f96a0d6.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7fa959ab75948f96a0d6.md index 77d31264c05..8f9fcfad859 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7fa959ab75948f96a0d6.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7fa959ab75948f96a0d6.md @@ -1,8 +1,8 @@ --- id: 615f7fa959ab75948f96a0d6 -title: 步驟 55 +title: Step 56 challengeType: 0 -dashedName: step-55 +dashedName: step-56 --- # --description-- @@ -11,30 +11,30 @@ dashedName: step-55 # --hints-- -應該在 `.daily-value.sm-text` 元素的末尾創建一個新的 `p` 和 `div` 元素。 +You should create a new `p` and `div` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` 新的 `p` 元素應包含文本 `Dietary Fiber 4g`。 ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.innerText.match(/Dietary Fiber[\s|\n]+4g/)); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.innerText.match(/Dietary Fiber[\s|\n]+4g/)); ``` 新的 `p` 元素應該將 `class` 屬性設置爲 `indent no-divider`。 ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('indent')); -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('indent')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('no-divider')); ``` 新的 `div` 應該將 `class` 屬性設置爲 `divider`。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -44,42 +44,47 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                  -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  -
                                                                  -
                                                                  -

                                                                  Amount per serving

                                                                  -

                                                                  Calories 230

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

                                                                  % Daily Value *

                                                                  -
                                                                  -

                                                                  Total Fat 8g10%

                                                                  -

                                                                  Saturated Fat 1g 5%

                                                                  -
                                                                  -

                                                                  Trans Fat 0g

                                                                  -
                                                                  -

                                                                  Cholesterol 0mg 0%

                                                                  -

                                                                  Sodium 160mg 7%

                                                                  -

                                                                  Total Carbohydrate 37g 13%

                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  +
                                                                  +
                                                                  +
                                                                  +

                                                                  Amount per serving

                                                                  +

                                                                  Calories

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

                                                                  % Daily Value *

                                                                  +
                                                                  +

                                                                  Total Fat 8g 10%

                                                                  +

                                                                  Saturated Fat 1g 5%

                                                                  +
                                                                  +

                                                                  Trans Fat 0g

                                                                  +
                                                                  +

                                                                  Cholesterol 0mg 0%

                                                                  +

                                                                  Sodium 160mg 7%

                                                                  +

                                                                  Total Carbohydrate 37g 13%

                                                                  +
                                                                  + --fcc-editable-region-- +
                                                                  + ``` @@ -111,47 +116,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f808d85793195b0f53be9.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f808d85793195b0f53be9.md index fddb160d0bc..db773b01f62 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f808d85793195b0f53be9.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f808d85793195b0f53be9.md @@ -1,8 +1,8 @@ --- id: 615f808d85793195b0f53be9 -title: 步驟 56 +title: Step 57 challengeType: 0 -dashedName: step-56 +dashedName: step-57 --- # --description-- @@ -11,30 +11,30 @@ dashedName: step-56 # --hints-- -應該在 `.daily-value.sm-text` 元素的末尾創建一個新的 `p` 和 `div` 元素。 +You should create a new `p` and `div` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` 新的 `p` 元素應包含文本 `Total Sugars 12g`。 ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.innerText.match(/Total Sugars[\s|\n]+12g/)); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.innerText.match(/Total Sugars[\s|\n]+12g/)); ``` 新的 `p` 元素應該將 `class` 屬性設置爲 `indent no-divider`。 ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('indent')); -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('indent')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('no-divider')); ``` 新的 `div` 應該將 `class` 屬性設置爲 `divider`。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -44,44 +44,49 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                  -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  -
                                                                  -
                                                                  -

                                                                  Amount per serving

                                                                  -

                                                                  Calories 230

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

                                                                  % Daily Value *

                                                                  -
                                                                  -

                                                                  Total Fat 8g10%

                                                                  -

                                                                  Saturated Fat 1g 5%

                                                                  -
                                                                  -

                                                                  Trans Fat 0g

                                                                  -
                                                                  -

                                                                  Cholesterol 0mg 0%

                                                                  -

                                                                  Sodium 160mg 7%

                                                                  -

                                                                  Total Carbohydrate 37g 13%

                                                                  -

                                                                  Dietary Fiber 4g

                                                                  -
                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  +
                                                                  +
                                                                  +
                                                                  +

                                                                  Amount per serving

                                                                  +

                                                                  Calories

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

                                                                  % Daily Value *

                                                                  +
                                                                  +

                                                                  Total Fat 8g 10%

                                                                  +

                                                                  Saturated Fat 1g 5%

                                                                  +
                                                                  +

                                                                  Trans Fat 0g

                                                                  +
                                                                  +

                                                                  Cholesterol 0mg 0%

                                                                  +

                                                                  Sodium 160mg 7%

                                                                  +

                                                                  Total Carbohydrate 37g 13%

                                                                  +

                                                                  Dietary Fiber 4g

                                                                  +
                                                                  +
                                                                  + --fcc-editable-region-- +
                                                                  + ``` @@ -113,47 +118,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f829d07b18f96f6f6684b.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f829d07b18f96f6f6684b.md index bfbfa42a833..c5ebb93f61b 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f829d07b18f96f6f6684b.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f829d07b18f96f6f6684b.md @@ -1,21 +1,21 @@ --- id: 615f829d07b18f96f6f6684b -title: 步驟 57 +title: Step 58 challengeType: 0 -dashedName: step-57 +dashedName: step-58 --- # --description-- -創建這些分隔線的好處是你可以應用特定的類來單獨設置它們的樣式。 將 `dbl-indent` 添加到最後一個 `.divider` 的 `class`。 +創建這些分隔線的好處是你可以應用特定的類來單獨設置它們的樣式。 Add `double-indent` to the `class` for your last `.divider`. # --hints-- -最後一個 `.divider` 元素應該將 `dbl-indent` 添加到 `class`。 不要刪除現有值。 +Your last `.divider` element should have `double-indent` added to the `class`. 不要刪除現有值。 ```js -const last = document.querySelector('.daily-value.sm-text')?.lastElementChild; -assert(last?.classList?.contains('dbl-indent')); +const last = document.querySelector('.daily-value.small-text')?.lastElementChild; +assert(last?.classList?.contains('double-indent')); assert(last?.classList?.contains('divider')); ``` @@ -26,46 +26,51 @@ assert(last?.classList?.contains('divider')); ```html - - - Nutrition Label - - - - -
                                                                  -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  -
                                                                  -
                                                                  -

                                                                  Amount per serving

                                                                  -

                                                                  Calories 230

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

                                                                  % Daily Value *

                                                                  -
                                                                  -

                                                                  Total Fat 8g10%

                                                                  -

                                                                  Saturated Fat 1g 5%

                                                                  -
                                                                  -

                                                                  Trans Fat 0g

                                                                  -
                                                                  -

                                                                  Cholesterol 0mg 0%

                                                                  -

                                                                  Sodium 160mg 7%

                                                                  -

                                                                  Total Carbohydrate 37g 13%

                                                                  -

                                                                  Dietary Fiber 4g

                                                                  -
                                                                  -

                                                                  Total Sugars 12g

                                                                  -
                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  +
                                                                  +
                                                                  +
                                                                  +

                                                                  Amount per serving

                                                                  +

                                                                  Calories

                                                                  + 230
                                                                  - +
                                                                  +
                                                                  +

                                                                  % Daily Value *

                                                                  +
                                                                  +

                                                                  Total Fat 8g 10%

                                                                  +

                                                                  Saturated Fat 1g 5%

                                                                  +
                                                                  +

                                                                  Trans Fat 0g

                                                                  +
                                                                  +

                                                                  Cholesterol 0mg 0%

                                                                  +

                                                                  Sodium 160mg 7%

                                                                  +

                                                                  Total Carbohydrate 37g 13%

                                                                  +

                                                                  Dietary Fiber 4g

                                                                  +
                                                                  +

                                                                  Total Sugars 12g

                                                                  + --fcc-editable-region-- +
                                                                  + --fcc-editable-region-- +
                                                                  +
                                                                  + ``` @@ -97,47 +102,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f83ef928ec9982b785b6a.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f83ef928ec9982b785b6a.md index bb26c20bd06..370fd147adf 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f83ef928ec9982b785b6a.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f83ef928ec9982b785b6a.md @@ -1,26 +1,26 @@ --- id: 615f83ef928ec9982b785b6a -title: 步驟 58 +title: Step 59 challengeType: 0 -dashedName: step-58 +dashedName: step-59 --- # --description-- -創建一個 `.dbl-indent` 選擇器並給它一個 `2em` 的左邊距。 +Create a `.double-indent` selector and give it a left margin of `2em`. # --hints-- -應該有一個新的 `.dbl-indent` 選擇器。 +You should have a new `.double-indent` selector. ```js -assert(new __helpers.CSSHelp(document).getStyle('.dbl-indent')); +assert(new __helpers.CSSHelp(document).getStyle('.double-indent')); ``` -`.dbl-indent` 選擇器應該有一個 `margin-left` 屬性設置爲 `2em`。 +Your `.double-indent` selector should have a `margin-left` property set to `2em`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.dbl-indent')?.marginLeft === '2em'); +assert(new __helpers.CSSHelp(document).getStyle('.double-indent')?.marginLeft === '2em'); ``` # --seed-- @@ -30,44 +30,49 @@ assert(new __helpers.CSSHelp(document).getStyle('.dbl-indent')?.marginLeft === ' ```html - - - Nutrition Label - - - - -
                                                                  -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  -
                                                                  -
                                                                  -

                                                                  Amount per serving

                                                                  -

                                                                  Calories 230

                                                                  -
                                                                  -
                                                                  -
                                                                  -

                                                                  % Daily Value *

                                                                  -
                                                                  -

                                                                  Total Fat 8g10%

                                                                  -

                                                                  Saturated Fat 1g 5%

                                                                  -
                                                                  -

                                                                  Trans Fat 0g

                                                                  -
                                                                  -

                                                                  Cholesterol 0mg 0%

                                                                  -

                                                                  Sodium 160mg 7%

                                                                  -

                                                                  Total Carbohydrate 37g 13%

                                                                  -

                                                                  Dietary Fiber 4g

                                                                  -
                                                                  -

                                                                  Total Sugars 12g

                                                                  -
                                                                  + + + + Nutrition Label + + + + + +
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  +
                                                                  +
                                                                  +
                                                                  +

                                                                  Amount per serving

                                                                  +

                                                                  Calories

                                                                  + 230
                                                                  - +
                                                                  +
                                                                  +

                                                                  % Daily Value *

                                                                  +
                                                                  +

                                                                  Total Fat 8g 10%

                                                                  +

                                                                  Saturated Fat 1g 5%

                                                                  +
                                                                  +

                                                                  Trans Fat 0g

                                                                  +
                                                                  +

                                                                  Cholesterol 0mg 0%

                                                                  +

                                                                  Sodium 160mg 7%

                                                                  +

                                                                  Total Carbohydrate 37g 13%

                                                                  +

                                                                  Dietary Fiber 4g

                                                                  +
                                                                  +

                                                                  Total Sugars 12g

                                                                  +
                                                                  +
                                                                  +
                                                                  + ``` @@ -99,56 +104,70 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } ---fcc-editable-region-- +--fcc-editable-region-- ---fcc-editable-region-- +--fcc-editable-region-- .daily-value p:not(.no-divider) { border-bottom: 1px solid #888989; diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f84f246e8ba98e3cd97be.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f84f246e8ba98e3cd97be.md index db0f15c7fbf..feb1b858190 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f84f246e8ba98e3cd97be.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f84f246e8ba98e3cd97be.md @@ -1,61 +1,60 @@ --- id: 615f84f246e8ba98e3cd97be -title: 步驟 59 +title: Step 60 challengeType: 0 -dashedName: step-59 +dashedName: step-60 --- # --description-- -在 `.dbl-indent` 元素的下方,添加一個新的 `p` 元素,其中包含文本 `Includes 10g Added Sugars 20%`。 新的 `p` 元素也應該是雙縮進的,並且沒有下邊框。 使用 `span` 使 `20%` 加粗並右對齊。 +Below your `.double-indent` element, add a new `p` element with the text `Includes 10g Added Sugars 20%`. 新的 `p` 元素也應該是雙縮進的,並且沒有下邊框。 使用 `span` 使 `20%` 加粗並右對齊。 然後在該 `p` 元素之後創建另一個分隔線。 # --hints-- -應該在 `.daily-value.sm-text` 元素的末尾創建一個新的 `p` 和 `div` 元素。 +You should create a new `p` and `div` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` 新的 `p` 元素應包含文本 `Includes 10g Added Sugars 20%`。 ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.innerText.match(/Includes 10g Added Sugars[\s|\n]+20%/)); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.innerText.match(/Includes 10g Added Sugars[\s|\n]+20%/)); ``` -新的 `p` 元素應該將 `class` 屬性設置爲 `dbl-indent no-divider`。 +Your new `p` element should have the `class` attribute set to `double-indent no-divider`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('dbl-indent')); -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('double-indent')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('no-divider')); ``` 新 `p` 元素應該有一個 `span` 元素。 ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.firstElementChild?.localName === 'span'); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.firstElementChild?.localName === 'span'); ``` -`span` 元素應該將 `class` 屬性設置爲 `bold right`。 +Your `span` element should have the `class` attribute set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.firstElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.firstElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.firstElementChild?.classList?.contains('bold')); ``` `span` 元素應該包含文本 `20%`。 ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type span')?.innerText === '20%'); +assert(document.querySelector('.daily-value.small-text p:last-of-type span')?.innerText === '20%'); ``` 新的 `div` 應該將 `class` 屬性設置爲 `divider`。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -65,46 +64,51 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                  -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  -
                                                                  -
                                                                  -

                                                                  Amount per serving

                                                                  -

                                                                  Calories 230

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

                                                                  % Daily Value *

                                                                  -
                                                                  -

                                                                  Total Fat 8g10%

                                                                  -

                                                                  Saturated Fat 1g 5%

                                                                  -
                                                                  -

                                                                  Trans Fat 0g

                                                                  -
                                                                  -

                                                                  Cholesterol 0mg 0%

                                                                  -

                                                                  Sodium 160mg 7%

                                                                  -

                                                                  Total Carbohydrate 37g 13%

                                                                  -

                                                                  Dietary Fiber 4g

                                                                  -
                                                                  -

                                                                  Total Sugars 12g

                                                                  -
                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  +
                                                                  +
                                                                  +
                                                                  +

                                                                  Amount per serving

                                                                  +

                                                                  Calories

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

                                                                  % Daily Value *

                                                                  +
                                                                  +

                                                                  Total Fat 8g 10%

                                                                  +

                                                                  Saturated Fat 1g 5%

                                                                  +
                                                                  +

                                                                  Trans Fat 0g

                                                                  +
                                                                  +

                                                                  Cholesterol 0mg 0%

                                                                  +

                                                                  Sodium 160mg 7%

                                                                  +

                                                                  Total Carbohydrate 37g 13%

                                                                  +

                                                                  Dietary Fiber 4g

                                                                  +
                                                                  +

                                                                  Total Sugars 12g

                                                                  +
                                                                  +
                                                                  + --fcc-editable-region-- +
                                                                  + ``` @@ -136,54 +140,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f887466db4ba14b5342cc.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f887466db4ba14b5342cc.md index 781e204060f..1755cca80be 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f887466db4ba14b5342cc.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f887466db4ba14b5342cc.md @@ -1,8 +1,8 @@ --- id: 615f887466db4ba14b5342cc -title: 步驟 60 +title: Step 61 challengeType: 0 -dashedName: step-60 +dashedName: step-61 --- # --description-- @@ -13,30 +13,30 @@ dashedName: step-60 # --hints-- -應該在 `.daily-value.sm-text` 元素的末尾創建一個新的 `p` 和 `div` 元素。 +You should create a new `p` and `div` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` 新的 `p` 元素應包含文本 `Protein 3g`。 ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.innerText.match(/Protein[\s|\n]+3g/)); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.innerText.match(/Protein[\s|\n]+3g/)); ``` 新的 `p` 元素應該將 `class` 屬性設置爲 `no-divider`。 ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('no-divider')); ``` -新的 `div` 應該將 `class` 屬性設置爲 `divider lg`。 +Your new `div` should have the `class` attribute set to `divider large`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('lg')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('large')); ``` # --seed-- @@ -46,48 +46,53 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                  -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  -
                                                                  -
                                                                  -

                                                                  Amount per serving

                                                                  -

                                                                  Calories 230

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

                                                                  % Daily Value *

                                                                  -
                                                                  -

                                                                  Total Fat 8g10%

                                                                  -

                                                                  Saturated Fat 1g 5%

                                                                  -
                                                                  -

                                                                  Trans Fat 0g

                                                                  -
                                                                  -

                                                                  Cholesterol 0mg 0%

                                                                  -

                                                                  Sodium 160mg 7%

                                                                  -

                                                                  Total Carbohydrate 37g 13%

                                                                  -

                                                                  Dietary Fiber 4g

                                                                  -
                                                                  -

                                                                  Total Sugars 12g

                                                                  -
                                                                  -

                                                                  Includes 10g Added Sugars 20% -

                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  +
                                                                  +
                                                                  +
                                                                  +

                                                                  Amount per serving

                                                                  +

                                                                  Calories

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

                                                                  % Daily Value *

                                                                  +
                                                                  +

                                                                  Total Fat 8g 10%

                                                                  +

                                                                  Saturated Fat 1g 5%

                                                                  +
                                                                  +

                                                                  Trans Fat 0g

                                                                  +
                                                                  +

                                                                  Cholesterol 0mg 0%

                                                                  +

                                                                  Sodium 160mg 7%

                                                                  +

                                                                  Total Carbohydrate 37g 13%

                                                                  +

                                                                  Dietary Fiber 4g

                                                                  +
                                                                  +

                                                                  Total Sugars 12g

                                                                  +
                                                                  +

                                                                  Includes 10g Added Sugars 20% +

                                                                  +
                                                                  + --fcc-editable-region-- +
                                                                  + ``` @@ -119,54 +124,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f89e055040ba294719d2f.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f89e055040ba294719d2f.md index ec3b9d6bba1..ef819e74ec0 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f89e055040ba294719d2f.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f89e055040ba294719d2f.md @@ -1,39 +1,40 @@ --- id: 615f89e055040ba294719d2f -title: 步驟 61 +title: Step 62 challengeType: 0 -dashedName: step-61 +dashedName: step-62 --- # --description-- -在大分隔線下方創建另一個 `p` 元素。 爲 `p` 元素提供文本 `Vitamin D 2mcg 10%`。 使用 `span` 使 `10%` 向右對齊,但不要使其變爲粗體。 +在大分隔線下方創建另一個 `p` 元素。 爲 `p` 元素提供文本 `Vitamin D 2mcg 10%`。 + +The `p` element contains only text, you can wrap the percentage in a `span` element so that it is considered a separate entity from the rest of the text, and it's moved to the right. # --hints-- -應該在 `.daily-value.sm-text` 元素的末尾創建一個新的 `p` 元素。 +You should create a new `p` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` -新的 `p` 元素應包含文本 `Vitamin D 2mcg 10%`。 +Your new `p` element should have the text `Vitamin D 2mcg 10%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Vitamin D 2mcg[\s|\n]+10%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Vitamin D 2mcg[\s|\n]+10%/)); ``` -新 `p` 元素應該有一個 `span` 元素。 +Your new `p` element should have a `span` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 1); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 1); ``` -`span` 元素應該將 `class` 設置爲 `right`。 記住,不要讓它變得粗體。 +Your `span` element should not be bold. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.classList?.contains('right')); -assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.classList?.contains('bold')); +assert(!document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span')?.classList?.contains('bold')); ``` # --seed-- @@ -43,50 +44,55 @@ assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.queryS ```html - - - Nutrition Label - - - - -
                                                                  -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  -
                                                                  -
                                                                  -

                                                                  Amount per serving

                                                                  -

                                                                  Calories 230

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

                                                                  % Daily Value *

                                                                  -
                                                                  -

                                                                  Total Fat 8g10%

                                                                  -

                                                                  Saturated Fat 1g 5%

                                                                  -
                                                                  -

                                                                  Trans Fat 0g

                                                                  -
                                                                  -

                                                                  Cholesterol 0mg 0%

                                                                  -

                                                                  Sodium 160mg 7%

                                                                  -

                                                                  Total Carbohydrate 37g 13%

                                                                  -

                                                                  Dietary Fiber 4g

                                                                  -
                                                                  -

                                                                  Total Sugars 12g

                                                                  -
                                                                  -

                                                                  Includes 10g Added Sugars 20% -

                                                                  -

                                                                  Protein 3g

                                                                  -
                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  +
                                                                  +
                                                                  +
                                                                  +

                                                                  Amount per serving

                                                                  +

                                                                  Calories

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

                                                                  % Daily Value *

                                                                  +
                                                                  +

                                                                  Total Fat 8g 10%

                                                                  +

                                                                  Saturated Fat 1g 5%

                                                                  +
                                                                  +

                                                                  Trans Fat 0g

                                                                  +
                                                                  +

                                                                  Cholesterol 0mg 0%

                                                                  +

                                                                  Sodium 160mg 7%

                                                                  +

                                                                  Total Carbohydrate 37g 13%

                                                                  +

                                                                  Dietary Fiber 4g

                                                                  +
                                                                  +

                                                                  Total Sugars 12g

                                                                  +
                                                                  +

                                                                  Includes 10g Added Sugars 20% +

                                                                  +

                                                                  Protein 3g

                                                                  +
                                                                  +
                                                                  + --fcc-editable-region-- +
                                                                  + ``` @@ -118,54 +124,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8bfe0f30a1a3c340356b.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8bfe0f30a1a3c340356b.md index 0ee465f14ee..7164517af6c 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8bfe0f30a1a3c340356b.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8bfe0f30a1a3c340356b.md @@ -1,8 +1,8 @@ --- id: 615f8bfe0f30a1a3c340356b -title: 步驟 62 +title: Step 63 challengeType: 0 -dashedName: step-62 +dashedName: step-63 --- # --description-- @@ -11,55 +11,53 @@ dashedName: step-62 # --hints-- -應該在 `.daily-value.sm-text` 元素的末尾創建兩個新的 `p` 元素。 +You should create two new `p` elements at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); ``` 第一個新的 `p` 元素應包含文本 `Calcium 260mg 20%`。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.innerText?.match(/Calcium 260mg[\s|\n]+20%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.innerText?.match(/Calcium 260mg[\s|\n]+20%/)); ``` 第一個新 `p` 元素應該有一個 `span` 元素。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.localName === 'span'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.localName === 'span'); ``` -第一個 `span` 元素應該將 `class` 屬性設置爲 `right`。 記住,不要讓它變得粗體。 +Your first `span` element should not be bold. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.classList?.contains('right')); -assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.classList?.contains('bold')); +assert(!document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.classList?.contains('bold')); ``` 第一個 `span` 元素應該包含文本 `20%`。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.innerText === '20%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.innerText === '20%'); ``` 第二個新的 `p` 元素應包含文本 `Iron 8mg 45%`。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Iron 8mg[\s|\n]+45%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Iron 8mg[\s|\n]+45%/)); ``` 第二個新 `p` 元素應該有一個 `span` 元素。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.localName === 'span'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.localName === 'span'); ``` -第二個 `span` 元素應該將 `class` 屬性設置爲 `right`。 記住,不要讓它變得粗體。 +Your second `span` element should not be bold. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('right')); -assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(!document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); ``` # --seed-- @@ -69,51 +67,56 @@ assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstE ```html - - - Nutrition Label - - - - -
                                                                  -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  -
                                                                  -
                                                                  -

                                                                  Amount per serving

                                                                  -

                                                                  Calories 230

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

                                                                  % Daily Value *

                                                                  -
                                                                  -

                                                                  Total Fat 8g10%

                                                                  -

                                                                  Saturated Fat 1g 5%

                                                                  -
                                                                  -

                                                                  Trans Fat 0g

                                                                  -
                                                                  -

                                                                  Cholesterol 0mg 0%

                                                                  -

                                                                  Sodium 160mg 7%

                                                                  -

                                                                  Total Carbohydrate 37g 13%

                                                                  -

                                                                  Dietary Fiber 4g

                                                                  -
                                                                  -

                                                                  Total Sugars 12g

                                                                  -
                                                                  -

                                                                  Includes 10g Added Sugars 20% -

                                                                  -

                                                                  Protein 3g

                                                                  -
                                                                  -

                                                                  Vitamin D 2mcg 10%

                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  +
                                                                  +
                                                                  +
                                                                  +

                                                                  Amount per serving

                                                                  +

                                                                  Calories

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

                                                                  % Daily Value *

                                                                  +
                                                                  +

                                                                  Total Fat 8g 10%

                                                                  +

                                                                  Saturated Fat 1g 5%

                                                                  +
                                                                  +

                                                                  Trans Fat 0g

                                                                  +
                                                                  +

                                                                  Cholesterol 0mg 0%

                                                                  +

                                                                  Sodium 160mg 7%

                                                                  +

                                                                  Total Carbohydrate 37g 13%

                                                                  +

                                                                  Dietary Fiber 4g

                                                                  +
                                                                  +

                                                                  Total Sugars 12g

                                                                  +
                                                                  +

                                                                  Includes 10g Added Sugars 20% +

                                                                  +

                                                                  Protein 3g

                                                                  +
                                                                  +

                                                                  Vitamin D 2mcg 10%

                                                                  +
                                                                  + --fcc-editable-region-- +
                                                                  + ``` @@ -145,54 +148,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8f1223601fa546e93f31.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8f1223601fa546e93f31.md index 4a056713ce5..cf0cf15cf78 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8f1223601fa546e93f31.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8f1223601fa546e93f31.md @@ -1,8 +1,8 @@ --- id: 615f8f1223601fa546e93f31 -title: 步驟 63 +title: Step 64 challengeType: 0 -dashedName: step-63 +dashedName: step-64 --- # --description-- @@ -11,35 +11,34 @@ dashedName: step-63 # --hints-- -應該在 `.daily-value.sm-text` 元素的末尾創建一個新的 `p` 元素。 +You should create a new `p` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` 新的 `p` 元素應該將 `class` 屬性設置爲 `no-divider`。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('no-divider')); ``` 新的 `p` 元素應包含文本 `Potassium 235mg 6%`。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Potassium 235mg[\s|\n]+6%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Potassium 235mg[\s|\n]+6%/)); ``` 新 `p` 元素應該有一個 `span` 元素。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 1); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 1); ``` -`span` 元素應該將 `class` 設置爲 `right`。 記住,不要讓它變得粗體。 +Your `span` element should not be bold. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.classList?.contains('right')); -assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.classList?.contains('bold')); +assert(!document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span')?.classList?.contains('bold')); ``` # --seed-- @@ -49,53 +48,58 @@ assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.queryS ```html - - - Nutrition Label - - - - -
                                                                  -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  -
                                                                  -
                                                                  -

                                                                  Amount per serving

                                                                  -

                                                                  Calories 230

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

                                                                  % Daily Value *

                                                                  -
                                                                  -

                                                                  Total Fat 8g10%

                                                                  -

                                                                  Saturated Fat 1g 5%

                                                                  -
                                                                  -

                                                                  Trans Fat 0g

                                                                  -
                                                                  -

                                                                  Cholesterol 0mg 0%

                                                                  -

                                                                  Sodium 160mg 7%

                                                                  -

                                                                  Total Carbohydrate 37g 13%

                                                                  -

                                                                  Dietary Fiber 4g

                                                                  -
                                                                  -

                                                                  Total Sugars 12g

                                                                  -
                                                                  -

                                                                  Includes 10g Added Sugars 20% -

                                                                  -

                                                                  Protein 3g

                                                                  -
                                                                  -

                                                                  Vitamin D 2mcg 10%

                                                                  -

                                                                  Calcium 260mg 20%

                                                                  -

                                                                  Iron 8mg 45%

                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  +
                                                                  +
                                                                  +
                                                                  +

                                                                  Amount per serving

                                                                  +

                                                                  Calories

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

                                                                  % Daily Value *

                                                                  +
                                                                  +

                                                                  Total Fat 8g 10%

                                                                  +

                                                                  Saturated Fat 1g 5%

                                                                  +
                                                                  +

                                                                  Trans Fat 0g

                                                                  +
                                                                  +

                                                                  Cholesterol 0mg 0%

                                                                  +

                                                                  Sodium 160mg 7%

                                                                  +

                                                                  Total Carbohydrate 37g 13%

                                                                  +

                                                                  Dietary Fiber 4g

                                                                  +
                                                                  +

                                                                  Total Sugars 12g

                                                                  +
                                                                  +

                                                                  Includes 10g Added Sugars 20% +

                                                                  +

                                                                  Protein 3g

                                                                  +
                                                                  +

                                                                  Vitamin D 2mcg 10%

                                                                  +

                                                                  Calcium 260mg 20%

                                                                  +

                                                                  Iron 8mg 45%

                                                                  +
                                                                  + --fcc-editable-region-- +
                                                                  + ``` @@ -127,54 +131,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f905fbd1017a65ca224eb.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f905fbd1017a65ca224eb.md index 4ad4d84cc7c..593928f3898 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f905fbd1017a65ca224eb.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f905fbd1017a65ca224eb.md @@ -1,8 +1,8 @@ --- id: 615f905fbd1017a65ca224eb -title: 步驟 64 +title: Step 65 challengeType: 0 -dashedName: step-64 +dashedName: step-65 --- # --description-- @@ -23,11 +23,11 @@ dashedName: step-64 assert(document.querySelector('.daily-value').nextElementSibling?.localName === 'div'); ``` -新的 `div` 應該將 `class` 設置爲 `divider md`。 +Your new `div` should have the `class` set to `divider medium`. ```js assert(document.querySelector('.daily-value')?.nextElementSibling?.classList?.contains('divider')); -assert(document.querySelector('.daily-value')?.nextElementSibling?.classList?.contains('md')); +assert(document.querySelector('.daily-value')?.nextElementSibling?.classList?.contains('medium')); ``` 應該在新的 `div` 元素之後創建一個 `p` 元素。 @@ -55,55 +55,60 @@ assert.equal(document.querySelector('.label')?.lastElementChild?.innerText, '* T ```html - - - Nutrition Label - - - - -
                                                                  -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  -
                                                                  -
                                                                  -

                                                                  Amount per serving

                                                                  -

                                                                  Calories 230

                                                                  -
                                                                  -
                                                                  -
                                                                  -

                                                                  % Daily Value *

                                                                  -
                                                                  -

                                                                  Total Fat 8g10%

                                                                  -

                                                                  Saturated Fat 1g 5%

                                                                  -
                                                                  -

                                                                  Trans Fat 0g

                                                                  -
                                                                  -

                                                                  Cholesterol 0mg 0%

                                                                  -

                                                                  Sodium 160mg 7%

                                                                  -

                                                                  Total Carbohydrate 37g 13%

                                                                  -

                                                                  Dietary Fiber 4g

                                                                  -
                                                                  -

                                                                  Total Sugars 12g

                                                                  -
                                                                  -

                                                                  Includes 10g Added Sugars 20% -

                                                                  -

                                                                  Protein 3g

                                                                  -
                                                                  -

                                                                  Vitamin D 2mcg 10%

                                                                  -

                                                                  Calcium 260mg 20%

                                                                  -

                                                                  Iron 8mg 45%

                                                                  -

                                                                  Potassium 235mg 6%

                                                                  -
                                                                  ---fcc-editable-region-- ---fcc-editable-region-- + + + Nutrition Label + + + + + +
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  +
                                                                  +
                                                                  +
                                                                  +

                                                                  Amount per serving

                                                                  +

                                                                  Calories

                                                                  +
                                                                  + 230
                                                                  - +
                                                                  +
                                                                  +

                                                                  % Daily Value *

                                                                  +
                                                                  +

                                                                  Total Fat 8g 10%

                                                                  +

                                                                  Saturated Fat 1g 5%

                                                                  +
                                                                  +

                                                                  Trans Fat 0g

                                                                  +
                                                                  +

                                                                  Cholesterol 0mg 0%

                                                                  +

                                                                  Sodium 160mg 7%

                                                                  +

                                                                  Total Carbohydrate 37g 13%

                                                                  +

                                                                  Dietary Fiber 4g

                                                                  +
                                                                  +

                                                                  Total Sugars 12g

                                                                  +
                                                                  +

                                                                  Includes 10g Added Sugars 20% +

                                                                  +

                                                                  Protein 3g

                                                                  +
                                                                  +

                                                                  Vitamin D 2mcg 10%

                                                                  +

                                                                  Calcium 260mg 20%

                                                                  +

                                                                  Iron 8mg 45%

                                                                  +

                                                                  Potassium 235mg 6%

                                                                  +
                                                                  + --fcc-editable-region-- + + --fcc-editable-region-- +
                                                                  + ``` @@ -135,54 +140,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f94786869e1a7fec54375.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f94786869e1a7fec54375.md index f074c44ba06..c3ced861d4c 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f94786869e1a7fec54375.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f94786869e1a7fec54375.md @@ -1,8 +1,8 @@ --- id: 615f94786869e1a7fec54375 -title: 步驟 65 +title: Step 66 challengeType: 0 -dashedName: step-65 +dashedName: step-66 --- # --description-- @@ -36,54 +36,60 @@ assert(new __helpers.CSSHelp(document).getStyle('.note')?.margin === '5px 0px'); ```html - - - Nutrition Label - - - - -
                                                                  -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  -
                                                                  -
                                                                  -

                                                                  Amount per serving

                                                                  -

                                                                  Calories 230

                                                                  + + + + Nutrition Label + + + + + +
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  +
                                                                  +
                                                                  +
                                                                  +

                                                                  Amount per serving

                                                                  +

                                                                  Calories

                                                                  -
                                                                  -
                                                                  -

                                                                  % Daily Value *

                                                                  -
                                                                  -

                                                                  Total Fat 8g 10%

                                                                  -

                                                                  Saturated Fat 1g 5%

                                                                  -
                                                                  -

                                                                  Trans Fat 0g

                                                                  -
                                                                  -

                                                                  Cholesterol 0mg 0%

                                                                  -

                                                                  Sodium 160mg 7%

                                                                  -

                                                                  Total Carbohydrate 37g 13%

                                                                  -

                                                                  Dietary Fiber 4g

                                                                  -
                                                                  -

                                                                  Total Sugars 12g

                                                                  -
                                                                  -

                                                                  Includes 10g Added Sugars 20% -

                                                                  -

                                                                  Protein 3g

                                                                  -
                                                                  -

                                                                  Vitamin D 2mcg 10%

                                                                  -

                                                                  Calcium 260mg 20%

                                                                  -

                                                                  Iron 8mg 45%

                                                                  -

                                                                  Potassium 235mg 6%

                                                                  -
                                                                  -
                                                                  -

                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. 2,000 calories a day is used for general nutrition advice.

                                                                  + 230
                                                                  - +
                                                                  +
                                                                  +

                                                                  % Daily Value *

                                                                  +
                                                                  +

                                                                  Total Fat 8g 10%

                                                                  +

                                                                  Saturated Fat 1g 5%

                                                                  +
                                                                  +

                                                                  Trans Fat 0g

                                                                  +
                                                                  +

                                                                  Cholesterol 0mg 0%

                                                                  +

                                                                  Sodium 160mg 7%

                                                                  +

                                                                  Total Carbohydrate 37g 13%

                                                                  +

                                                                  Dietary Fiber 4g

                                                                  +
                                                                  +

                                                                  Total Sugars 12g

                                                                  +
                                                                  +

                                                                  Includes 10g Added Sugars 20% +

                                                                  +

                                                                  Protein 3g

                                                                  +
                                                                  +

                                                                  Vitamin D 2mcg 10%

                                                                  +

                                                                  Calcium 260mg 20%

                                                                  +

                                                                  Iron 8mg 45%

                                                                  +

                                                                  Potassium 235mg 6%

                                                                  +
                                                                  +
                                                                  +

                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily + diet. 2,000 calories a day is used for general nutrition advice.

                                                                  +
                                                                  + ``` @@ -115,54 +121,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f951dff9317a900ef683f.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f951dff9317a900ef683f.md index 6200cddfb5d..17d0189953f 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f951dff9317a900ef683f.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f951dff9317a900ef683f.md @@ -1,8 +1,8 @@ --- id: 615f951dff9317a900ef683f -title: 步驟 66 +title: Step 67 challengeType: 0 -dashedName: step-66 +dashedName: step-67 --- # --description-- @@ -35,54 +35,60 @@ assert(new __helpers.CSSHelp(document).getStyle('.note')?.textIndent === '-8px') ```html - - - Nutrition Label - - - - -
                                                                  -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  -
                                                                  -
                                                                  -

                                                                  Amount per serving

                                                                  -

                                                                  Calories 230

                                                                  + + + + Nutrition Label + + + + + +
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  +
                                                                  +
                                                                  +
                                                                  +

                                                                  Amount per serving

                                                                  +

                                                                  Calories

                                                                  -
                                                                  -
                                                                  -

                                                                  % Daily Value *

                                                                  -
                                                                  -

                                                                  Total Fat 8g 10%

                                                                  -

                                                                  Saturated Fat 1g 5%

                                                                  -
                                                                  -

                                                                  Trans Fat 0g

                                                                  -
                                                                  -

                                                                  Cholesterol 0mg 0%

                                                                  -

                                                                  Sodium 160mg 7%

                                                                  -

                                                                  Total Carbohydrate 37g 13%

                                                                  -

                                                                  Dietary Fiber 4g

                                                                  -
                                                                  -

                                                                  Total Sugars 12g

                                                                  -
                                                                  -

                                                                  Includes 10g Added Sugars 20% -

                                                                  -

                                                                  Protein 3g

                                                                  -
                                                                  -

                                                                  Vitamin D 2mcg 10%

                                                                  -

                                                                  Calcium 260mg 20%

                                                                  -

                                                                  Iron 8mg 45%

                                                                  -

                                                                  Potassium 235mg 6%

                                                                  -
                                                                  -
                                                                  -

                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. 2,000 calories a day is used for general nutrition advice.

                                                                  + 230
                                                                  - +
                                                                  +
                                                                  +

                                                                  % Daily Value *

                                                                  +
                                                                  +

                                                                  Total Fat 8g 10%

                                                                  +

                                                                  Saturated Fat 1g 5%

                                                                  +
                                                                  +

                                                                  Trans Fat 0g

                                                                  +
                                                                  +

                                                                  Cholesterol 0mg 0%

                                                                  +

                                                                  Sodium 160mg 7%

                                                                  +

                                                                  Total Carbohydrate 37g 13%

                                                                  +

                                                                  Dietary Fiber 4g

                                                                  +
                                                                  +

                                                                  Total Sugars 12g

                                                                  +
                                                                  +

                                                                  Includes 10g Added Sugars 20% +

                                                                  +

                                                                  Protein 3g

                                                                  +
                                                                  +

                                                                  Vitamin D 2mcg 10%

                                                                  +

                                                                  Calcium 260mg 20%

                                                                  +

                                                                  Iron 8mg 45%

                                                                  +

                                                                  Potassium 235mg 6%

                                                                  +
                                                                  +
                                                                  +

                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily + diet. 2,000 calories a day is used for general nutrition advice.

                                                                  +
                                                                  + ``` @@ -114,54 +120,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } @@ -182,54 +202,60 @@ p { ```html - - - Nutrition Label - - - - -
                                                                  -
                                                                  -

                                                                  Nutrition Facts

                                                                  -
                                                                  -

                                                                  8 servings per container

                                                                  -

                                                                  Serving size 2/3 cup (55g)

                                                                  -
                                                                  -
                                                                  -
                                                                  -

                                                                  Amount per serving

                                                                  -

                                                                  Calories 230

                                                                  + + + + Nutrition Label + + + + + +
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  +
                                                                  +
                                                                  +
                                                                  +

                                                                  Amount per serving

                                                                  +

                                                                  Calories

                                                                  -
                                                                  -
                                                                  -

                                                                  % Daily Value *

                                                                  -
                                                                  -

                                                                  Total Fat 8g 10%

                                                                  -

                                                                  Saturated Fat 1g 5%

                                                                  -
                                                                  -

                                                                  Trans Fat 0g

                                                                  -
                                                                  -

                                                                  Cholesterol 0mg 0%

                                                                  -

                                                                  Sodium 160mg 7%

                                                                  -

                                                                  Total Carbohydrate 37g 13%

                                                                  -

                                                                  Dietary Fiber 4g

                                                                  -
                                                                  -

                                                                  Total Sugars 12g

                                                                  -
                                                                  -

                                                                  Includes 10g Added Sugars 20% -

                                                                  -

                                                                  Protein 3g

                                                                  -
                                                                  -

                                                                  Vitamin D 2mcg 10%

                                                                  -

                                                                  Calcium 260mg 20%

                                                                  -

                                                                  Iron 8mg 45%

                                                                  -

                                                                  Potassium 235mg 6%

                                                                  -
                                                                  -
                                                                  -

                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. 2,000 calories a day is used for general nutrition advice.

                                                                  + 230
                                                                  - +
                                                                  +
                                                                  +

                                                                  % Daily Value *

                                                                  +
                                                                  +

                                                                  Total Fat 8g 10%

                                                                  +

                                                                  Saturated Fat 1g 5%

                                                                  +
                                                                  +

                                                                  Trans Fat 0g

                                                                  +
                                                                  +

                                                                  Cholesterol 0mg 0%

                                                                  +

                                                                  Sodium 160mg 7%

                                                                  +

                                                                  Total Carbohydrate 37g 13%

                                                                  +

                                                                  Dietary Fiber 4g

                                                                  +
                                                                  +

                                                                  Total Sugars 12g

                                                                  +
                                                                  +

                                                                  Includes 10g Added Sugars 20% +

                                                                  +

                                                                  Protein 3g

                                                                  +
                                                                  +

                                                                  Vitamin D 2mcg 10%

                                                                  +

                                                                  Calcium 260mg 20%

                                                                  +

                                                                  Iron 8mg 45%

                                                                  +

                                                                  Potassium 235mg 6%

                                                                  +
                                                                  +
                                                                  +

                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily + diet. 2,000 calories a day is used for general nutrition advice.

                                                                  +
                                                                  + ``` @@ -261,54 +287,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/635bde33c91c80540eae239b.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/635bde33c91c80540eae239b.md new file mode 100644 index 00000000000..d9073bf18ba --- /dev/null +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/635bde33c91c80540eae239b.md @@ -0,0 +1,153 @@ +--- +id: 635bde33c91c80540eae239b +title: Step 41 +challengeType: 0 +dashedName: step-41 +--- + +# --description-- + +The text `* Daily Value %` should be aligned to the right. Create a `.right` selector and use the `justify-content` property to do it. + +# --hints-- + +You should have a `.right` selector. + +```js +const hasRight = new __helpers.CSSHelp(document).getStyle('.right'); +assert(hasRight); + +``` + +The `.right` selector should have the `justify-content` property set to `flex-end`. + +```js +const rightJustifyContent = new __helpers.CSSHelp(document).getStyle('.right')?.getPropertyValue('justify-content'); +assert(rightJustifyContent === 'flex-end'); + +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Nutrition Label + + + + + +
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  +
                                                                  +
                                                                  +
                                                                  +

                                                                  Amount per serving

                                                                  +

                                                                  Calories

                                                                  +
                                                                  + 230 +
                                                                  +
                                                                  +
                                                                  +

                                                                  % Daily Value *

                                                                  +
                                                                  +
                                                                  + + +``` + +```css +* { + box-sizing: border-box; +} + +html { + font-size: 16px; +} + +body { + font-family: 'Open Sans', sans-serif; +} + +.label { + border: 2px solid black; + width: 270px; + margin: 20px auto; + padding: 0 7px; +} + +header h1 { + text-align: center; + margin: -4px 0; + letter-spacing: 0.15px +} + +p { + margin: 0; + display: flex; + justify-content: space-between; +} + +.divider { + border-bottom: 1px solid #888989; + margin: 2px 0; +} + +.bold { + font-weight: 800; +} + +.large { + height: 10px; +} + +.large, .medium { + background-color: black; + border: 0; +} + +.medium { + height: 5px; +} + +.small-text { + font-size: 0.85rem; +} + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { + margin: -5px -2px; + font-size: 2em; + font-weight: 700; +} + +.calories-info span { + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +--fcc-editable-region-- + +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6395d33ab5d91bf317107c48.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6395d33ab5d91bf317107c48.md new file mode 100644 index 00000000000..e6f009b7e04 --- /dev/null +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6395d33ab5d91bf317107c48.md @@ -0,0 +1,117 @@ +--- +id: 6395d33ab5d91bf317107c48 +title: Step 32 +challengeType: 0 +dashedName: step-32 +--- + +# --description-- + +Create a `.calories-info h2` selector and remove all margins. + +# --hints-- + +Create a `.calories-info h2` selector. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info h2')); +``` + +Your `.calories-info h2` selector should have a `margin` set to `0`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info h2')?.margin === '0px'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Nutrition Label + + + + + +
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  +
                                                                  +
                                                                  +
                                                                  +

                                                                  Amount per serving

                                                                  +
                                                                  +
                                                                  +
                                                                  + + +``` + +```css +* { + box-sizing: border-box; +} + +html { + font-size: 16px; +} + +body { + font-family: 'Open Sans', sans-serif; +} + +.label { + border: 2px solid black; + width: 270px; + margin: 20px auto; + padding: 0 7px; +} + +header h1 { + text-align: center; + margin: -4px 0; + letter-spacing: 0.15px +} + +p { + margin: 0; + display: flex; + justify-content: space-between; +} + +.divider { + border-bottom: 1px solid #888989; + margin: 2px 0; +} + +.bold { + font-weight: 800; +} + +.large { + height: 10px; +} + +.large, .medium { + background-color: black; + border: 0; +} + +.small-text { + font-size: 0.85rem; +} + +--fcc-editable-region-- + +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6396e33fe478dd264ebbf278.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6396e33fe478dd264ebbf278.md new file mode 100644 index 00000000000..6a2dbb37aa9 --- /dev/null +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6396e33fe478dd264ebbf278.md @@ -0,0 +1,135 @@ +--- +id: 6396e33fe478dd264ebbf278 +title: Step 34 +challengeType: 0 +dashedName: step-34 +--- + +# --description-- + +Create a new `.calories-info` selector and give it a `display` property set to `flex`. Also give it a `justify-content` property set to `space-between` and `align-items` property set to `flex-end`. + +# --hints-- + +You should create a `.calories-info` selector. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info')); +``` + +Your `.calories-info` selector should have a `display` property set to `flex`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info')?.display === 'flex'); +``` + +Your `.calories-info` selector should have a `justify-content` property set to `space-between`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info')?.justifyContent === 'space-between'); +``` + +Your `.calories-info` selector should have a `align-items` property set to `flex-end`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info')?.alignItems === 'flex-end'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Nutrition Label + + + + + +
                                                                  +
                                                                  +

                                                                  Nutrition Facts

                                                                  +
                                                                  +

                                                                  8 servings per container

                                                                  +

                                                                  Serving size 2/3 cup (55g)

                                                                  +
                                                                  +
                                                                  +
                                                                  +
                                                                  +

                                                                  Amount per serving

                                                                  +

                                                                  Calories

                                                                  +
                                                                  + 230 +
                                                                  +
                                                                  + + +``` + +```css +* { + box-sizing: border-box; +} + +html { + font-size: 16px; +} + +body { + font-family: 'Open Sans', sans-serif; +} + +.label { + border: 2px solid black; + width: 270px; + margin: 20px auto; + padding: 0 7px; +} + +header h1 { + text-align: center; + margin: -4px 0; + letter-spacing: 0.15px +} + +p { + margin: 0; + display: flex; + justify-content: space-between; +} + +.divider { + border-bottom: 1px solid #888989; + margin: 2px 0; +} + +.bold { + font-weight: 800; +} + +.large { + height: 10px; +} + +.large, .medium { + background-color: black; + border: 0; +} + +.small-text { + font-size: 0.85rem; +} + +--fcc-editable-region-- + +--fcc-editable-region-- + +.calories-info h2 { + margin: 0; +} +``` diff --git a/curriculum/challenges/chinese-traditional/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c8bf3980c14c438d2aed.md b/curriculum/challenges/chinese-traditional/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c8bf3980c14c438d2aed.md index 7bec654ec15..ae7f2b797d2 100644 --- a/curriculum/challenges/chinese-traditional/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c8bf3980c14c438d2aed.md +++ b/curriculum/challenges/chinese-traditional/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c8bf3980c14c438d2aed.md @@ -7,7 +7,7 @@ dashedName: step-39 # --description-- -For now, make your `goStore` function output the message `Going to store.` to the console. For example, here is a function that outputs the message "Hello World". +For now, make your `goStore` function output the message `Going to store.` to the console. For example, here is a function that outputs the message `Hello World`. ```js function functionName() { diff --git a/curriculum/challenges/chinese-traditional/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b0b5053f16111b0b6b5f.md b/curriculum/challenges/chinese-traditional/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b0b5053f16111b0b6b5f.md index c60cf5907da..8cbcb969f78 100644 --- a/curriculum/challenges/chinese-traditional/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b0b5053f16111b0b6b5f.md +++ b/curriculum/challenges/chinese-traditional/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b0b5053f16111b0b6b5f.md @@ -47,7 +47,7 @@ Your `update` function should set `button3.onclick` to `fightDragon`. assert.match(update.toString(), /button3\.onclick\s*=\s*fightDragon/); ``` -Your `update` function should set `text.innerText` to `You are in the town square. You see a sign that says "Store".`. +Your `update` function should set `text.innerText` to `You are in the town square. You see a sign that says \"Store\".`. ```js assert.match(update.toString(), /text\.innerText\s*=\s*"You are in the town square. You see a sign that says \\"Store\\"\."/); diff --git a/curriculum/challenges/chinese-traditional/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md b/curriculum/challenges/chinese-traditional/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md index a8bef26a706..294662a5750 100644 --- a/curriculum/challenges/chinese-traditional/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md +++ b/curriculum/challenges/chinese-traditional/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md @@ -7,7 +7,7 @@ dashedName: step-62 # --description-- -The `locations` array contains two locations: the town square and the store. Currently you are passing that entire array into the update functions. Pass in only the first element of the `locations` array by adding `[0]` at the end of the variable. For example: `myFunction(arg[0]);`. +The `locations` array contains two locations: the `town square` and the `store`. Currently you are passing that entire array into the `update` function. Pass in only the first element of the `locations` array by adding `[0]` at the end of the variable. For example: `myFunction(arg[0]);`. This is called bracket notation. Values in an array are accessed by index. Indices are numerical values and start at 0 - this is called zero-based indexing. `arg[0]` would be the first element in the `arg` array. diff --git a/curriculum/challenges/chinese-traditional/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md b/curriculum/challenges/chinese-traditional/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md index ca8a532ec15..1506701e4ab 100644 --- a/curriculum/challenges/chinese-traditional/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md +++ b/curriculum/challenges/chinese-traditional/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md @@ -7,7 +7,7 @@ dashedName: step-67 # --description-- -Finally, update the `text.innerText` assignment to equal the `text` from the location object. However, instead of using bracket notation, use dot notation. Here is an example of accessing the `name` property of an object called `obj`: `obj.name`. +Finally, update the `text.innerText` assignment to equal the `text` from the `location` object. However, instead of using bracket notation, use dot notation. Here is an example of accessing the `name` property of an object called `obj`: `obj.name`. # --hints-- diff --git a/curriculum/challenges/chinese-traditional/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c89e4272512d44fc1c66.md b/curriculum/challenges/chinese-traditional/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c89e4272512d44fc1c66.md index cded49b4395..dab6fabe2b3 100644 --- a/curriculum/challenges/chinese-traditional/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c89e4272512d44fc1c66.md +++ b/curriculum/challenges/chinese-traditional/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c89e4272512d44fc1c66.md @@ -7,7 +7,7 @@ dashedName: step-83 # --description-- -Similar to your `buyHealth` function, set `gold` equal to 30 less than its current value. Make sure this is inside your `if` statement. +Similar to your `buyHealth` function, set `gold` equal to `30` less than its current value. Make sure this is inside your `if` statement. # --hints-- diff --git a/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/basic-javascript/subtract-one-number-from-another-with-javascript.md b/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/basic-javascript/subtract-one-number-from-another-with-javascript.md index 930fba699ec..4f9dd2acb96 100644 --- a/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/basic-javascript/subtract-one-number-from-another-with-javascript.md +++ b/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/basic-javascript/subtract-one-number-from-another-with-javascript.md @@ -22,17 +22,17 @@ const myVar = 12 - 6; 现在,变量 `myVar` 的值为 `6`。 # --instructions-- -改变数字`0`让变量 difference 的值为 `12`。 +改变数字 `0` 让变量 difference 的值为 `12`。 # --hints-- -变量 `difference` 的值应该为 12。 +变量 `difference` 的值应该为 `12`。 ```js assert(difference === 12); ``` -您只能从 45 中减去一个数字。 +你只能从 `45` 中减去一个数。 ```js assert(/difference=45-33;?/.test(__helpers.removeWhiteSpace(code))); diff --git a/curriculum/challenges/chinese/05-back-end-development-and-apis/back-end-development-and-apis-projects/exercise-tracker.md b/curriculum/challenges/chinese/05-back-end-development-and-apis/back-end-development-and-apis-projects/exercise-tracker.md index a35c0c274c8..3d090b3b19e 100644 --- a/curriculum/challenges/chinese/05-back-end-development-and-apis/back-end-development-and-apis-projects/exercise-tracker.md +++ b/curriculum/challenges/chinese/05-back-end-development-and-apis/back-end-development-and-apis-projects/exercise-tracker.md @@ -20,7 +20,7 @@ dashedName: exercise-tracker - 接着,你将看到一个 `.replit` 窗口。 - 选择 `Use run command` 并点击 `Done` 按钮. -当你完成后,请将一个确保正常运行的demo(项目演示)托管在可以公开访问的平台上。 然后将 URL 提交到 `Solution Link` 中。 此外,还可以将项目的源码提交到 `GitHub Link` 中。 +当你完成后,请将一个确保正常运行的demo(项目演示)托管在可以公开访问的平台上。 然后将 demo 的 URL 提交到 Solution Link 字段中。 也可以将项目的源码链接提交到 GitHub Link 字段中。 # --instructions-- @@ -411,7 +411,7 @@ async(getUserInput) => { ```js async(getUserInput) => { const url = getUserInput('url'); - const res = await fetch(url + '/api/users/', { + const res = await fetch(url + '/api/users', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', @@ -458,7 +458,7 @@ async(getUserInput) => { ```js async(getUserInput) => { const url = getUserInput('url'); - const res = await fetch(url + '/api/users/', { + const res = await fetch(url + '/api/users', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', @@ -505,7 +505,7 @@ async(getUserInput) => { ```js async(getUserInput) => { const url = getUserInput('url'); - const res = await fetch(url + '/api/users/', { + const res = await fetch(url + '/api/users', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', diff --git a/curriculum/challenges/chinese/05-back-end-development-and-apis/back-end-development-and-apis-projects/file-metadata-microservice.md b/curriculum/challenges/chinese/05-back-end-development-and-apis/back-end-development-and-apis-projects/file-metadata-microservice.md index 6ebb04a5d2d..74962df5065 100644 --- a/curriculum/challenges/chinese/05-back-end-development-and-apis/back-end-development-and-apis-projects/file-metadata-microservice.md +++ b/curriculum/challenges/chinese/05-back-end-development-and-apis/back-end-development-and-apis-projects/file-metadata-microservice.md @@ -20,7 +20,7 @@ dashedName: file-metadata-microservice - 接着,你将看到一个 `.replit` 窗口。 - 选择 `Use run command` 并点击 `Done` 按钮。 -当你完成后,请将一个确保正常运行的 demo(项目演示)托管在可以公开访问的平台上。 然后将 demo 的 URL 提交到 `Solution Link` 中。 此外,还可以将项目的源码链接提交到 `GitHub Link` 中。 +当你完成后,请将一个确保正常运行的 demo(项目演示)托管在可以公开访问的平台上。 然后将 demo 的 URL 提交到 Solution Link 字段中。 也可以将项目的源码链接提交到 GitHub Link 字段中。 # --instructions-- diff --git a/curriculum/challenges/chinese/05-back-end-development-and-apis/back-end-development-and-apis-projects/request-header-parser-microservice.md b/curriculum/challenges/chinese/05-back-end-development-and-apis/back-end-development-and-apis-projects/request-header-parser-microservice.md index 9a6545676e1..1147bcf4e64 100644 --- a/curriculum/challenges/chinese/05-back-end-development-and-apis/back-end-development-and-apis-projects/request-header-parser-microservice.md +++ b/curriculum/challenges/chinese/05-back-end-development-and-apis/back-end-development-and-apis-projects/request-header-parser-microservice.md @@ -20,7 +20,7 @@ dashedName: request-header-parser-microservice - 接着,你将看到一个 `.replit` 窗口。 - 选择 `Use run command` 并点击 `Done` 按钮。 -当你完成后,请将一个确保正常运行的 demo(项目演示)托管在可以公开访问的平台上。 然后将 demo 的 URL 提交到 `Solution Link` 中。 此外,将项目的源码链接提交到 `GitHub Link` 字段中。 +当你完成后,请将一个确保正常运行的 demo(项目演示)托管在可以公开访问的平台上。 然后将 demo 的 URL 提交到 Solution Link 字段中。 也可以将项目的源码链接提交到 GitHub Link 字段中。 # --hints-- diff --git a/curriculum/challenges/chinese/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md b/curriculum/challenges/chinese/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md index 1565908f7f2..cc136048cdb 100644 --- a/curriculum/challenges/chinese/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md +++ b/curriculum/challenges/chinese/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md @@ -20,7 +20,7 @@ dashedName: timestamp-microservice - 接着,你将看到一个 `.replit` 窗口。 - 选择 `Use run command` 并点击 `Done` 按钮。 -当你完成后,请将一个确保正常运行的 demo(项目演示)托管在可以公开访问的平台上。 然后将 demo 的 URL 提交到 `Solution Link` 字段中。 此外,将项目的源码链接提交到 `GitHub Link` 字段中。 +当你完成后,请将一个确保正常运行的 demo(项目演示)托管在可以公开访问的平台上。 然后将 demo 的 URL 提交到 Solution Link 字段中。 也可以将项目的源码链接提交到 GitHub Link 字段中。 **注意:**时区转换不是本项目的目的,因此假设所有发送的有效日期将使用 `new Date()` 解析为 GMT 日期。 @@ -106,7 +106,7 @@ dashedName: timestamp-microservice ); ``` -如果输入的日期字符串无效,api 将返回一个具有结构 `{ error : "Invalid Date" }` 的对象。 +如果输入的日期字符串无效,API 将返回一个具有结构 `{ error : "Invalid Date" }` 的对象。 ```js (getUserInput) => diff --git a/curriculum/challenges/chinese/05-back-end-development-and-apis/back-end-development-and-apis-projects/url-shortener-microservice.md b/curriculum/challenges/chinese/05-back-end-development-and-apis/back-end-development-and-apis-projects/url-shortener-microservice.md index c59366a00f4..f06c62d3878 100644 --- a/curriculum/challenges/chinese/05-back-end-development-and-apis/back-end-development-and-apis-projects/url-shortener-microservice.md +++ b/curriculum/challenges/chinese/05-back-end-development-and-apis/back-end-development-and-apis-projects/url-shortener-microservice.md @@ -20,7 +20,7 @@ dashedName: url-shortener-microservice - 接着,你将看到一个 `.replit` 窗口。 - 选择 `Use run command` 并点击 `Done` 按钮。 -当你完成后,请将一个确保正常运行的 demo(项目演示)托管在可以公开访问的平台上。 然后将 demo 的 URL 提交到 `Solution Link` 字段中。 此外,将项目的源码链接提交到 `GitHub Link` 字段中。 +当你完成后,请将一个确保正常运行的 demo(项目演示)托管在可以公开访问的平台上。 然后将 demo 的 URL 提交到 Solution Link 字段中。 也可以将项目的源码链接提交到 GitHub Link 字段中。 # --instructions-- diff --git a/curriculum/challenges/chinese/05-back-end-development-and-apis/basic-node-and-express/meet-the-node-console.md b/curriculum/challenges/chinese/05-back-end-development-and-apis/basic-node-and-express/meet-the-node-console.md index 1916d7dc40a..3583edcfd77 100644 --- a/curriculum/challenges/chinese/05-back-end-development-and-apis/basic-node-and-express/meet-the-node-console.md +++ b/curriculum/challenges/chinese/05-back-end-development-and-apis/basic-node-and-express/meet-the-node-console.md @@ -20,7 +20,7 @@ dashedName: meet-the-node-console - 接着,你将看到一个 `.replit` 窗口。 - 选择 `Use run command` 并点击 `Done` 按钮。 -当你完成后,请将一个确保正常运行的 demo(项目演示)托管在可以公开访问的平台上。 然后将 demo 的 URL 提交到 `Solution Link` 字段中。 +当你完成后,请将一个确保正常运行的 demo(项目演示)托管在可以公开访问的平台上。 然后将 demo 的 URL 提交到 Solution Link 字段中。 在开发过程中,能够随时看到代码的运行结果是非常重要的。 diff --git a/curriculum/challenges/chinese/05-back-end-development-and-apis/basic-node-and-express/serve-json-on-a-specific-route.md b/curriculum/challenges/chinese/05-back-end-development-and-apis/basic-node-and-express/serve-json-on-a-specific-route.md index 75d1fbf1c1e..5be94f00880 100644 --- a/curriculum/challenges/chinese/05-back-end-development-and-apis/basic-node-and-express/serve-json-on-a-specific-route.md +++ b/curriculum/challenges/chinese/05-back-end-development-and-apis/basic-node-and-express/serve-json-on-a-specific-route.md @@ -18,7 +18,7 @@ HTML 服务器提供 HTML 服务,而 API 提供数据服务。 REST # --hints-- -访问端口 `/json` 应该返回一个 json 对象 `{"message": "Hello json"}` +The endpoint `/json` should serve the JSON object `{"message": "Hello json"}` ```js (getUserInput) => diff --git a/curriculum/challenges/chinese/05-back-end-development-and-apis/basic-node-and-express/use-the-.env-file.md b/curriculum/challenges/chinese/05-back-end-development-and-apis/basic-node-and-express/use-the-.env-file.md index 30967f2ed82..abc34985c6b 100644 --- a/curriculum/challenges/chinese/05-back-end-development-and-apis/basic-node-and-express/use-the-.env-file.md +++ b/curriculum/challenges/chinese/05-back-end-development-and-apis/basic-node-and-express/use-the-.env-file.md @@ -18,11 +18,11 @@ dashedName: use-the--env-file 在项目根目录创建一个 `.env` 文件,并存储变量 `MESSAGE_STYLE=uppercase`。 -然后,在你在上个挑战中创建的 `/json` GET 路由处理程序中访问 `process.env.MESSAGE_STYLE`,并且如果变量等于 `uppercase`,将响应对象的 `message` 转换为大写。 响应对象应该是 `{"message": "Hello json"}` or `{"message": "HELLO JSON"}`,取决于 `MESSAGE_STYLE` 的值。 Note that you must read the value of `process.env.MESSAGE_STYLE` **inside** the route handler, not outside of it, due to the way our tests run. +然后,在你在上个挑战中创建的 `/json` GET 路由处理程序中访问 `process.env.MESSAGE_STYLE`,并且如果变量等于 `uppercase`,将响应对象的 `message` 转换为大写。 响应对象应该是 `{"message": "Hello json"}` or `{"message": "HELLO JSON"}`,取决于 `MESSAGE_STYLE` 的值。 请注意,因为我们的测试运行的方式,你必须阅读路由处理器**里面**(而不是外面)`process.env.MESSAGE_STYLE` 的值。 **注意:** 如果你正在使用 Replit,你无法创建一个 `.env` 文件。 相反,使用内置的 SECRETS 标签添加变量。 -如果你在本地工作,你将需要 `dotenv` 包。 它将环境变量从你的 `.env` 文件加载到 `process.env` 中。 `dotenv` 包已经安装,并且在你项目的 `package.json` 文件中。 At the top of your `myApp.js` file, add `require('dotenv').config()` to load the environment variables. +如果你在本地工作,你将需要 `dotenv` 包。 它将环境变量从你的 `.env` 文件加载到 `process.env` 中。 `dotenv` 包已经安装,并且在你项目的 `package.json` 文件中。 在你的 `myApp.js` 文件的顶端,添加 `require('dotenv').config()` 以加载环境变量。 # --hints-- diff --git a/curriculum/challenges/chinese/05-back-end-development-and-apis/managing-packages-with-npm/how-to-use-package.json-the-core-of-any-node.js-project-or-npm-package.md b/curriculum/challenges/chinese/05-back-end-development-and-apis/managing-packages-with-npm/how-to-use-package.json-the-core-of-any-node.js-project-or-npm-package.md index bbe84dbf7eb..97f78a67daa 100644 --- a/curriculum/challenges/chinese/05-back-end-development-and-apis/managing-packages-with-npm/how-to-use-package.json-the-core-of-any-node.js-project-or-npm-package.md +++ b/curriculum/challenges/chinese/05-back-end-development-and-apis/managing-packages-with-npm/how-to-use-package.json-the-core-of-any-node.js-project-or-npm-package.md @@ -20,7 +20,7 @@ dashedName: how-to-use-package-json-the-core-of-any-node-js-project-or-npm-packa - 接着,你将看到一个 `.replit` 窗口。 - 选择 `Use run command` 并点击 `Done` 按钮。 -当你完成后,请将一个确保正常运行的 demo(项目演示)托管在可以公开访问的平台上。 然后将 demo 的 URL 提交到 `Solution Link` 字段中。 +当你完成后,请将一个确保正常运行的 demo(项目演示)托管在可以公开访问的平台上。 然后将 demo 的 URL 提交到 Solution Link 字段中。 `package.json` 文件是所有 Node.js 项目和 npm 包的枢纽, 和 HTML 文档中的 <head> 部分用来描述网页的配置信息(元数据)一样,它存储你的项目的相关信息。 它由单个 JSON 对象组成,并以键值对的形式存储项目信息, 且至少包含两个必填字段:“name” 和 “version”——但是最好提供有关项目的其他信息,这将对用户或者维护者有所帮助。 diff --git a/curriculum/challenges/chinese/05-back-end-development-and-apis/mongodb-and-mongoose/install-and-set-up-mongoose.md b/curriculum/challenges/chinese/05-back-end-development-and-apis/mongodb-and-mongoose/install-and-set-up-mongoose.md index ba52b2c2809..defd71a5538 100644 --- a/curriculum/challenges/chinese/05-back-end-development-and-apis/mongodb-and-mongoose/install-and-set-up-mongoose.md +++ b/curriculum/challenges/chinese/05-back-end-development-and-apis/mongodb-and-mongoose/install-and-set-up-mongoose.md @@ -20,7 +20,7 @@ dashedName: install-and-set-up-mongoose - 接着,你将看到一个 `.replit` 窗口。 - 选择 `Use run command` 并点击 `Done` 按钮。 -当你完成后,请将一个确保正常运行的 demo(项目演示)托管在可以公开访问的平台上。 然后将 demo 的 URL 提交到 `Solution Link` 字段中。 +当你完成后,请将一个确保正常运行的 demo(项目演示)托管在可以公开访问的平台上。 然后将 demo 的 URL 提交到 Solution Link 字段中。 在这个挑战中,你将建立一个 MongoDB Atlas 数据库并导入连接到它所需的软件包。 diff --git a/curriculum/challenges/chinese/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md b/curriculum/challenges/chinese/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md index 68d9c938b7c..19e08efd467 100644 --- a/curriculum/challenges/chinese/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md +++ b/curriculum/challenges/chinese/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md @@ -20,7 +20,7 @@ dashedName: set-up-a-template-engine - 接着,你将看到一个 `.replit` 窗口。 - 选择 `Use run command` 并点击 `Done` 按钮。 -当你完成后,请将一个确保正常运行的 demo(项目演示)托管在可以公开访问的平台上。 然后将 demo 的 URL 提交到 `Solution Link` 字段中。 +当你完成后,请将一个确保正常运行的 demo(项目演示)托管在可以公开访问的平台上。 然后将 demo 的 URL 提交到 Solution Link 字段中。 模板引擎使你可以在应用程序中使用静态模板文件(例如用 *Pug* 编写的文件)。 在运行时,模版引擎会用服务端的真实数据替换掉模版文件中的变量。 然后将模版转译成发送给客户端的 HTML 静态文件。 这样可以轻松地构造 HTML 页面,允许在页面直接显示变量内容而不需要从客户端发送 API 请求。 diff --git a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/learn-how-javascript-assertions-work.md b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/learn-how-javascript-assertions-work.md index 7e63305eaf8..fa9932a86d3 100644 --- a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/learn-how-javascript-assertions-work.md +++ b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-and-testing-with-chai/learn-how-javascript-assertions-work.md @@ -20,7 +20,7 @@ dashedName: learn-how-javascript-assertions-work - 接着,你将看到一个 `.replit` 窗口。 - 选择 `Use run command` 并点击 `Done` 按钮。 -当你完成后,请将一个确保正常运行的 demo(项目演示)托管在可以公开访问的平台上。 然后将 demo 的 URL 提交到 `Solution Link` 字段中。 +当你完成后,请将一个确保正常运行的 demo(项目演示)托管在可以公开访问的平台上。 然后将 demo 的 URL 提交到 Solution Link 字段中。 # --instructions-- diff --git a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/american-british-translator.md b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/american-british-translator.md index e8e64d53982..b8a4a3d9b11 100644 --- a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/american-british-translator.md +++ b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/american-british-translator.md @@ -20,7 +20,7 @@ dashedName: american-british-translator - 接着,你将看到一个 `.replit` 窗口。 - 选择 `Use run command` 并点击 `Done` 按钮。 -当你完成后,请将一个确保正常运行的 demo(项目演示)托管在可以公开访问的平台上。 然后将 demo 的 URL 提交到 `Solution Link` 字段中。 也可以将项目的源码链接提交到 `GitHub Link` 字段中。 +当你完成后,请将一个确保正常运行的 demo(项目演示)托管在可以公开访问的平台上。 然后将 demo 的 URL 提交到 Solution Link 字段中。 也可以将项目的源码链接提交到 GitHub Link 字段中。 # --instructions-- diff --git a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/issue-tracker.md b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/issue-tracker.md index 40bc861c838..05b4f1becea 100644 --- a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/issue-tracker.md +++ b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/issue-tracker.md @@ -20,7 +20,7 @@ dashedName: issue-tracker - 接着,你将看到一个 `.replit` 窗口。 - 选择 `Use run command` 并点击 `Done` 按钮。 -当你完成后,请将一个确保正常运行的 demo(项目演示)托管在可以公开访问的平台上。 然后将 demo 的 URL 提交到 `Solution Link` 字段中。 也可以将项目的源码链接提交到 `GitHub Link` 字段中。 +当你完成后,请将一个确保正常运行的 demo(项目演示)托管在可以公开访问的平台上。 然后将 demo 的 URL 提交到 Solution Link 字段中。 也可以将项目的源码链接提交到 GitHub Link 字段中。 # --instructions-- diff --git a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md index 1897b2098de..200f1b79101 100644 --- a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md +++ b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md @@ -20,7 +20,7 @@ dashedName: metric-imperial-converter - 接着,你将看到一个 `.replit` 窗口。 - 选择 `Use run command` 并点击 `Done` 按钮。 -当你完成后,请将一个确保正常运行的 demo(项目演示)托管在可以公开访问的平台上。 然后将 demo 的 URL 提交到 `Solution Link` 字段中。 也可以将项目的源码链接提交到 `GitHub Link` 字段中。 +当你完成后,请将一个确保正常运行的 demo(项目演示)托管在可以公开访问的平台上。 然后将 demo 的 URL 提交到 Solution Link 字段中。 也可以将项目的源码链接提交到 GitHub Link 字段中。 # --instructions-- diff --git a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/personal-library.md b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/personal-library.md index 9c3410c27af..bf12e7ee274 100644 --- a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/personal-library.md +++ b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/personal-library.md @@ -20,7 +20,7 @@ dashedName: personal-library - 接着,你将看到一个 `.replit` 窗口。 - 选择 `Use run command` 并点击 `Done` 按钮。 -当你完成后,请将一个确保正常运行的 demo(项目演示)托管在可以公开访问的平台上。 然后将 demo 的 URL 提交到 `Solution Link` 字段中。 也可以将项目的源码链接提交到 `GitHub Link` 字段中。 +当你完成后,请将一个确保正常运行的 demo(项目演示)托管在可以公开访问的平台上。 然后将 demo 的 URL 提交到 Solution Link 字段中。 也可以将项目的源码链接提交到 GitHub Link 字段中。 # --instructions-- diff --git a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/sudoku-solver.md b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/sudoku-solver.md index b10afa901b4..3a8baa293fe 100644 --- a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/sudoku-solver.md +++ b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/sudoku-solver.md @@ -20,7 +20,7 @@ dashedName: sudoku-solver - 接着,你将看到一个 `.replit` 窗口。 - 选择 `Use run command` 并点击 `Done` 按钮。 -当你完成后,请将一个确保正常运行的 demo(项目演示)托管在可以公开访问的平台上。 然后将 demo 的 URL 提交到 `Solution Link` 字段中。 也可以将项目的源码链接提交到 `GitHub Link` 字段中。 +当你完成后,请将一个确保正常运行的 demo(项目演示)托管在可以公开访问的平台上。 然后将 demo 的 URL 提交到 Solution Link 字段中。 也可以将项目的源码链接提交到 GitHub Link 字段中。 # --instructions-- diff --git a/curriculum/challenges/chinese/09-information-security/information-security-projects/anonymous-message-board.md b/curriculum/challenges/chinese/09-information-security/information-security-projects/anonymous-message-board.md index b6a0234d23a..bcb40b71bfd 100644 --- a/curriculum/challenges/chinese/09-information-security/information-security-projects/anonymous-message-board.md +++ b/curriculum/challenges/chinese/09-information-security/information-security-projects/anonymous-message-board.md @@ -22,7 +22,7 @@ dashedName: anonymous-message-board - 接着,你将看到一个 `.replit` 窗口。 - 选择 `Use run command` 并点击 `Done` 按钮。 -完成本项目后,请将一个正常运行的 demo(项目演示)托管在可以公开访问的平台。 然后将 URL 提交到 `Solution Link` 中。 此外,将项目的源码链接提交到 `GitHub Link` 字段中。 +完成本项目后,请将一个正常运行的 demo(项目演示)托管在可以公开访问的平台。 然后将 demo 的 URL 提交到 Solution Link 字段中。 也可以将项目的源码链接提交到 GitHub Link 字段中。 # --instructions-- diff --git a/curriculum/challenges/chinese/09-information-security/information-security-projects/secure-real-time-multiplayer-game.md b/curriculum/challenges/chinese/09-information-security/information-security-projects/secure-real-time-multiplayer-game.md index 8612b76b18b..e2419aeddc4 100644 --- a/curriculum/challenges/chinese/09-information-security/information-security-projects/secure-real-time-multiplayer-game.md +++ b/curriculum/challenges/chinese/09-information-security/information-security-projects/secure-real-time-multiplayer-game.md @@ -20,7 +20,7 @@ dashedName: secure-real-time-multiplayer-game - 接着,你将看到一个 `.replit` 窗口。 - 选择 `Use run command` 并点击 `Done` 按钮。 -当你完成后,请将一个确保正常运行的 demo(项目演示)托管在可以公开访问的平台上。 然后将 demo 的 URL 提交到 `Solution Link` 字段中。 也可以将项目的源码链接提交到 `GitHub Link` 字段中。 +当你完成后,请将一个确保正常运行的 demo(项目演示)托管在可以公开访问的平台上。 然后将 demo 的 URL 提交到 Solution Link 字段中。 也可以将项目的源码链接提交到 GitHub Link 字段中。 # --instructions-- diff --git a/curriculum/challenges/chinese/09-information-security/information-security-projects/stock-price-checker.md b/curriculum/challenges/chinese/09-information-security/information-security-projects/stock-price-checker.md index e9b8056193a..57ebe32f7d2 100644 --- a/curriculum/challenges/chinese/09-information-security/information-security-projects/stock-price-checker.md +++ b/curriculum/challenges/chinese/09-information-security/information-security-projects/stock-price-checker.md @@ -24,7 +24,7 @@ dashedName: stock-price-checker - 接着,你将看到一个 `.replit` 窗口。 - 选择 `Use run command` 并点击 `Done` 按钮。 -当你完成后,请将一个确保正常运行的 demo(项目演示)托管在可以公开访问的平台上。 然后将 demo 的 URL 提交到 `Solution Link` 字段中。 也可以将项目的源码链接提交到 `GitHub Link` 字段中。 +当你完成后,请将一个确保正常运行的 demo(项目演示)托管在可以公开访问的平台上。 然后将 demo 的 URL 提交到 Solution Link 字段中。 也可以将项目的源码链接提交到 GitHub Link 字段中。 # --instructions-- diff --git a/curriculum/challenges/chinese/09-information-security/information-security-with-helmetjs/install-and-require-helmet.md b/curriculum/challenges/chinese/09-information-security/information-security-with-helmetjs/install-and-require-helmet.md index 62a0154c9f2..82d3a622d9a 100644 --- a/curriculum/challenges/chinese/09-information-security/information-security-with-helmetjs/install-and-require-helmet.md +++ b/curriculum/challenges/chinese/09-information-security/information-security-with-helmetjs/install-and-require-helmet.md @@ -20,7 +20,7 @@ dashedName: install-and-require-helmet - 接着,你将看到一个 `.replit` 窗口。 - 选择 `Use run command` 并点击 `Done` 按钮。 -当你完成后,请将一个确保正常运行的 demo(项目演示)托管在可以公开访问的平台上。 然后将 demo 的 URL 提交到 `Solution Link` 字段中。 +当你完成后,请将一个确保正常运行的 demo(项目演示)托管在可以公开访问的平台上。 然后将 demo 的 URL 提交到 Solution Link 字段中。 Helmet 通过设置各种 HTTP 头来保护你的 Express 应用程序。 diff --git a/curriculum/challenges/chinese/10-coding-interview-prep/algorithms/implement-binary-search.md b/curriculum/challenges/chinese/10-coding-interview-prep/algorithms/implement-binary-search.md index d0153acf95a..b3227def516 100644 --- a/curriculum/challenges/chinese/10-coding-interview-prep/algorithms/implement-binary-search.md +++ b/curriculum/challenges/chinese/10-coding-interview-prep/algorithms/implement-binary-search.md @@ -10,9 +10,10 @@ dashedName: implement-binary-search 二分搜索是一种 **O(log(n))** 效率的算法,用于在已排序的数组以查找元素。 它通过以下步骤运行: -1. 查找已排序数组的中间值 `value`。 如果 `value == target`,则返回(找到了!)。 +1. 查找已排序数组的中间值 `value`。 If `value == target` return `true` (The value has been found and the search is complete). 1. 如果中间值 `value < target`,则在下一次比较中搜索数组的右半部分。 1. 如果中间值 `value > target`,则在下一次比较中搜索数组的左半部分。 +1. If after searching the whole array the value is not present, return `false` (The array has been searched and the value is not in the array). 如你所见,你连续将数组减半,这为你提供了 log(n) 效率。 对于这个挑战,我们希望你展示你的工作——你是如何到达目标值的……你走过的路! @@ -20,7 +21,7 @@ dashedName: implement-binary-search 编写一个函数 `binarySearch` 来实现对数组的二分查找算法,返回在数组中查找目标所采用的路径(每个中间值比较)。 -该函数将一个排序的整数数组和一个目标值作为输入。 它返回一个数组,其中包含(按顺序)你在原始数组的每个减半处找到的中间值,直到你找到目标值。 目标值应该是返回数组的最后一个元素。 如果未找到值,则返回字符串 `Value Not Found`。 +该函数将一个排序的整数数组和一个目标值作为输入。 它返回一个数组,其中包含(按顺序)你在原始数组的每个减半处找到的中间值,直到你找到目标值。 目标值应该是返回数组的最后一个元素。 If the value is not found, return the string `Value Not Found`. 例如,`binarySearch([1,2,3,4,5,6,7], 5)` 将返回 `[4,6,5]`。 diff --git a/curriculum/challenges/chinese/10-coding-interview-prep/take-home-projects/build-a-nightlife-coordination-app.md b/curriculum/challenges/chinese/10-coding-interview-prep/take-home-projects/build-a-nightlife-coordination-app.md index 5d14be58d8e..189e2d2efa4 100644 --- a/curriculum/challenges/chinese/10-coding-interview-prep/take-home-projects/build-a-nightlife-coordination-app.md +++ b/curriculum/challenges/chinese/10-coding-interview-prep/take-home-projects/build-a-nightlife-coordination-app.md @@ -22,7 +22,7 @@ Here are the specific user stories you should implement for this project: **Hint:** Try using the Yelp API to find venues in the cities your users search for. 如果使用 Yelp 的 API,请务必在应用中提及。 -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --solutions-- diff --git a/curriculum/challenges/chinese/10-coding-interview-prep/take-home-projects/build-a-voting-app.md b/curriculum/challenges/chinese/10-coding-interview-prep/take-home-projects/build-a-voting-app.md index c5e1f8c05dd..e70b3566764 100644 --- a/curriculum/challenges/chinese/10-coding-interview-prep/take-home-projects/build-a-voting-app.md +++ b/curriculum/challenges/chinese/10-coding-interview-prep/take-home-projects/build-a-voting-app.md @@ -28,7 +28,7 @@ Here are the specific user stories you should implement for this project: **User Story:** As an authenticated user, if you don't like the options on a poll, you can create a new option. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --solutions-- diff --git a/curriculum/challenges/chinese/10-coding-interview-prep/take-home-projects/build-an-image-search-abstraction-layer.md b/curriculum/challenges/chinese/10-coding-interview-prep/take-home-projects/build-an-image-search-abstraction-layer.md index 47cee2ababe..4c4540d7fce 100644 --- a/curriculum/challenges/chinese/10-coding-interview-prep/take-home-projects/build-an-image-search-abstraction-layer.md +++ b/curriculum/challenges/chinese/10-coding-interview-prep/take-home-projects/build-an-image-search-abstraction-layer.md @@ -18,7 +18,7 @@ Here are the specific user stories you should implement for this project: **User Story:** You can get a list of the most recently submitted search strings. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --solutions-- diff --git a/curriculum/challenges/chinese/10-coding-interview-prep/take-home-projects/chart-the-stock-market.md b/curriculum/challenges/chinese/10-coding-interview-prep/take-home-projects/chart-the-stock-market.md index a5562365284..c43de0dbaef 100644 --- a/curriculum/challenges/chinese/10-coding-interview-prep/take-home-projects/chart-the-stock-market.md +++ b/curriculum/challenges/chinese/10-coding-interview-prep/take-home-projects/chart-the-stock-market.md @@ -20,7 +20,7 @@ Here are the specific user stories you should implement for this project: **User Story:** You can see changes in real-time when any other user adds or removes a stock. For this you will need to use Web Sockets. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --solutions-- diff --git a/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/elements-and-tags-question-a.md b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/elements-and-tags-question-a.md new file mode 100644 index 00000000000..f4b05b12871 --- /dev/null +++ b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/elements-and-tags-question-a.md @@ -0,0 +1,54 @@ +--- +id: 637f4e0e72c65bc8e73dfe1e +videoId: LGQuIIv2RVA +title: Elements and Tags Question A +challengeType: 15 +dashedName: elements-and-tags-question-a +--- + +# --description-- + +Almost all elements on an HTML page are just pieces of content wrapped in opening and closing HTML tags. + +Opening tags tell the browser this is the start of an HTML element. They are comprised of a keyword enclosed in angle brackets `<>`. For example, an opening paragraph tag looks like this: `

                                                                  `. + +Closing tags tell the browser where an element ends. They are almost the same as opening tags; the only difference is that they have a forward slash before the keyword. For example, a closing paragraph tag looks like this: `

                                                                  `. + +A full paragraph element looks like this: + +element diagram + +You can think of elements as containers for content. The opening and closing tags tell the browser what content the element contains. The browser can then use that information to determine how it should interpret and format the content. + +There are some HTML elements that do not have a closing tag. These elements often look like this: `
                                                                  ` or ``, but some can also be used without the closing forward slash such as `
                                                                  ` or ``. These are known as self-closing tags or empty elements because they don’t wrap any content. You will encounter a few of these in later lessons, but for the most part, elements will have both opening and closing tags. + +HTML has a vast list of predefined tags that you can use to create all kinds of different elements. It is important to use the correct tags for content. Using the correct tags can have a big impact on two aspects of your sites: how they are ranked in search engines; and how accessible they are to users who rely on assistive technologies, like screen readers, to use the internet. + +Using the correct elements for content is called semantic HTML. You will explore this in much more depth later on in the curriculum. + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s [Introduction to HTML video](https://www.youtube.com/watch?v=LGQuIIv2RVA&list=PL4-IK0AVhVjM0xE0K2uZRvsM7LkIhsPT-) + +## --text-- + +What are HTML tags? + +## --answers-- + +HTML tags tell the browser what content an element contains. + +--- + +HTML tags tell the browser when to load its content. + +--- + +HTML tags tell the browser what content the next element contains. + + +## --video-solution-- + +1 diff --git a/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/elements-and-tags-question-b.md b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/elements-and-tags-question-b.md new file mode 100644 index 00000000000..9e8720616fb --- /dev/null +++ b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/elements-and-tags-question-b.md @@ -0,0 +1,50 @@ +--- +id: 637f4e1672c65bc8e73dfe1f +videoId: LGQuIIv2RVA +title: Elements and Tags Question B +challengeType: 15 +dashedName: elements-and-tags-question-b +--- + +# --description-- + +Almost all elements on an HTML page are just pieces of content wrapped in opening and closing HTML tags. + +Opening tags tell the browser this is the start of an HTML element. They are comprised of a keyword enclosed in angle brackets <>. For example, an opening paragraph tag looks like this: `

                                                                  `. + +Closing tags tell the browser where an element ends. They are almost the same as opening tags; the only difference is that they have a forward slash before the keyword. For example, a closing paragraph tag looks like this: `

                                                                  `. + +A full paragraph element looks like this: + +element diagram + +You can think of elements as containers for content. The opening and closing tags tell the browser what content the element contains. The browser can then use that information to determine how it should interpret and format the content. + +There are some HTML elements that do not have a closing tag. These elements often look like this: `
                                                                  ` or ``, but some can also be used without the closing forward slash such as `
                                                                  ` or ``. These are known as self-closing tags or empty elements because they don’t wrap any content. You will encounter a few of these in later lessons, but for the most part, elements will have both opening and closing tags. + +HTML has a vast list of predefined tags that you can use to create all kinds of different elements. It is important to use the correct tags for content. Using the correct tags can have a big impact on two aspects of your sites: how they are ranked in search engines; and how accessible they are to users who rely on assistive technologies, like screen readers, to use the internet. + +Using the correct elements for content is called semantic HTML. You will explore this in much more depth later on in the curriculum. + +# --question-- + +## --text-- + +What are the three parts of most HTML elements? + +## --answers-- + +An opening tag, self closing tag, and content. + +--- + +An opening tag, closing tag, and content. + +--- + +An opening tag, closing tag, and attribute. + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/html-boilerplate-question-a.md b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/html-boilerplate-question-a.md new file mode 100644 index 00000000000..d563ebf0ac3 --- /dev/null +++ b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/html-boilerplate-question-a.md @@ -0,0 +1,55 @@ +--- +id: 637f4e1c72c65bc8e73dfe20 +videoId: V8UAEoOvqFg +title: HTML Boilerplate Question A +challengeType: 15 +dashedName: html-boilerplate-question-a +--- + +# --description-- + +To demonstrate an HTML boilerplate, you first need an HTML file to work with. + +Create a new folder on your computer and name it `html-boilerplate`. Within that folder create a new file and name it `index.html`. + +You’re probably already familiar with a lot of different types of files, for example doc, pdf, and image files. + +To let the computer know you want to create an HTML file, you need to append the filename with the `.html` extension as you have done when creating the `index.html` file. + +It is worth noting that you named your HTML file index. You should always name the HTML file that will contain the homepage of your websites `index.html`. This is because web servers will by default look for an index.html page when users land on your websites - and not having one will cause big problems. + +## The DOCTYPE + +Every HTML page starts with a doctype declaration. The doctype’s purpose is to tell the browser what version of HTML it should use to render the document. The latest version of HTML is HTML5, and the doctype for that version is simply ``. + +The doctypes for older versions of HTML were a bit more complicated. For example, this is the doctype declaration for HTML4: + +```html + +``` + +However, you probably won’t ever want to be using an older version of HTML, and so you’ll always use ``. + +Open the `index.html` file created earlier in your text editor and add `` to the very first line. + +# --question-- +## --text-- + +What is the purpose of the `DOCTYPE` declaration? + +## --answers-- + +It tells the browser which version of HTML to use to render the document. + +--- + +It tells the browser that this document uses JavaScript. + +--- + +It tells the browser the title of the document. + + +## --video-solution-- + +1 diff --git a/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/html-boilerplate-question-b.md b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/html-boilerplate-question-b.md new file mode 100644 index 00000000000..7a528432239 --- /dev/null +++ b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/html-boilerplate-question-b.md @@ -0,0 +1,47 @@ +--- +id: 637f4e2872c65bc8e73dfe21 +videoId: V8UAEoOvqFg +title: HTML Boilerplate Question B +challengeType: 15 +dashedName: html-boilerplate-question-b +--- + +# --description-- + +After you declare the doctype, you need to provide an `` element. This is what’s known as the root element of the document, meaning that every other element in the document will be a descendant of it. + +This becomes more important later on when you learn about manipulating HTML with JavaScript. For now, just know that the `html` element should be included on every HTML document. + +Back in the `index.html` file, let’s add the `` element by typing out its opening and closing tags, like so: + +```html + + + +``` + +## What is the lang attribute? +`lang` specifies the language of the text content in that element. This attribute is primarily used for improving accessibility of the webpage. It allows assistive technologies, for example screen readers, to adapt according to the language and invoke correct pronunciation. + +# --question-- + +## --text-- + +What is the `html` element? + +## --answers-- + +It is the root element in the document and tells the browser which version of HTML it should use. + +--- + +It is the root element in the document and all other elements should descend from it. + +--- + +It is the root element in the document and all other elements should come after it. + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/html-boilerplate-question-c.md b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/html-boilerplate-question-c.md new file mode 100644 index 00000000000..76ceb2841e5 --- /dev/null +++ b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/html-boilerplate-question-c.md @@ -0,0 +1,66 @@ +--- +id: 637f4e2f72c65bc8e73dfe22 +videoId: LGQuIIv2RVA +title: HTML Boilerplate Question C +challengeType: 15 +dashedName: html-boilerplate-question-c +--- + +# --description-- + +The `` element is where you put important meta-information about your webpages, and stuff required for your webpages to render correctly in the browser. Inside the ``, you should not use any element that displays content on the webpage. + +## The Charset Meta Element +You should always have the `meta` tag for the charset encoding of the webpage in the head element: ``. + +Setting the encoding is very important because it ensures that the webpage will display special symbols and characters from different languages correctly in the browser. + +## Title Element +Another element you should always include in the head of an HTML document is the `title` element: + +```html +My First Webpage +``` + +The `title` element is used to give webpages a human-readable title which is displayed in your webpage’s browser tab. + +If you didn’t include a `title` element, the webpage’s title would default to its file name. In your case that would be `index.html`, which isn’t very meaningful for users; this would make it very difficult to find your webpage if the user has many browser tabs open. + +There are many more elements that can go within the `head` of an HTML document. However, for now it’s only crucial to know about the two elements you have covered here. You will introduce more elements that go into the `head` throughout the rest of the curriculum. + +Back in `index.html` file, let’s add a `head` element with a `charset` `meta` element and a `title` within it. The head element goes within the HTML element and should always be the first element under the opening `` tag: + + +```html + + + + + + My First Webpage + + +``` + +# --question-- + +## --text-- + +What is the purpose of the `head` element? + +## --answers-- + +The `head` element is used to display all elements that are displayed on the webpage. + +--- + +The `head` element is used to display important information about your webpage and is used to render web pages correctly with `meta` elements. + +--- + +The `head` element is used to display the header content on top of the webpage. + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/html-boilerplate-question-d.md b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/html-boilerplate-question-d.md new file mode 100644 index 00000000000..302b6a95d44 --- /dev/null +++ b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/html-boilerplate-question-d.md @@ -0,0 +1,48 @@ +--- +id: 637f4e3672c65bc8e73dfe23 +videoId: V8UAEoOvqFg +title: HTML Boilerplate Question D +challengeType: 15 +dashedName: html-boilerplate-question-d +--- + +# --description-- + +The final element needed to complete the HTML boilerplate is the `` element. This is where all the content that will be displayed to users will go - the text, images, lists, links, and so on. + +To complete the boilerplate, add a `body` element to the `index.html` file. The `body` element also goes within the `html` element and is always below the `head` element, like so: + +# --question-- + +## --assignment-- + +Watch and follow along to Kevin Powell’s brilliant Building your first web page video above. + +--- + +Build some muscle memory by deleting the contents of the `index.html` file and trying to write out all the boilerplate again from memory. Don’t worry if you have to peek at the lesson content the first few times if you get stuck. Just keep going until you can do it a couple of times from memory. + +--- + +Run your boilerplate through this [HTML validator](https://www.freeformatter.com/html-validator.html). Validators ensure your markup is correct and are an excellent learning tool, as they provide feedback on syntax errors you may be making often and aren’t aware of, such as missing closing tags and extra spaces in your HTML. + +## --text-- + +What is the purpose of the `body` element? + +## --answers-- + +This is where all important information about the webpage is displayed such as the `title` and `meta` tags. + +--- + +This is where you tell the browser how to render the webpage correctly. + +--- + +This is where all content will be displayed on the page such images, text, and links. + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-a.md b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-a.md new file mode 100644 index 00000000000..aa20f137e89 --- /dev/null +++ b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-a.md @@ -0,0 +1,42 @@ +--- +id: 6374f208de18c50e48ba767b +videoId: LGQuIIv2RVA +title: Introduction To HTML and CSS Question A +challengeType: 15 +dashedName: introduction-to-html-and-css-question-a +--- + +# --description-- + +HTML and CSS are two languages that work together to create everything that you see when you look at something on the internet. HTML is the raw data that a webpage is built out of. All the text, links, cards, lists, and buttons are created in HTML. CSS is what adds style to those plain elements. HTML puts information on a webpage, and CSS positions that information, gives it color, changes the font, and makes it look great! + +Many helpful resources out there keep referring to HTML and CSS as programming languages, but if you want to get technical, labeling them as such is not quite accurate. This is because they are only concerned with presenting information. They are not used to program logic. JavaScript, which you will learn in the next section, is a programming language because it’s used to make webpages do things. Yet, there is quite a lot you can do with just HTML and CSS, and you will definitely need them both. Throughout our curriculum, the following lessons focus on giving you the tools you need to succeed once you reach JavaScript content. + +# --question-- + +## --assignment-- + +Read the HTML vs CSS vs JavaScript article. It is a quick overview of the relationships between HTML, CSS, and JavaScript. + +## --text-- + +Which of the following statements is true? + +## --answers-- + +CSS is used to create the basic structure of a webpage, and HTML is used to add style. + +--- + +HTML is used to create the basic structure of a webpage, and CSS is used to add style. + +--- + +HTML and CSS are used to add style to a webpage, and JavaScript is used to create the basic structure. + + +## --video-solution-- + +2 + + diff --git a/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-b.md b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-b.md new file mode 100644 index 00000000000..cd9cf900330 --- /dev/null +++ b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-b.md @@ -0,0 +1,37 @@ +--- +id: 6376327e2724a688c04636e3 +videoId: LGQuIIv2RVA +title: Introduction To HTML and CSS Question B +challengeType: 15 +dashedName: introduction-to-html-and-css-question-b +--- + +# --description-- + + +HTML and CSS are two languages that work together to create everything that you see when you look at something on the internet. HTML is the raw data that a webpage is built out of. All the text, links, cards, lists, and buttons are created in HTML. CSS is what adds style to those plain elements. HTML puts information on a webpage, and CSS positions that information, gives it color, changes the font, and makes it look great! + +Many helpful resources out there keep referring to HTML and CSS as programming languages, but if you want to get technical, labeling them as such is not quite accurate. This is because they are only concerned with presenting information. They are not used to program logic. JavaScript, which you will learn in the next section, is a programming language because it’s used to make webpages do things. Yet, there is quite a lot you can do with just HTML and CSS, and you will definitely need them both. Throughout our curriculum, the following lessons focus on giving you the tools you need to succeed once you reach JavaScript content. + +# --question-- + +## --text-- + +Between HTML and CSS, which should you use to add paragraphs of text on a webpage? + +## --answers-- + +CSS + +--- + +JavaScript + +--- + +HTML + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-c.md b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-c.md new file mode 100644 index 00000000000..eb759394680 --- /dev/null +++ b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-c.md @@ -0,0 +1,34 @@ +--- +id: 637633162724a688c04636e4 +videoId: LGQuIIv2RVA +title: Introduction To HTML and CSS Question C +challengeType: 15 +dashedName: introduction-to-html-and-css-question-c +--- + +# --description-- + +HTML and CSS are two languages that work together to create everything that you see when you look at something on the internet. HTML is the raw data that a webpage is built out of. All the text, links, cards, lists, and buttons are created in HTML. CSS is what adds style to those plain elements. HTML puts information on a webpage, and CSS positions that information, gives it color, changes the font, and makes it look great! + +Many helpful resources out there keep referring to HTML and CSS as programming languages, but if you want to get technical, labeling them as such is not quite accurate. This is because they are only concerned with presenting information. They are not used to program logic. JavaScript, which you will learn in the next section, is a programming language because it’s used to make webpages do things. Yet, there is quite a lot you can do with just HTML and CSS, and you will definitely need them both. Throughout our curriculum, the following lessons focus on giving you the tools you need to succeed once you reach JavaScript content. +# --question-- + +## --text-- + +Between HTML and CSS, which should you use to change the font and background color of a button? + +## --answers-- + +You should use CSS to change the background color and font of a button. + +--- + +You should use JavaScript to change the background color and font of a button. + +--- + +You should use HTML to change the background color and font of a button. + +## --video-solution-- + +1 diff --git a/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-d.md b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-d.md new file mode 100644 index 00000000000..9e9ee049b75 --- /dev/null +++ b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-d.md @@ -0,0 +1,35 @@ +--- +id: 637633672724a688c04636e5 +videoId: LGQuIIv2RVA +title: Introduction To HTML and CSS Question D +challengeType: 15 +dashedName: introduction-to-html-and-css-question-d +--- + +# --description-- + +HTML and CSS are two languages that work together to create everything that you see when you look at something on the internet. HTML is the raw data that a webpage is built out of. All the text, links, cards, lists, and buttons are created in HTML. CSS is what adds style to those plain elements. HTML puts information on a webpage, and CSS positions that information, gives it color, changes the font, and makes it look great! + +Many helpful resources out there keep referring to HTML and CSS as programming languages, but if you want to get technical, labeling them as such is not quite accurate. This is because they are only concerned with presenting information. They are not used to program logic. JavaScript, which you will learn in the next section, is a programming language because it’s used to make webpages do things. Yet, there is quite a lot you can do with just HTML and CSS, and you will definitely need them both. Throughout our curriculum, the following lessons focus on giving you the tools you need to succeed once you reach JavaScript content. + +# --question-- + +## --text-- + +What is the difference between HTML, CSS, and JavaScript? + +## --answers-- + +HTML is for creating interactive elements, CSS is for the look and feel, and JavaScript is for creating the structure of a webpage. + +--- + +CSS is for the look and feel, JavaScript is for creating interactive elements, and HTML is for creating the structure of a webpage. + +--- + +JavaScript is for the look and feel, CSS is for creating the structure, and HTML is for creating interactive elements of a webpage. + +## --video-solution-- + +2 diff --git a/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/links-and-images-question-a.md b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/links-and-images-question-a.md new file mode 100644 index 00000000000..b4d237448f3 --- /dev/null +++ b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/links-and-images-question-a.md @@ -0,0 +1,66 @@ +--- +id: 637f704072c65bc8e73dfe36 +videoId: tsEQgGjSmkM +title: Links and Images Question A +challengeType: 15 +dashedName: links-and-images-question-a +--- + +# --description-- + +To get some practice using links and images throughout this lesson you need an HTML project to work with. + +- Create a new directory named `odin-links-and-images`. + +- Within that directory, create a new file named `index.html`. + +- Fill in the usual HTML boilerplate. + +- Finally, add the following `h1` to the `body`: `

                                                                  Homepage

                                                                  ` + +## Anchor Elements +To create a link in HTML, you use the anchor element. An anchor element is defined by wrapping the text or another HTML element you want to be a link with an `` tag. Add the following to the `body` of the `index.html` page you created and open it in the browser: + +```html +click me +``` + +You may have noticed that clicking this link doesn’t do anything. This is because an anchor tag on its own won’t know where you want to link to. You have to tell it a destination to go to. You do this by using an HTML attribute. + +An HTML attribute gives additional information to an HTML element and always goes in the element’s opening tag. An attribute is usually made up of two parts: a name, and a value; however, not all attributes require a value. In your case, you need to add a `href` (hyperlink reference) attribute to the opening anchor tag. The value of the `href` attribute is the destination you want your link to go to. + +Add the following `href` attribute to the anchor element you created previously and try clicking it again, don’t forget to refresh the browser so the new changes can be applied. + +```html +click me +``` + +By default, any text wrapped with an anchor tag without a `href` attribute will look like plain text. If the `href` attribute is present, the browser will give the text a blue color and underline it to signify it is a link. + +It’s worth noting you can use anchor tags to link to any kind of resource on the internet, not just other HTML documents. You can link to videos, pdf files, images, and so on, but for the most part, you will be linking to other HTML documents. + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s HTML Links video above. + +## --text-- + +What HTML tag is used to create a link? + +## --answers-- + +`` + +--- + +`

                                                                  ` + +--- + +`

                                                                    ` + +## --video-solution-- + +1 diff --git a/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/links-and-images-question-b.md b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/links-and-images-question-b.md new file mode 100644 index 00000000000..164fb01214f --- /dev/null +++ b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/links-and-images-question-b.md @@ -0,0 +1,55 @@ +--- +id: 637f703572c65bc8e73dfe35 +videoId: tsEQgGjSmkM +title: Links and Images Question B +challengeType: 15 +dashedName: links-and-images-question-b +--- + +# --description-- + +To get some practice using links and images throughout this lesson you need an HTML project to work with. + +- Create a new directory named odin-links-and-images. + +- Within that directory, create a new file named index.html. + +- Fill in the usual HTML boilerplate. + +- finally, add the following h1 to the body: `

                                                                    Homepage

                                                                    ` + +## Anchor Elements +To create a link in HTML, you use the anchor element. An anchor element is defined by wrapping the text or another HTML element you want to be a link with an `
                                                                    ` tag. Add the following to the body of the index.html page you created and open it in the browser: + +```html +click me +``` + +You may have noticed that clicking this link doesn’t do anything. This is because an anchor tag on its own won’t know where you want to link to. You have to tell it a destination to go to. You do this by using an HTML attribute. An HTML attribute gives additional information to an HTML element and always goes in the element’s opening tag. An attribute is usually made up of two parts: a name, and a value; however, not all attributes require a value. In your case, you need to add a href (hyperlink reference) attribute to the opening anchor tag. The value of the href attribute is the destination you want your link to go to. Add the following href attribute to the anchor element you created previously and try clicking it again, don’t forget to refresh the browser so the new changes can be applied. + +```html +click me +``` + +By default, any text wrapped with an anchor tag without a `href` attribute will look like plain text. If the `href` attribute is present, the browser will give the text a blue color and underline it to signify it is a link. It’s worth noting you can use anchor tags to link to any kind of resource on the internet, not just other HTML documents. You can link to videos, pdf files, images, and so on, but for the most part, you will be linking to other HTML documents. + +# --question-- +## --text-- + +What is an attribute? +## --answers-- + +An HTML attribute gives additional information to an HTML element and always goes in the element’s closing tag. + +--- + +An HTML attribute is used to tell the browser what the element contains. + +--- + +An HTML attribute gives additional information to an HTML element and always goes in the element’s opening tag. + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/links-and-images-question-c.md b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/links-and-images-question-c.md new file mode 100644 index 00000000000..c8a3913d77e --- /dev/null +++ b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/links-and-images-question-c.md @@ -0,0 +1,56 @@ +--- +id: 637f703072c65bc8e73dfe34 +videoId: tsEQgGjSmkM +title: Links and Images Question C +challengeType: 15 +dashedName: links-and-images-question-c +--- + +# --description-- + +To get some practice using links and images throughout this lesson you need an HTML project to work with. + +- Create a new directory named odin-links-and-images. + +- Within that directory, create a new file named index.html. + +- Fill in the usual HTML boilerplate. + +- finally, add the following h1 to the body: `

                                                                    Homepage

                                                                    ` + +## Anchor Elements +To create a link in HTML, you use the anchor element. An anchor element is defined by wrapping the text or another HTML element you want to be a link with an `` tag. Add the following to the body of the index.html page you created and open it in the browser: + +```html +click me +``` + +You may have noticed that clicking this link doesn’t do anything. This is because an anchor tag on its own won’t know where you want to link to. You have to tell it a destination to go to. You do this by using an HTML attribute. An HTML attribute gives additional information to an HTML element and always goes in the element’s opening tag. An attribute is usually made up of two parts: a name, and a value; however, not all attributes require a value. In your case, you need to add a href (hyperlink reference) attribute to the opening anchor tag. The value of the href attribute is the destination you want your link to go to. Add the following href attribute to the anchor element you created previously and try clicking it again, don’t forget to refresh the browser so the new changes can be applied. + +```html +click me +``` + +By default, any text wrapped with an anchor tag without a `href` attribute will look like plain text. If the `href` attribute is present, the browser will give the text a blue color and underline it to signify it is a link. It’s worth noting you can use anchor tags to link to any kind of resource on the internet, not just other HTML documents. You can link to videos, pdf files, images, and so on, but for the most part, you will be linking to other HTML documents. + +# --question-- + +## --text-- + +What attribute tells links where to go to? + +## --answers-- + +`src` + +--- + +`href` + +--- + +`link` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/links-and-images-question-d.md b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/links-and-images-question-d.md new file mode 100644 index 00000000000..2b6a665eb87 --- /dev/null +++ b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/links-and-images-question-d.md @@ -0,0 +1,112 @@ +--- +id: 637f702872c65bc8e73dfe33 +videoId: ta3Oxx7Yqbo +title: Links and Images Question D +challengeType: 15 +dashedName: links-and-images-question-d +--- + +# --description-- + + +Generally, there are two kinds of links you will create: + +- Links to pages on other websites on the internet + +- Links to pages located on your own websites + + +## Absolute Links +Links to pages on other websites on the internet are called absolute links. A typical absolute link will be made up of the following parts: `protocol://domain/path`. An absolute link will always contain the protocol and domain of the destination. + +You’ve already seen an absolute link in action. The link you created to The Odin Project’s About page earlier was an absolute link as it contains the protocol and domain. + +`https://www.theodinproject.com/about` + +## Relative Links +Links to other pages within your own website are called relative links. Relative links do not include the domain name, since it is another page on the same site, it assumes the domain name will be the same as the page you created the link on. + +Relative links only include the file path to the other page, relative to the page you are creating the link on. This is quite abstract, let’s see this in action using an example. + +Within the `odin-links-and-images` directory, create another HTML file named `about.html` and paste the following code into it: + +```html + + + + + Odin Links and Images + + + +

                                                                    About Page

                                                                    + + +``` + +Back in the index page, add the following anchor element to create a link to the about page: + +```html + +

                                                                    Homepage

                                                                    + click me + + About + +``` + +Open the index file in a browser and click on the about link to make sure it is all wired together correctly. Clicking the link should go to the about page you just created. + +This works because the index and about page are in the same directory. That means you can simply use its name (`about.html`) as the link’s href value. + +But you will usually want to organize your website directories a little better. Normally you would only have the `index.html` at the root directory and all other HTML files in their own directory. + +Create a directory named `pages` within the `odin-links-and-images` directory and move the `about.html` file into this new directory. + +Refresh the index page in the browser and then click on the about link. It will now be broken. This is because the location of the about page file has changed. + +To fix this, you just need to update the about link `href` value to include the `pages/` directory since that is the new location of the about file relative to the index file. + +```html + +

                                                                    Homepage

                                                                    + About + +``` + +Refresh the index page in the browser and try clicking the about link again, it should now be back in working order. + +In many cases, this will work just fine; however, you can still run into unexpected issues with this approach. Prepending `./` before the link will in most cases prevent such issues. By adding `./` you are specifying to your code that it should start looking for the file/directory relative to the **current** directory. + +```html + +

                                                                    Homepage

                                                                    + About + +``` + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s HTML File Structure video above. + +## --text-- + +What is the difference between an absolute and a relative link? + +## --answers-- + +An absolute link is a link to another page on the current website. A relative link is a link to another website. + +--- + +An absolute link is a link to another website. A relative link is a link another page on the current website. + +--- + +There is no difference between absolute and relative links. + +## --video-solution-- + +2 diff --git a/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/links-and-images-question-e.md b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/links-and-images-question-e.md new file mode 100644 index 00000000000..a935ae3262a --- /dev/null +++ b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/links-and-images-question-e.md @@ -0,0 +1,98 @@ +--- +id: 637f702372c65bc8e73dfe32 +videoId: 0xoztJCHpbQ +title: Links and Images Question E +challengeType: 15 +dashedName: links-and-images-question-e +--- + +# --description-- + +Websites would be fairly boring if they could only display text. Luckily HTML provides a wide variety of elements for displaying all sorts of different media. The most widely used of these is the image element. + +To display an image in HTML you use the `` element. Unlike the other elements you have encountered, the `` element is self-closing. Empty, self-closing HTML elements do not need a closing tag. + +Instead of wrapping content with an opening and closing tag, it embeds an image into the page using a `src` attribute which tells the browser where the image file is located. The `src` attribute works much like the `href` attribute for anchor tags. It can embed an image using both absolute and relative paths. + +For example, using an absolute path you can display an image located on The Odin Project site: + + + +To use images that you have on your own websites, you can use a relative path. + +- Create a new directory named `images` within the `odin-links-and-images` project. + +- Next, download [this image](https://unsplash.com/photos/Mv9hjnEUHR4/download?force=true&w=640) and move it into the `images` directory you just created. + +- Rename the image to `dog.jpg`. + +Finally add the image to the `index.html` file: + +```html + +

                                                                    Homepage

                                                                    + click me + + About + + + +``` + +Save the `index.html` file and open it in a browser to view Charles in all his glory. + + +## Parent Directories + +What if you want to use the dog image in the about page? You would first have to go up one level out of the pages directory into its parent directory so you could then access the images directory. + +To go to the parent directory you need to use two dots in the relative filepath like this: `../.` Let’s see this in action, within the body of the `about.html` file, add the following image below the heading you added earlier: + +```html + +``` + +To break this down: + +- First, you are going to the parent directory of the pages directory which is `odin-links-and-images`. + +- Then, from the parent directory, you can go into the `images` directory. + +- Finally, you can access the `dog.jpg` file. + +Using the metaphor we used earlier, using `../` in a filepath is kind of like stepping out from the room you are currently in to the main hallway so you can go to another room. + +## `Alt` attribute + +Besides the `src` attribute, every image element should also have an `alt` (alternative text) attribute. + +The `alt` attribute is used to describe an image. It will be used in place of the image if it cannot be loaded. It is also used with screen readers to describe what the image is to visually impaired users. + +This is how the The Odin Project logo example you used earlier looks with an `alt` attribute included: + + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s HTML Images Video above. + +## --text-- + +Which tag is used to display an image? + +## --answers-- + +`` + +--- + +`` + +--- + +`` + +## --video-solution-- + +3 diff --git a/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/links-and-images-question-f.md b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/links-and-images-question-f.md new file mode 100644 index 00000000000..ba4eb809e5d --- /dev/null +++ b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/links-and-images-question-f.md @@ -0,0 +1,94 @@ +--- +id: 637f701c72c65bc8e73dfe31 +videoId: 0xoztJCHpbQ +title: Links and Images Question F +challengeType: 15 +dashedName: links-and-images-question-f +--- + +# --description-- + +Websites would be fairly boring if they could only display text. Luckily HTML provides a wide variety of elements for displaying all sorts of different media. The most widely used of these is the image element. + +To display an image in HTML you use the `` element. Unlike the other elements you have encountered, the `` element is self-closing. Empty, self-closing HTML elements do not need a closing tag. + +Instead of wrapping content with an opening and closing tag, it embeds an image into the page using a src attribute which tells the browser where the image file is located. The src attribute works much like the href attribute for anchor tags. It can embed an image using both absolute and relative paths. + +For example, using an absolute path you can display an image located on The Odin Project site: + + + +To use images that you have on your own websites, you can use a relative path. + +- Create a new directory named `images` within the `odin-links-and-images` project. + +- Next, download [this image](https://unsplash.com/photos/Mv9hjnEUHR4/download?force=true&w=640) and move it into the images directory you just created. + +- Rename the image to `dog.jpg`. + +Finally add the image to the `index.html` file: + +```html + +

                                                                    Homepage

                                                                    +
                                                                    click me + + About + + + +``` + +Save the `index.html` file and open it in a browser to view Charles in all his glory. + + +## Parent Directories + +What if you want to use the dog image in the about page? You would first have to go up one level out of the pages directory into its parent directory so you could then access the images directory. + +To go to the parent directory you need to use two dots in the relative filepath like this: `../.` Let’s see this in action, within the body of the `about.html` file, add the following image below the heading you added earlier: + +```html + +``` + +To break this down: + +- First, you are going to the parent directory of the pages directory which is `odin-links-and-images`. + +- Then, from the parent directory, you can go into the `images` directory. + +- Finally, you can access the `dog.jpg` file. + +Using the metaphor we used earlier, using `../` in a filepath is kind of like stepping out from the room you are currently in to the main hallway so you can go to another room. + +## Alt attribute + +Besides the src attribute, every image element should also have an alt (alternative text) attribute. + +The alt attribute is used to describe an image. It will be used in place of the image if it cannot be loaded. It is also used with screen readers to describe what the image is to visually impaired users. + +This is how the The Odin Project logo example you used earlier looks with an alt attribute included: + + +# --question-- + +## --text-- + +What two attributes do images always need to have? + +## --answers-- + +`href` and `alt` + +--- + +`name` and `href` + +--- + +`alt` and `src` + +## --video-solution-- + +3 diff --git a/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/links-and-images-question-g.md b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/links-and-images-question-g.md new file mode 100644 index 00000000000..d1a6fcd4406 --- /dev/null +++ b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/links-and-images-question-g.md @@ -0,0 +1,94 @@ +--- +id: 637f701572c65bc8e73dfe30 +videoId: 0xoztJCHpbQ +title: Links and Images Question G +challengeType: 15 +dashedName: links-and-images-question-g +--- + +# --description-- + +Websites would be fairly boring if they could only display text. Luckily HTML provides a wide variety of elements for displaying all sorts of different media. The most widely used of these is the image element. + +To display an image in HTML you use the `` element. Unlike the other elements you have encountered, the `` element is self-closing. Empty, self-closing HTML elements do not need a closing tag. + +Instead of wrapping content with an opening and closing tag, it embeds an image into the page using a src attribute which tells the browser where the image file is located. The src attribute works much like the href attribute for anchor tags. It can embed an image using both absolute and relative paths. + +For example, using an absolute path you can display an image located on The Odin Project site: + + + +To use images that you have on your own websites, you can use a relative path. + +- Create a new directory named `images` within the `odin-links-and-images` project. + +- Next, download [this image](https://unsplash.com/photos/Mv9hjnEUHR4/download?force=true&w=640) and move it into the images directory you just created. + +- Rename the image to `dog.jpg`. + +Finally add the image to the `index.html` file: + +```html + +

                                                                    Homepage

                                                                    + click me + + About + + + +``` + +Save the `index.html` file and open it in a browser to view Charles in all his glory. + + +## Parent Directories + +What if you want to use the dog image in the about page? You would first have to go up one level out of the pages directory into its parent directory so you could then access the images directory. + +To go to the parent directory you need to use two dots in the relative filepath like this: `../.` Let’s see this in action, within the body of the `about.html` file, add the following image below the heading you added earlier: + +```html + +``` + +To break this down: + +- First, you are going to the parent directory of the pages directory which is `odin-links-and-images`. + +- Then, from the parent directory, you can go into the `images` directory. + +- Finally, you can access the `dog.jpg` file. + +Using the metaphor we used earlier, using `../` in a filepath is kind of like stepping out from the room you are currently in to the main hallway so you can go to another room. + +## Alt attribute + +Besides the src attribute, every image element should also have an alt (alternative text) attribute. + +The alt attribute is used to describe an image. It will be used in place of the image if it cannot be loaded. It is also used with screen readers to describe what the image is to visually impaired users. + +This is how the The Odin Project logo example you used earlier looks with an alt attribute included: + + +# --question-- + +## --text-- + +How do you access a parent directory in a filepath? + +## --answers-- + +`../` + +--- + +`./` + +--- + +`.../` + +## --video-solution-- + +1 diff --git a/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/links-and-images-question-h.md b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/links-and-images-question-h.md new file mode 100644 index 00000000000..cfd73fcfbc1 --- /dev/null +++ b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/links-and-images-question-h.md @@ -0,0 +1,98 @@ +--- +id: 637f700b72c65bc8e73dfe2f +videoId: 0xoztJCHpbQ +title: Links and Images Question H +challengeType: 15 +dashedName: links-and-images-question-h +--- + +# --description-- + +Websites would be fairly boring if they could only display text. Luckily HTML provides a wide variety of elements for displaying all sorts of different media. The most widely used of these is the image element. + +To display an image in HTML you use the `` element. Unlike the other elements you have encountered, the `` element is self-closing. Empty, self-closing HTML elements do not need a closing tag. + +Instead of wrapping content with an opening and closing tag, it embeds an image into the page using a src attribute which tells the browser where the image file is located. The src attribute works much like the href attribute for anchor tags. It can embed an image using both absolute and relative paths. + +For example, using an absolute path you can display an image located on The Odin Project site: + + + +To use images that you have on your own websites, you can use a relative path. + +- Create a new directory named `images` within the `odin-links-and-images` project. + +- Next, download [this image](https://unsplash.com/photos/Mv9hjnEUHR4/download?force=true&w=640) and move it into the images directory you just created. + +- Rename the image to `dog.jpg`. + +Finally add the image to the `index.html` file: + +```html + +

                                                                    Homepage

                                                                    + click me + + About + + + +``` + +Save the `index.html` file and open it in a browser to view Charles in all his glory. + + +## Parent Directories + +What if you want to use the dog image in the about page? You would first have to go up one level out of the pages directory into its parent directory so you could then access the images directory. + +To go to the parent directory you need to use two dots in the relative filepath like this: `../.` Let’s see this in action, within the body of the `about.html` file, add the following image below the heading you added earlier: + +```html + +``` + +To break this down: + +- First, you are going to the parent directory of the pages directory which is `odin-links-and-images`. + +- Then, from the parent directory, you can go into the `images` directory. + +- Finally, you can access the `dog.jpg` file. + +Using the metaphor we used earlier, using `../` in a filepath is kind of like stepping out from the room you are currently in to the main hallway so you can go to another room. + +## Alt attribute + +Besides the src attribute, every image element should also have an alt (alternative text) attribute. + +The alt attribute is used to describe an image. It will be used in place of the image if it cannot be loaded. It is also used with screen readers to describe what the image is to visually impaired users. + +This is how the The Odin Project logo example you used earlier looks with an alt attribute included: + + +# --question-- + +## --assignment-- + +Read about the four main image formats that can be used on the web. + +## --text-- + +What are the four main image formats that you can use for images on the web? + +## --answers-- + +TIFF, GIF, PNG, and SVG. + +--- + +JPG, PNG, GIF, and SVG. + +--- + +JPG, PDF, SVG, and GIF. + +## --video-solution-- + +2 diff --git a/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/project-create-a-recipe-page.md b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/project-create-a-recipe-page.md new file mode 100644 index 00000000000..657a3f6e32d --- /dev/null +++ b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/project-create-a-recipe-page.md @@ -0,0 +1,204 @@ +--- +id: 6391d1a4f7ac71efd0621380 +title: Build a Recipe Page Project +challengeType: 14 +dashedName: project-create-a-recipe-page +--- + +# --description-- + +The website will consist of a main index page which will have links to a few recipes. The website won’t look very pretty by the time you’ve finished. + +**User Stories:** + +1. Your recipe page should contain a `DOCTYPE` tag. +1. Your recipe page should include an `html` element with a `head` and `body` element as children. +1. You should have a `title` element within the `head` element with the text `The Odin Recipes`. +1. You should see an `h1` element that has the text `Creamy Chocolate Fudge`. +1. You should see an image with the url `*placeholder-fcc-cdn*` with a fitting `alt` text. +1. There should be an `h2` element with the text `Description` under the image. +1. You should see a couple of paragraphs under `Description` that describe the recipe. +1. There should be an `h2` element with the text `Ingredients` +1. Under the `Ingredients` heading there should be an unordered list with the ingredients needed for the recipe. +1. Under the list of ingredients add another heading called `Steps`. +1. You should see an ordered list with a couple of steps needed to complete the recipe. +1. Under the steps there should be an `h2` element with the text `More Recipes` +1. You should see a couple of links to other recipes inside an unordered list which has a couple of list items with anchor elements within. +1. These anchor elements should have `href` attribute with the value set to `#` + +# --hints-- + +You should have a `DOCTYPE` tag. + +```js +assert(code.match(//gi)); +``` + +You should have a `html` element with `head` and `body` element. + +```js +const html = document.querySelectorAll('html')[0]; +const head = document.querySelectorAll('html > head')[0]; +const body = document.querySelectorAll('html > body')[0]; + +assert(html && head && body); +``` + +You should have a `title` element within the `head` element that contains the text `The Odin Recipes`. + +```js +assert(document.querySelectorAll('HEAD > TITLE')[0].innerText == 'The Odin Recipes'); +``` + +You should have a `h1` element within your `body` element that contains the text `Creamy Chocolate Fudge`. + +```js +assert(document.querySelectorAll('BODY > H1')[0].innerText == 'Creamy Chocolate Fudge'); +``` + +You should have an image with the url `*placeholder-fcc-cdn*` with an `alt` attribute that has a fitting text. + +```js +const img = document.querySelectorAll('IMG')[0]; + +assert(img && img.alt !='' && img.src === 'https://i.imgur.com/p0J5baJ.jpg') +``` + +You should have an `h2` element with the text `Description`. + +```js +const h2 = document.querySelectorAll('H2')[0]; + +assert(h2.innerText == 'Description'); +``` + +You should have at least two `p` elements describing the recipe. + +```js +const paragraphs = document.querySelectorAll('P'); + +assert(paragraphs.length > 1); +``` + +You should have an `h2` element with the text `Ingredients`. + +```js +const h2 = document.querySelectorAll('H2')[1]; + +assert(h2.innerText == 'Ingredients'); +``` + +You should have an unordered list `
                                                                      ` with some ingredients as the list items `
                                                                    • `. + +```js +const unorderedList = document.querySelectorAll('UL')[0]; +const listItems = document.querySelectorAll('UL > LI'); + +assert(unorderedList && listItems && listItems.length > 1); +``` + +You should have an `h2` element with the text `Steps`. + +```js +const h2 = document.querySelectorAll('H2')[2]; + +assert(h2.innerText == 'Steps'); +``` + +You should have a `
                                                                        ` with the the steps as the list items `
                                                                      1. `. + +```js +const orderedList = document.querySelectorAll('OL')[0]; +const listItems = document.querySelectorAll('OL > LI'); + +assert(orderedList && listItems && listItems.length > 1); +``` + +You should have an `h2` element with the text `More Recipes`. + +```js +const h2 = document.querySelectorAll('H2')[3]; + +assert(h2.innerText == 'More Recipes'); +``` + +You should have an unordered list `
                                                                          ` element with list items `
                                                                        • ` that contain `` tags which lead to other recipes. + +```js +const unorderedList = document.querySelectorAll('UL')[1]; +const listItems = unorderedList.querySelectorAll('LI'); + +const allAreListItems = unorderedList.children.length == listItems.length; + +const containsAnchors = [...listItems].every(function(listItem) { + return listItem.querySelector("a") !== null; +}); + +assert(unorderedList && allAreListItems && containsAnchors && listItems.length > 1); +``` + +Your anchor tags linking to the recipes should have a `href` attribute with the value set to `#` + +```js +const anchorTags = document.querySelectorAll("a"); + +const allAnchorsHaveHrefHash = [...anchorTags].every(function(anchorTag) { + return anchorTag.hasAttribute("href") && anchorTag.getAttribute("href") === "#"; +}); + +assert(allAnchorsHaveHrefHash && anchorTags.length > 0); +``` + +# --seed-- + +## --seed-contents-- + +```html + +``` + +```css + +``` + +## --solutions-- + +```html + + + + The Odin Recipes + + +

                                                                          Creamy Chocolate Fudge

                                                                          + A delicious chocolate fudge dessert +

                                                                          Description

                                                                          +

                                                                          This recipe is for a rich and creamy chocolate fudge that is sure to satisfy your sweet tooth. It's perfect for a special occasion or as a tasty treat for any time of the year.

                                                                          +

                                                                          This recipe is easy to follow and only requires a few simple ingredients. With just a few steps, you'll be able to create a delicious dessert that everyone will love.

                                                                          +

                                                                          Ingredients

                                                                          +
                                                                            +
                                                                          • 1 cup sugar
                                                                          • +
                                                                          • 1/2 cup unsalted butter
                                                                          • +
                                                                          • 1/4 cup milk
                                                                          • +
                                                                          • 1/4 cup cocoa powder
                                                                          • +
                                                                          • 1/4 cup chocolate chips
                                                                          • +
                                                                          • 1/4 tsp salt
                                                                          • +
                                                                          • 1 tsp vanilla extract
                                                                          • +
                                                                          +

                                                                          Steps

                                                                          +
                                                                            +
                                                                          1. In a medium saucepan, melt the butter over medium heat.
                                                                          2. +
                                                                          3. Add the sugar, milk, cocoa powder, and salt to the saucepan and stir until well combined.
                                                                          4. +
                                                                          5. Bring the mixture to a boil, stirring constantly, and then reduce the heat to low and simmer for 5 minutes.
                                                                          6. +
                                                                          7. Remove the saucepan from the heat and stir in the chocolate chips and vanilla extract until the chocolate is melted and the mixture is smooth.
                                                                          8. +
                                                                          9. Pour the fudge into a greased 8-inch square pan and let it cool completely before cutting into squares.
                                                                          10. +
                                                                          +

                                                                          More Recipes

                                                                          +
                                                                          + + +``` diff --git a/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-a.md b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-a.md new file mode 100644 index 00000000000..f4625eb7e31 --- /dev/null +++ b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-a.md @@ -0,0 +1,65 @@ +--- +id: 637f4e3e72c65bc8e73dfe24 +videoId: kcHKFZBVtf4 +title: Understand Ordered and Unordered List Question A +challengeType: 15 +dashedName: understand-ordered-and-unordered-list-question-a +--- + +# --description-- + +If you want to have a list of items where the order doesn’t matter, like a shopping list of items that can be bought in any order, then you can use an unordered list. + +Unordered lists are created using the `
                                                                            ` element, and each item within the list is created using the list item element `
                                                                          • `. + +Each list item in an unordered list begins with a bullet point: + + + +If you instead want to create a list of items where the order does matter, like step-by-step instructions for a recipe, or your top 10 favorite TV shows, then you can use an ordered list. + +Ordered lists are created using the `
                                                                              ` element. Each individual item in them is again created using the list item element `
                                                                            1. `. However, each list item in an ordered list begins with a number instead: + + + +# --question-- + +## --assignment-- + +Watch the first three minutes of Kevin Powell's video on Ordered and Unordered lists above. + +--- + +Make an unordered shopping list of your favorite foods. + +--- + +Make an ordered list of todo’s you need to get done today. + +--- + +Make an unordered list of places you’d like to visit someday. + +--- + +Make an ordered list of your all time top 5 favorite video games or movies. + +## --text-- + +What HTML tag is used to create an unordered list? + +## --answers-- + +`
                                                                            2. ` + +--- + +`
                                                                                ` + +--- + +`
                                                                                  ` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-b.md b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-b.md new file mode 100644 index 00000000000..4c6822fc504 --- /dev/null +++ b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-b.md @@ -0,0 +1,45 @@ +--- +id: 637f4e4672c65bc8e73dfe25 +videoId: LGQuIIv2RVA +title: Understand Ordered and Unordered List Question B +challengeType: 15 +dashedName: understand-ordered-and-unordered-list-question-b +--- + +# --description-- + +If you want to have a list of items where the order doesn’t matter, like a shopping list of items that can be bought in any order, then you can use an unordered list. + +Unordered lists are created using the `
                                                                                    ` element, and each item within the list is created using the list item element `
                                                                                  • `. + +Each list item in an unordered list begins with a bullet point: + + + +If you instead want to create a list of items where the order does matter, like step-by-step instructions for a recipe, or your top 10 favorite TV shows, then you can use an ordered list. + +Ordered lists are created using the `
                                                                                      ` element. Each individual item in them is again created using the list item element `
                                                                                    1. `. However, each list item in an ordered list begins with a number instead: + + + +# --question-- + +## --text-- + +What HTML tag is used to create an ordered list? + +## --answers-- + +`
                                                                                        ` + +--- + +`
                                                                                      1. ` + +--- + +`
                                                                                          ` + +## --video-solution-- + +1 diff --git a/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-c.md b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-c.md new file mode 100644 index 00000000000..c766990ca22 --- /dev/null +++ b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-c.md @@ -0,0 +1,45 @@ +--- +id: 637f4e5172c65bc8e73dfe26 +videoId: LGQuIIv2RVA +title: Understand Ordered and Unordered List Question C +challengeType: 15 +dashedName: understand-ordered-and-unordered-list-question-c +--- + +# --description-- + +If you want to have a list of items where the order doesn’t matter, like a shopping list of items that can be bought in any order, then you can use an unordered list. + +Unordered lists are created using the `
                                                                                            ` element, and each item within the list is created using the list item element `
                                                                                          • `. + +Each list item in an unordered list begins with a bullet point: + + + +If you instead want to create a list of items where the order does matter, like step-by-step instructions for a recipe, or your top 10 favorite TV shows, then you can use an ordered list. + +Ordered lists are created using the `
                                                                                              ` element. Each individual item in them is again created using the list item element `
                                                                                            1. `. However, each list item in an ordered list begins with a number instead: + + + +# --question-- + +## --text-- + +What HTML tag is used to create list items within both unordered and ordered lists? + +## --answers-- + +`
                                                                                                ` + +--- + +`
                                                                                              1. ` + +--- + +`
                                                                                                  ` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/working-with-text-question-a.md b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/working-with-text-question-a.md new file mode 100644 index 00000000000..8698b62aca8 --- /dev/null +++ b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/working-with-text-question-a.md @@ -0,0 +1,60 @@ +--- +id: 637f4e5872c65bc8e73dfe27 +videoId: yqcd-XkxZNM +title: Working With Text Question A +challengeType: 15 +dashedName: working-with-text-question-a +--- + +# --description-- + +What would you expect the following text to output on an HTML page? + +```html + + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor + incididunt ut labore et dolore magna aliqua. + + Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris + nisi ut aliquip ex ea commodo consequat. + +``` + +It looks like two paragraphs of text, and so you might expect it to display in that way. However that is not the case, as you can see in the output below: + + + +When the browser encounters new lines like this in your HTML, it will compress them down into one single space. The result of this compression is that all of the text is clumped together into one long line. + +If you want to create paragraphs in HTML, you need to use the paragraph element, which will add a newline after each of your paragraphs. A paragraph element is defined by wrapping text content with a `

                                                                                                  ` tag. + +Changing our example from before to use paragraph elements fixes the issue: + + + +# --question-- + +## --assignment-- + +Watch and follow along to Kevin Powell’s HTML Paragraph and Headings Video above. + +## --text-- + +How do you create a paragraph in HTML? + +## --answers-- + +`

                                                                                                  This is a paragraph

                                                                                                  ` + +--- + +`

                                                                                                  This is a paragraph

                                                                                                  ` + +--- + +`This is a paragraph` + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/working-with-text-question-b.md b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/working-with-text-question-b.md new file mode 100644 index 00000000000..a74d8d11452 --- /dev/null +++ b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/working-with-text-question-b.md @@ -0,0 +1,40 @@ +--- +id: 637f4e5f72c65bc8e73dfe28 +videoId: yqcd-XkxZNM +title: Working With Text Question B +challengeType: 15 +dashedName: working-with-text-question-b +--- + +# --description-- + +Headings are different from other HTML text elements: they are displayed larger and bolder than other text to signify that they are headings. + +There are 6 different levels of headings starting from `

                                                                                                  ` to `

                                                                                                  `. The number within a heading tag represents that heading’s level. The largest and most important heading is `h1`, while `h6` is the tiniest heading at the lowest level. + +Headings are defined much like paragraphs. For example, to create an `h1` heading, we wrap our heading text in a `

                                                                                                  ` tag. + + + +Using the correct level of heading is important as levels provide a hierarchy to the content. An `h1` heading should always be used for the heading of the overall page, and the lower level headings should be used as the headings for content in smaller sections of the page. + +# --question-- +## --text-- + +How many different levels of headings are there and what is the difference between them? + +## --answers-- + +There are 5 different levels of headings. `h5` is the smallest and least important heading, and `h1` is the largest and most important heading. + +--- + +There are 6 different levels of headings. `h6` is the largest and most important heading, and `h1` is the smallest and least important heading. + +--- + +There are 6 different levels of headings. `h1` is the largest and most important heading, and `h6` is the smallest and least important heading. + +## --video-solution-- + +3 diff --git a/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/working-with-text-question-c.md b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/working-with-text-question-c.md new file mode 100644 index 00000000000..6ccf0e06658 --- /dev/null +++ b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/working-with-text-question-c.md @@ -0,0 +1,47 @@ +--- +id: 637f4e6672c65bc8e73dfe29 +videoId: gW6cBZLUk6M +title: Working With Text Question C +challengeType: 15 +dashedName: working-with-text-question-c +--- + +# --description-- + +The `` element makes text bold. It also semantically marks text as important; this affects tools, like screen readers, that users with visual impairments will rely on to use your website. The tone of voice on some screen readers will change to communicate the importance of the text within a `strong` element. To define a `strong` element you wrap text content in a `` tag. + +You can use `strong` on its own: + + + +But you will probably find yourself using the `strong` element much more in combination with other text elements, like this: + + + +Sometimes you will want to make text bold without giving it an important meaning. You’ll learn how to do that in the CSS lessons later in the curriculum. + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s HTML Bold and Italic Text Video above. + +## --text-- + +What element should you use to make text bold and important? + +## --answers-- + +`This is an important message` + +--- + +`

                                                                                                  This is an important message

                                                                                                  ` + +--- + +`This is an important message` + +## --video-solution-- + +3 diff --git a/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/working-with-text-question-d.md b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/working-with-text-question-d.md new file mode 100644 index 00000000000..d6647f9a7ea --- /dev/null +++ b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/working-with-text-question-d.md @@ -0,0 +1,39 @@ +--- +id: 637f4e6e72c65bc8e73dfe2a +videoId: gW6cBZLUk6M +title: Working With Text Question D +challengeType: 15 +dashedName: working-with-text-question-d +--- + +# --description-- + +The `em` element makes text italic. It also semantically places emphasis on the text, which again may affect things like screen readers. To define an emphasized element you wrap text content in a `` tag. + +To use `em` on its own: + + +Again, like the `strong` element, you will find yourself mostly using the `em` element with other text elements: + + + +# --question-- +## --text-- + +What element should you use to make text italicized to add emphasis? + +## --answers-- + +`This is an italic message` + +--- + +`This is an italic message` + +--- + +`This is an italic message` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/working-with-text-question-e.md b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/working-with-text-question-e.md new file mode 100644 index 00000000000..d022a6331e9 --- /dev/null +++ b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/working-with-text-question-e.md @@ -0,0 +1,66 @@ +--- +id: 637f4e7972c65bc8e73dfe2b +videoId: gW6cBZLUk6M +title: Working With Text Question E +challengeType: 15 +dashedName: working-with-text-question-e +--- + +# --description-- + +You may have noticed that in all the examples in this lesson you indent any elements that are within other elements. This is known as nesting elements. + +When you nest elements within other elements, you create a parent and child relationship between them. The nested elements are the children and the element they are nested within is the parent. + +In the following example, the `body` element is the parent and the `p` is the child: + +```html + + + + +

                                                                                                  Lorem ipsum dolor sit amet.

                                                                                                  + + +``` + +Just as in human relationships, HTML parent elements can have many children. Elements at the same level of nesting are considered to be siblings. + +For example, the two `p` elements in the following code are siblings, since they are both children of the `body` tag and are at the same level of nesting as each other: + +```html + + + + +

                                                                                                  Lorem ipsum dolor sit amet.

                                                                                                  +

                                                                                                  Ut enim ad minim veniam.

                                                                                                  + + +``` + +You use indentation to make the level of nesting clear and readable for yourselves and other developers who will work with your HTML in the future. It is recommended to indent any child elements by two spaces. + +The parent, child, and sibling relationships between elements will become much more important later when you start styling your HTML with CSS and adding behavior with JavaScript. For now, however, it is just important to know the distinction between how elements are related and the terminology used to describe their relationships. + +# --question-- + +## --text-- + +What relationship do two elements have if they are at the same level of nesting? + +## --answers-- + +The elements are each other's parents. + +--- + +The elements are each other's children. + +--- + +The elements are siblings. + +## --video-solution-- + +3 diff --git a/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/working-with-text-question-f.md b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/working-with-text-question-f.md new file mode 100644 index 00000000000..2ace3f4e36d --- /dev/null +++ b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/working-with-text-question-f.md @@ -0,0 +1,67 @@ +--- +id: 637f4e8072c65bc8e73dfe2c +videoId: gW6cBZLUk6M +title: Working With Text Question F +challengeType: 15 +dashedName: working-with-text-question-f +--- + +# --description-- + +You may have noticed that in all the examples in this lesson you indent any elements that are within other elements. This is known as nesting elements. + +When you nest elements within other elements, you create a parent and child relationship between them. The nested elements are the children and the element they are nested within is the parent. + +In the following example, the body element is the parent and the paragraph is the child: + +```html + + + + +

                                                                                                  Lorem ipsum dolor sit amet.

                                                                                                  + + +``` + +Just as in human relationships, HTML parent elements can have many children. Elements at the same level of nesting are considered to be siblings. + +For example, the two paragraphs in the following code are siblings, since they are both children of the body tag and are at the same level of nesting as each other: + +```html + + + + +

                                                                                                  Lorem ipsum dolor sit amet.

                                                                                                  +

                                                                                                  Ut enim ad minim veniam.

                                                                                                  + + +``` + +You use indentation to make the level of nesting clear and readable for yourselves and other developers who will work with your HTML in the future. It is recommended to indent any child elements by two spaces. + +The parent, child, and sibling relationships between elements will become much more important later when you start styling your HTML with CSS and adding behavior with JavaScript. For now, however, it is just important to know the distinction between how elements are related and the terminology used to describe their relationships. + +# --question-- + +## --text-- + +What relationship does an element have with any nested element within it? + +## --answers-- + +The element within the other element is called the parent element. + +--- + +The element within the other element is called the child element. + +--- + +The element within the other element is called the sibling element. + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/working-with-text-question-g.md b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/working-with-text-question-g.md new file mode 100644 index 00000000000..fe83f0ef062 --- /dev/null +++ b/curriculum/challenges/chinese/10-coding-interview-prep/the-odin-project/working-with-text-question-g.md @@ -0,0 +1,49 @@ +--- +id: 637f4e8772c65bc8e73dfe2d +videoId: gW6cBZLUk6M +title: Working With Text Question G +challengeType: 15 +dashedName: working-with-text-question-g +--- + +# --description-- + +HTML comments are not visible to the browser; they allow us to comment on your code so that other developers or your future selves can read them and get some context about something that might not be clear in the code. + +Writing an HTML comment is simple: You just enclose the comment with ``tags. For example: + +```html +

                                                                                                  View the html to see the hidden comments

                                                                                                  + + + +

                                                                                                  Some paragraph text

                                                                                                  + + +``` + +# --question-- + +## --assignment-- + +To get some practice working with text in HTML, create a plain blog article page which uses different headings, uses paragraphs, and has some text in the paragraphs bolded and italicized. You can use [Lorem Ipsum](https://loremipsum.io) to generate dummy text, in place of real text as you build your sites. + +## --text-- + +How do you create HTML comments? + +## --answers-- + +`/* This is an HTML comment */` + +--- + +`` + +--- + +`<-- This is an HTML comment --!>` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d1ac33c68d27dcda5796.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d1ac33c68d27dcda5796.md index 1e76ec7bf30..4515811d5ab 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d1ac33c68d27dcda5796.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d1ac33c68d27dcda5796.md @@ -14,13 +14,25 @@ dashedName: step-23 应该使用 `transform` 属性来旋转元素。 ```js -assert.notEmpty(new __helpers.CSSHelp(document).getStyle('.back-mountain')?.transform); +const backMountain = new __helpers.CSSHelp(document).getStyle('.back-mountain'); + +if (backMountain?.transform) { + assert.notEmpty(backMountain?.transform); +} else { + assert.notEmpty(backMountain?.rotate); +} ``` 应该设置 `.back-mountain` 的 `transform` 值为 `--fcc-expected--`,而不是 `--fcc-actual--`。 ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.back-mountain')?.transform, 'rotate(45deg)'); +const backMountain = new __helpers.CSSHelp(document).getStyle('.back-mountain'); + +if (backMountain?.transform) { + assert.equal(backMountain?.transform, 'rotate(45deg)'); +} else { + assert.equal(backMountain?.rotate, '45deg'); +} ``` `.back-mountain` 应该有一个 `left` 属性。 diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d229b0e542520cd91c685.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d229b0e542520cd91c685.md index 7c0380948ba..8d6cb1547e3 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d229b0e542520cd91c685.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d229b0e542520cd91c685.md @@ -14,13 +14,25 @@ dashedName: step-84 应该将 `.foot.left` 的 `transform` 设置为 `rotate(80deg)`。 ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.foot.left').getPropVal('transform', true), 'rotate(80deg)'); +const leftFoot = new __helpers.CSSHelp(document).getStyle('.foot.left'); + +if (leftFoot?.transform) { + assert.equal(leftFoot.getPropVal('transform', true), 'rotate(80deg)'); +} else { + assert.equal(leftFoot.getPropVal('rotate', true), '80deg'); +} ``` 应该将 `.foot.right` 的 `transform` 设置为 `rotate(-80deg)`。 ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.foot.right').getPropVal('transform', true), 'rotate(-80deg)'); +const rightFoot = new __helpers.CSSHelp(document).getStyle('.foot.right'); + +if (rightFoot?.transform) { + assert.equal(rightFoot.getPropVal('transform', true), 'rotate(-80deg)'); +} else { + assert.equal(rightFoot.getPropVal('rotate', true), '-80deg'); +} ``` # --seed-- diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2d4e80400325ff89664a.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2d4e80400325ff89664a.md index 4afa64f2a51..c8e89fb2bc5 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2d4e80400325ff89664a.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2d4e80400325ff89664a.md @@ -14,7 +14,14 @@ dashedName: step-91 你应该将 `.arm.left` 的 `transform` 设置为 `rotate(130deg) scaleX(-1)`。 ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.arm.left').getPropVal('transform', true), 'rotate(130deg)scaleX(-1)'); +const leftArm = new __helpers.CSSHelp(document).getStyle('.arm.left'); + +if (leftArm?.rotate && leftArm?.transform) { + assert.equal(leftArm.getPropVal('rotate', true), '130deg'); + assert.equal(leftArm.getPropVal('transform', true), 'scaleX(-1)'); +} else { + assert.equal(leftArm.getPropVal('transform', true), 'rotate(130deg)scaleX(-1)'); +} ``` # --seed-- @@ -281,7 +288,6 @@ body { top: 35%; left: 5%; transform-origin: top left; - } --fcc-editable-region-- diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2ebc81ba81271460850d.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2ebc81ba81271460850d.md index 10249a53bc1..7b800b5a56a 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2ebc81ba81271460850d.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2ebc81ba81271460850d.md @@ -14,7 +14,13 @@ dashedName: step-92 你应该将 `.arm.right` 的 `transform` 设置为 `rotate(-45deg)`。 ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.arm.right')?.getPropVal('transform', true), 'rotate(-45deg)'); +const rightArm = new __helpers.CSSHelp(document).getStyle('.arm.right'); + +if (rightArm?.transform) { + assert.equal(rightArm?.getPropVal('transform', true), 'rotate(-45deg)'); +} else { + assert.equal(rightArm?.getPropVal('rotate', true), '-45deg'); +} ``` # --seed-- @@ -287,7 +293,6 @@ body { .arm.right { top: 0%; right: -5%; - } --fcc-editable-region-- diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d32c7fa21f32aaa91d499.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d32c7fa21f32aaa91d499.md index 4776ed336fb..fdc31910b92 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d32c7fa21f32aaa91d499.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d32c7fa21f32aaa91d499.md @@ -14,7 +14,16 @@ dashedName: step-97 应该在 `10%` 位置关键帧设置 `transform` 为 `rotate(110deg) scaleX(-1)`。 ```js -assert([...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '10%')?.style?.transform?.replace(/\s+/g, '') === 'rotate(110deg)scaleX(-1)'); +const wave10Percent = [...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '10%'); +const rotateProp = wave10Percent?.style?.rotate?.replace(/\s+/g, ''); +const transformProp = wave10Percent?.style?.transform?.replace(/\s+/g, ''); + +if (rotateProp && transformProp) { + assert(rotateProp === '110deg'); + assert(transformProp === 'scaleX(-1)'); +} else { + assert(transformProp === 'rotate(110deg)scaleX(-1)'); +} ``` # --seed-- diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d333b738e3c2b5d58b095.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d333b738e3c2b5d58b095.md index 971c99a5cd3..5d93ee268e8 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d333b738e3c2b5d58b095.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d333b738e3c2b5d58b095.md @@ -14,7 +14,16 @@ dashedName: step-98 应该在 `20%` 位置关键帧设置 `transform` 为 `rotate(130deg) scaleX(-1)`。 ```js -assert([...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '20%')?.style?.transform?.replace(/\s+/g, '') === 'rotate(130deg)scaleX(-1)'); +const wave20Percent = [...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '20%'); +const transformProp = wave20Percent?.style?.transform?.replace(/\s+/g, ''); +const rotateProp = wave20Percent?.style?.rotate?.replace(/\s+/g, ''); + +if (rotateProp && transformProp) { + assert(rotateProp === '130deg'); + assert(transformProp === 'scaleX(-1)'); +} else { + assert(transformProp === 'rotate(130deg)scaleX(-1)'); +} ``` # --seed-- diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d337765b9f02c10e93722.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d337765b9f02c10e93722.md index 398d3f40471..22d1dcb034e 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d337765b9f02c10e93722.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d337765b9f02c10e93722.md @@ -14,13 +14,31 @@ dashedName: step-99 应该在 `30%` 位置关键帧设置 `transform` 为 `rotate(110deg) scaleX(-1)`。 ```js -assert([...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '30%')?.style?.transform?.replace(/\s+/g, '') === 'rotate(110deg)scaleX(-1)'); +const wave30Percent = [...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '30%'); +const transformProp = wave30Percent?.style?.transform?.replace(/\s+/g, ''); +const rotateProp = wave30Percent?.style?.rotate?.replace(/\s+/g, ''); + +if (rotateProp && transformProp) { + assert(rotateProp === '110deg'); + assert(transformProp === 'scaleX(-1)'); +} else { + assert(transformProp === 'rotate(110deg)scaleX(-1)'); +} ``` 应该在 `40%` 位置关键帧设置 `transform` 为 `rotate(130deg) scaleX(-1)`。 ```js -assert([...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '40%')?.style?.transform?.replace(/\s+/g, '') === 'rotate(130deg)scaleX(-1)'); +const wave40Percent = [...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '40%'); +const transformProp = wave40Percent?.style?.transform?.replace(/\s+/g, ''); +const rotateProp = wave40Percent?.style?.rotate?.replace(/\s+/g, ''); + +if (rotateProp && transformProp) { + assert(rotateProp === '130deg'); + assert(transformProp === 'scaleX(-1)'); +} else { + assert(transformProp === 'rotate(130deg)scaleX(-1)'); +} ``` # --seed-- diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98f0.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98f0.md index aff4a789866..cf706bdb3ea 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98f0.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98f0.md @@ -16,11 +16,11 @@ gradient-type( ); ``` -在示例中,`color1` 在顶部是实心的,`color2` 在底部是实心的,并且在它们之间均匀地从一个过渡到下一个。 在 `.bb1a` 中,使用 `--building-color1` 作为第一个颜色、 `--window-color1` 作为第二个颜色,将 `linear-gradient` 类型的渐变添加到 `background` 属性。 +在示例中,`color1` 在顶部是实心的,`color2` 在底部是实心的,并且在它们之间均匀地从一个过渡到下一个。 在 `.bb1a` 中,在 `background-color` 属性下添加 `background` 属性。 将其设置为 `linear-gradient` 类型的梯度,使用 `--building-color1` 作为其第一种颜色,使用 `--window-color1` 作为第二种颜色。 # --hints-- -你应该将 `background` 应用到 `.bb1a`。 +你应该给 `.bb1a` 应用 `background`,就在 `background-color` 后面。 ```js assert(new __helpers.CSSHelp(document).getStyle('.bb1a')?.background); diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dc17d3bf86c76b9248c6eb4.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dc17d3bf86c76b9248c6eb4.md index 867ebb2d3f3..0ad67b5592c 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dc17d3bf86c76b9248c6eb4.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dc17d3bf86c76b9248c6eb4.md @@ -25,7 +25,7 @@ assert(document.querySelector('p')); assert(code.match(/<\/p\>/)); ``` -Your `p` element's text should be `See more cat photos in our gallery.` 你可能忽略了文本或有拼写错误。 +你的 `p` 元素的文本应该是 `See more cat photos in our gallery.` 你可能忽略了文本或有拼写错误。 ```js const extraSpacesRemoved = document diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dc2385ff86c76b9248c6eb7.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dc2385ff86c76b9248c6eb7.md index 8382d811365..a3521aa603f 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dc2385ff86c76b9248c6eb7.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dc2385ff86c76b9248c6eb7.md @@ -41,7 +41,7 @@ const collection = [...document.querySelectorAll('main,h1')].map( assert(collection.indexOf('MAIN') < collection.indexOf('H1')); ``` -你的 `main` 元素的开始标签应该在 `p` 元素的下方。 你把顺序写错了。 +你的 `main` 元素的结束标签应该在 `p` 元素的下方。 你把顺序写错了。 ```js const mainNode = document.querySelector('main'); diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dc23991f86c76b9248c6eb8.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dc23991f86c76b9248c6eb8.md index d25e9bf988f..9b54fca6a1e 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dc23991f86c76b9248c6eb8.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dc23991f86c76b9248c6eb8.md @@ -65,7 +65,7 @@ assert( assert(document.querySelector('p')); ``` -The text of the `p` element should be `See more cat photos in our gallery.` 不要更改 `p` 元素的文本、间距或标点符号。 +`p` 元素的文本应该是 `See more cat photos in our gallery.` 不要更改 `p` 元素的文本、间距或标点符号。 ```js assert( diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa22d1b521be39a3de7be0.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa22d1b521be39a3de7be0.md index 5aef9646aaa..8d9c5f5de5a 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa22d1b521be39a3de7be0.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa22d1b521be39a3de7be0.md @@ -38,7 +38,7 @@ assert( ); ``` -After nesting the anchor (`a`) element, the only `p` element content visible in the browser should be `See more cat photos in our gallery.` Double check the text, spacing, or punctuation of both the `p` and nested anchor element. +在嵌套了锚点元素(`a`)之后,浏览器中显示的 `p` 元素应该仅为 `See more cat photos in our gallery.`。再次检查 `p` 和嵌套其中的锚点元素的文本、间距或标点。 ```js const pText = document diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa2407b521be39a3de7be1.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa2407b521be39a3de7be1.md index 265e0ddd3eb..dad57601909 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa2407b521be39a3de7be1.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa2407b521be39a3de7be1.md @@ -45,7 +45,7 @@ assert(document.querySelector('a').getAttribute('target') === '_blank');

                                                                                                  Cat Photos

                                                                                                  --fcc-editable-region-- -

                                                                                                  See more cat photos in our gallery.

                                                                                                  +

                                                                                                  See more cat photos in our gallery.

                                                                                                  --fcc-editable-region-- A cute orange cat lying on its back. diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/62dabe2ef403a12d5d295273.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/62dabe2ef403a12d5d295273.md index 22df6dcb3b7..f6a97d17d98 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/62dabe2ef403a12d5d295273.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/62dabe2ef403a12d5d295273.md @@ -41,7 +41,7 @@ assert( ); ``` -The `p` element content visible in the browser should be `See more cat photos in our gallery.` Double check the text, spacing, or punctuation of both the `p` and nested anchor element. +浏览器中显示的 `p` 元素应该仅为 `See more cat photos in our gallery.`。再次检查 `p` 和嵌套其中的锚点元素的文本、间距或标点。 ```js const pText = document diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60fab9f17fa294054b74228c.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60fab9f17fa294054b74228c.md index 1e946f1d5cd..9ed1f24943a 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60fab9f17fa294054b74228c.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60fab9f17fa294054b74228c.md @@ -9,7 +9,7 @@ dashedName: step-31 现在到了最后一个 `fieldset`。 如果你想允许用户上传个人资料图片,应该怎么做呢? -类型为 `file` 的 `input` 可以实现。 Add a `label` with the text `Upload a profile picture:`, and nest an `input` accepting a file upload. +类型为 `file` 的 `input` 可以实现。 添加一个 `label`,其文本为 `Upload a profile picture:`,嵌套一个 `input` 以接收上传的文件。 # --hints-- diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2abbe7d18d49a1e0e1c8.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2abbe7d18d49a1e0e1c8.md index 1af47c0d0f5..b6280c4e434 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2abbe7d18d49a1e0e1c8.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2abbe7d18d49a1e0e1c8.md @@ -39,13 +39,15 @@ assert(document.querySelector('h1')?.innerText === 'Nutrition Facts'); --fcc-editable-region-- - - - Nutrition Label - - - + + + Nutrition Label + + + + + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2d4150fe0d4cbd0f2628.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2d4150fe0d4cbd0f2628.md index 9201726b24a..7b586f03a12 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2d4150fe0d4cbd0f2628.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2d4150fe0d4cbd0f2628.md @@ -43,14 +43,16 @@ assert(document.querySelector('p')?.innerText === '8 servings per container'); --fcc-editable-region-- - - - Nutrition Label - - -

                                                                                                  Nutrition Facts

                                                                                                  - + + + Nutrition Label + + + +

                                                                                                  Nutrition Facts

                                                                                                  + + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34948891834dd77655a6.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34948891834dd77655a6.md index 5ffe454c6f4..79b65c15e30 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34948891834dd77655a6.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34948891834dd77655a6.md @@ -43,15 +43,17 @@ assert(document.querySelectorAll('p')?.[1]?.innerText === 'Serving size 2/3 cup --fcc-editable-region-- - - - Nutrition Label - - -

                                                                                                  Nutrition Facts

                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  - + + + Nutrition Label + + + +

                                                                                                  Nutrition Facts

                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  + + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34ecc1091b4fd5a8a484.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34ecc1091b4fd5a8a484.md index 85c7706fb76..e8eebaa6d37 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34ecc1091b4fd5a8a484.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34ecc1091b4fd5a8a484.md @@ -49,16 +49,18 @@ assert(links.find(link => link?.getAttribute('href') === 'https://fonts.googleap --fcc-editable-region-- - - - Nutrition Label - - -

                                                                                                  Nutrition Facts

                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  - + + + Nutrition Label + + + + +

                                                                                                  Nutrition Facts

                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f357957e370510f21ea16.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f357957e370510f21ea16.md index 838abb87ef0..c733c090970 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f357957e370510f21ea16.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f357957e370510f21ea16.md @@ -32,17 +32,19 @@ assert(new __helpers.CSSHelp(document).getStyle('body')?.fontFamily === '"Open S ```html - - - Nutrition Label - - - - -

                                                                                                  Nutrition Facts

                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  - + + + + Nutrition Label + + + + + +

                                                                                                  Nutrition Facts

                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  + ``` diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f378014c2da526a109c81.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f378014c2da526a109c81.md index 2da472b2110..6144b8858e6 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f378014c2da526a109c81.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f378014c2da526a109c81.md @@ -30,17 +30,19 @@ assert(new __helpers.CSSHelp(document).getStyle('html')?.fontSize === '16px'); ```html - - - Nutrition Label - - - - -

                                                                                                  Nutrition Facts

                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  - + + + + Nutrition Label + + + + + +

                                                                                                  Nutrition Facts

                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  + ``` diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38279e5c3d53692ea441.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38279e5c3d53692ea441.md index b13692359e9..e85008608de 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38279e5c3d53692ea441.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38279e5c3d53692ea441.md @@ -37,18 +37,20 @@ assert(children?.every(child => child?.parentElement?.classList?.contains('label ```html - - - Nutrition Label - - - + + + + Nutrition Label + + + + --fcc-editable-region-- - -

                                                                                                  Nutrition Facts

                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  - + +

                                                                                                  Nutrition Facts

                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38cabc64e3556f98cc1a.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38cabc64e3556f98cc1a.md index 620ed159d3d..bfe7217f973 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38cabc64e3556f98cc1a.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38cabc64e3556f98cc1a.md @@ -32,19 +32,21 @@ assert(new __helpers.CSSHelp(document).getStyle('.label')?.border === '2px solid ```html - - - Nutrition Label - - - - -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  + ``` diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3949f58e12577dcefb00.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3949f58e12577dcefb00.md index 6b44c2c0fef..e8676076267 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3949f58e12577dcefb00.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3949f58e12577dcefb00.md @@ -26,19 +26,21 @@ assert(new __helpers.CSSHelp(document).getStyle('.label')?.width === '270px'); ```html - - - Nutrition Label - - - - -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  + ``` diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f39d7da41b15851fa3fb9.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f39d7da41b15851fa3fb9.md index 04ed90f486e..c1e2e98afaf 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f39d7da41b15851fa3fb9.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f39d7da41b15851fa3fb9.md @@ -30,19 +30,21 @@ assert(new __helpers.CSSHelp(document).getStyle('.label')?.padding === '0px 7px' ```html - - - Nutrition Label - - - - -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  + ``` diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3b091162165948e1cb33.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3b091162165948e1cb33.md index 86d7f4eabd1..c1bf9d9f51e 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3b091162165948e1cb33.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3b091162165948e1cb33.md @@ -32,19 +32,21 @@ assert(new __helpers.CSSHelp(document).getStyle('*')?.boxSizing === 'border-box' ```html - - - Nutrition Label - - - - -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  + ``` diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3cafd794015aa9547a6d.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3cafd794015aa9547a6d.md index 3bdcc290c08..3f18d0f7dc0 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3cafd794015aa9547a6d.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3cafd794015aa9547a6d.md @@ -32,19 +32,21 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')?.fontWeight === '800'); ```html - - - Nutrition Label - - - - -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  + ``` diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3d9e59db4b5b8e960762.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3d9e59db4b5b8e960762.md index 302e81e9983..3cf89156ca3 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3d9e59db4b5b8e960762.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3d9e59db4b5b8e960762.md @@ -24,19 +24,21 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')?.textAlign === 'center'); ```html - - - Nutrition Label - - - - -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  + ``` diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e1b7233ee5c7595771f.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e1b7233ee5c7595771f.md index 46785348170..7c4ba10d36a 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e1b7233ee5c7595771f.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e1b7233ee5c7595771f.md @@ -24,19 +24,21 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')?.margin === '-4px 0px'); ```html - - - Nutrition Label - - - - -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  + ``` diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e4af8008c5d494d3afe.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e4af8008c5d494d3afe.md index 04d43d628da..44cbcd8624d 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e4af8008c5d494d3afe.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e4af8008c5d494d3afe.md @@ -30,19 +30,21 @@ assert(new __helpers.CSSHelp(document).getStyle('p')?.margin === '0px'); ```html - - - Nutrition Label - - - - -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  + ``` diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3ed16592445e57941aec.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3ed16592445e57941aec.md index f94e5998e75..32924c3ebd3 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3ed16592445e57941aec.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3ed16592445e57941aec.md @@ -44,21 +44,23 @@ assert(document.querySelector('.divider')?.previousElementSibling?.localName === ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  --fcc-editable-region-- - + ``` diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f405b89a7ec5f8e2d11f4.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f405b89a7ec5f8e2d11f4.md index 3c2b427d7a6..6145dc13c13 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f405b89a7ec5f8e2d11f4.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f405b89a7ec5f8e2d11f4.md @@ -36,20 +36,22 @@ assert(new __helpers.CSSHelp(document).getStyle('.divider')?.margin === '2px 0px ```html - - - Nutrition Label - - - - -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  + ``` diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f40b01f680e608d360ed4.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f40b01f680e608d360ed4.md index e93a1173dbe..21898994a92 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f40b01f680e608d360ed4.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f40b01f680e608d360ed4.md @@ -26,20 +26,22 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')?.letterSpacing === '0.15px ```html - - - Nutrition Label - - - - -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  + ``` diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4172e9eec061d6456221.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4172e9eec061d6456221.md index 615c700f2a8..794838c3ac4 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4172e9eec061d6456221.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4172e9eec061d6456221.md @@ -32,22 +32,24 @@ assert(!document.querySelector('p')?.classList?.contains('bold')); ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  --fcc-editable-region-- - + ``` diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f41c979787462e76dab90.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f41c979787462e76dab90.md index b174279d9df..c838f9a70a4 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f41c979787462e76dab90.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f41c979787462e76dab90.md @@ -44,20 +44,22 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')); ```html - - - Nutrition Label - - - - -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  + ``` diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f423cf65d5864132a0956.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f423cf65d5864132a0956.md index 9efd863ba20..3c173be9fa4 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f423cf65d5864132a0956.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f423cf65d5864132a0956.md @@ -24,22 +24,24 @@ assert(document.querySelector('h1')?.classList?.contains('bold')); ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  --fcc-editable-region-- - + ``` diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f42a021625f656101ef93.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f42a021625f656101ef93.md index bcb81d28b2a..6570f287da5 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f42a021625f656101ef93.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f42a021625f656101ef93.md @@ -9,7 +9,7 @@ dashedName: step-22 同样重要的元素之间的水平间距可以增加文本的可读性。 -将文本 `2/3 cup (55g)` 包裹在 `span` 元素中,并将 `class` 属性设置为 `right`。 +Wrap the text `2/3 cup (55g)` in a `span` element. # --hints-- @@ -19,19 +19,13 @@ dashedName: step-22 assert(document.querySelector('span')); ``` -新的 `span` 元素应该将 `class` 属性设置为 `right`。 - -```js -assert(document.querySelector('span')?.classList?.contains('right')); -``` - -你的 `span` 元素应包含文本 `2/3 cup (55g)`。 +Your `span` element should have the text `2/3 cup (55g)`. ```js assert(document.querySelector('span')?.textContent?.trim() === '2/3 cup (55g)'); ``` -`p` 元素仍应包含文本 `Serving size 2/3 cup (55g)`。 +Your `p` element should still have the text `Serving size 2/3 cup (55g)`. ```js assert(document.querySelectorAll('p')?.[1]?.innerText === 'Serving size 2/3 cup (55g)'); @@ -44,22 +38,24 @@ assert(document.querySelectorAll('p')?.[1]?.innerText === 'Serving size 2/3 cup ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  --fcc-editable-region-- - + ``` diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4bfb9de4a16703b56eb6.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4bfb9de4a16703b56eb6.md index d86efb70c76..3629a1ee6f0 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4bfb9de4a16703b56eb6.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4bfb9de4a16703b56eb6.md @@ -7,22 +7,20 @@ dashedName: step-23 # --description-- -`float` 属性用于将元素放置在其容器的左侧或右侧,允许其他内容(例如文本)环绕它。 - -创建一个新的 `.right` 选择器,并将 `float` 属性设置为 `right`。 +Now we can add the horizontal spacing using `flex`. In your `p` selector, add a `display` property set to `flex` and a `justify-content` property set to `space-between`. # --hints-- -应该创建一个新的 `.right` 选择器。 +Your `p` selector should have a `display` property set to `flex`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.right')); +assert(new __helpers.CSSHelp(document).getStyle('p')?.display === 'flex'); ``` -`.right` 选择器应该有一个 `float` 属性设置为 `right`。 +Your `p` selector should have a `justify-content` property set to `space-between`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.right')?.float === 'right'); +assert(new __helpers.CSSHelp(document).getStyle('p')?.justifyContent === 'space-between'); ``` # --seed-- @@ -32,20 +30,22 @@ assert(new __helpers.CSSHelp(document).getStyle('.right')?.float === 'right'); ```html - - - Nutrition Label - - - - -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  + ``` @@ -75,9 +75,11 @@ h1 { letter-spacing: 0.15px } +--fcc-editable-region-- p { margin: 0; } +--fcc-editable-region-- .divider { border-bottom: 1px solid #888989; @@ -87,8 +89,4 @@ p { .bold { font-weight: 800; } - ---fcc-editable-region-- - ---fcc-editable-region-- ``` diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ce9d877b668417c0c42.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ce9d877b668417c0c42.md index b175c69633d..2b917e41d55 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ce9d877b668417c0c42.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ce9d877b668417c0c42.md @@ -40,22 +40,24 @@ assert(children?.[3]?.localName === 'p'); ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  --fcc-editable-region-- - + ``` @@ -87,6 +89,8 @@ h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -97,8 +101,4 @@ p { .bold { font-weight: 800; } - -.right { - float: right; -} ``` diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4dde9d72e3694cb9ee3b.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4dde9d72e3694cb9ee3b.md index 3c760e1c3c3..3dc540f61fd 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4dde9d72e3694cb9ee3b.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4dde9d72e3694cb9ee3b.md @@ -39,22 +39,24 @@ assert(style?.letterSpacing === '0.15px'); ```html - - - Nutrition Label - - - - -
                                                                                                  -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  -
                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  +
                                                                                                  + ``` @@ -88,6 +90,8 @@ h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -98,8 +102,4 @@ p { .bold { font-weight: 800; } - -.right { - float: right; -} ``` diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ec58334106a4170c2a8.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ec58334106a4170c2a8.md index 362f9ce18e9..ded82e95a8f 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ec58334106a4170c2a8.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ec58334106a4170c2a8.md @@ -7,7 +7,7 @@ dashedName: step-26 # --description-- -在 `header` 元素下创建一个新的 `div` 元素,并将其 `class` 属性设置为 `divider lg`。 +Create a new `div` element below your `header` element, and give it a `class` attribute set to `divider large`. # --hints-- @@ -23,12 +23,12 @@ assert(document.querySelectorAll('div')?.length === 3); assert(document.querySelector('.label')?.lastElementChild?.localName === 'div'); ``` -新的 `div` 元素应该将 `class` 属性设置为 `divider lg`。 +Your new `div` element should have the `class` attribute set to `divider large`. ```js const div = document.querySelector('.label')?.lastElementChild; assert(div?.classList?.contains('divider')); -assert(div?.classList?.contains('lg')); +assert(div?.classList?.contains('large')); ``` # --seed-- @@ -38,25 +38,27 @@ assert(div?.classList?.contains('lg')); ```html - - - Nutrition Label - - - - -
                                                                                                  -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  --fcc-editable-region-- --fcc-editable-region-- -
                                                                                                  - +
                                                                                                  + ``` @@ -88,6 +90,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -98,8 +102,4 @@ p { .bold { font-weight: 800; } - -.right { - float: right; -} ``` diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4f9e4a40566b776a8f38.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4f9e4a40566b776a8f38.md index 6be820b0233..3807810d68a 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4f9e4a40566b776a8f38.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4f9e4a40566b776a8f38.md @@ -7,32 +7,32 @@ dashedName: step-27 # --description-- -创建一个新的 `.lg` 选择器,并将其 `height` 属性设置为 `10px`。 同时创建一个 `.lg, .md` 选择器,并将 `background-color` 属性设置为 `black`。 +Create a new `.large` selector and give it a `height` property set to `10px`. Also create an `.large, .medium` selector and set the `background-color` property to `black`. # --hints-- -应该有一个新的 `.lg` 选择器。 +You should have a new `.large` selector. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg')); +assert(new __helpers.CSSHelp(document).getStyle('.large')); ``` -`.lg` 选择器应该将 `height` 属性设置为 `10px`。 +Your `.large` selector should have a `height` property set to `10px`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg')?.height === '10px'); +assert(new __helpers.CSSHelp(document).getStyle('.large')?.height === '10px'); ``` -应该有一个新的 `.lg, .md` 选择器。 +You should have a new `.large, .medium` selector. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')); +assert(new __helpers.CSSHelp(document).getStyle('.large, .medium')); ``` -`.lg, .md` 选择器应该有一个 `background-color` 属性设置为 `black`。 +Your `.large, .medium` selector should have a `background-color` property set to `black`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')?.backgroundColor === 'black'); +assert(new __helpers.CSSHelp(document).getStyle('.large, .medium')?.backgroundColor === 'black'); ``` # --seed-- @@ -42,23 +42,25 @@ assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')?.backgroundColor === ```html - - - Nutrition Label - - - - -
                                                                                                  -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  -
                                                                                                  -
                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  + ``` @@ -90,6 +92,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -101,10 +105,6 @@ p { font-weight: 800; } -.right { - float: right; -} - --fcc-editable-region-- --fcc-editable-region-- diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f50473cc0196c6dd3892a.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f50473cc0196c6dd3892a.md index 78a5ac1e96d..5d39e936d58 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f50473cc0196c6dd3892a.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f50473cc0196c6dd3892a.md @@ -7,16 +7,16 @@ dashedName: step-28 # --description-- -你可能会注意到 `.lg` 元素的底部仍有一个小边框。 要重置它,给 `.lg, .md` 选择器一个 `border` 属性设置为 `0`。 +You may notice there is still a small border at the bottom of your `.large` element. To reset this, give your `.large, .medium` selector a `border` property set to `0`. -注意:`md`(中等)类将在步骤 37 中用于营养标签的较细柱状图。 +Note: the `medium`(medium) class will be utilized in step 37 for the thinner bars of the nutrition label. # --hints-- -`.lg, .md` 选择器应该将 `border` 属性设置为 `0`。 +Your `.large, .medium` selector should have a `border` property set to `0`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')?.borderWidth === '0px'); +assert(new __helpers.CSSHelp(document).getStyle('.large, .medium')?.borderWidth === '0px'); ``` # --seed-- @@ -26,23 +26,25 @@ assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')?.borderWidth === '0p ```html - - - Nutrition Label - - - - -
                                                                                                  -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  -
                                                                                                  -
                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  + ``` @@ -74,6 +76,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -85,16 +89,12 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } --fcc-editable-region-- -.lg, .md { +.large, .medium { background-color: black; } --fcc-editable-region-- diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51257a8a516d80b6c743.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51257a8a516d80b6c743.md index 3354b297798..15953a7ffd3 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51257a8a516d80b6c743.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51257a8a516d80b6c743.md @@ -7,7 +7,7 @@ dashedName: step-29 # --description-- -在 `.lg` 元素下创建一个新的 `div`,并将 `class` 属性设置为 `calories-info`。 +Create a new `div` below your `.large` element and give it a `class` attribute set to `calories-info`. # --hints-- @@ -23,10 +23,10 @@ assert(document.querySelectorAll('div')?.length === 4); assert(document.querySelector('.label')?.lastElementChild?.classList?.contains('calories-info')); ``` -新的 `div` 应该在 `.lg` 元素之后。 +Your new `div` should come after the `.large` element. ```js -assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('lg')); +assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('large')); ``` # --seed-- @@ -36,26 +36,28 @@ assert(document.querySelector('.label')?.lastElementChild?.previousElementSiblin ```html - - - Nutrition Label - - - - -
                                                                                                  -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  -
                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  +
                                                                                                  --fcc-editable-region-- --fcc-editable-region-- -
                                                                                                  - +
                                                                                                  + ``` @@ -87,6 +89,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -98,15 +102,11 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51e4e5b24a6e80eccce1.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51e4e5b24a6e80eccce1.md index 3e13fbb5082..767deba2cd7 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51e4e5b24a6e80eccce1.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51e4e5b24a6e80eccce1.md @@ -7,27 +7,39 @@ dashedName: step-30 # --description-- -在 `.calories-info` 元素中,创建一个 `p` 元素。 给那个 `p` 元素一个 `class` 属性设置为 `bold sm-text`,以及文本 `Amount per serving`。 +Within your `.calories-info` element, create a `div` element. Give that `div` element a `class` attribute set to `left-container`. Within the newly created `div` element, create a `h2` element with the text `Amount per serving`. Give the `h2` element a `class` attribute set to `bold small-text`. # --hints-- -应该在 `.calories-info` 元素中创建一个新的 `p` 元素。 +You should create a new `div` element within your `.calories-info` element. ```js -assert(document.querySelector('.calories-info')?.children?.[0]?.localName === 'p'); +assert(document.querySelector('.calories-info')?.children?.[0]?.localName === 'div'); ``` -新的 `p` 元素应该有一个 `class` 属性设置为 `bold sm-text`。 +Your new `div` element should have a `class` attribute set to `left-container`. ```js -assert(document.querySelector('.calories-info')?.children?.[0]?.classList.contains('bold')); -assert(document.querySelector('.calories-info')?.children?.[0]?.classList.contains('sm-text')); +assert(document.querySelector('.calories-info')?.children?.[0]?.classList.contains('left-container')); ``` -新的 `p` 元素应包含文本 `Amount per serving`。 +You should create a new `h2` element within your `.left-container` element. ```js -assert(document.querySelector('.calories-info')?.children?.[0]?.innerText === 'Amount per serving'); +assert(document.querySelector('.left-container')?.children?.[0]?.localName === 'h2'); +``` + +Your new `h2` element should have a `class` attribute set to `bold small-text`. + +```js +assert(document.querySelector('.left-container')?.children?.[0]?.classList.contains('bold')); +assert(document.querySelector('.left-container')?.children?.[0]?.classList.contains('small-text')); +``` + +Your new `h2` element should have the text `Amount per serving`. + +```js +assert(document.querySelector('.left-container')?.children?.[0]?.innerText === 'Amount per serving'); ``` # --seed-- @@ -37,28 +49,30 @@ assert(document.querySelector('.calories-info')?.children?.[0]?.innerText === 'A ```html - - - Nutrition Label - - - - -
                                                                                                  -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  -
                                                                                                  ---fcc-editable-region-- -
                                                                                                  -
                                                                                                  + + + Nutrition Label + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  +
                                                                                                  --fcc-editable-region-- +
                                                                                                  +
                                                                                                  - +--fcc-editable-region-- +
                                                                                                  + ``` @@ -90,6 +104,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -101,15 +117,11 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md index 7b6708b0e41..0218cc6a670 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md @@ -9,20 +9,20 @@ dashedName: step-31 `rem` 单位代表 `root em`,与 `html` 元素的字体大小有关。 -创建一个 `.sm-text` 选择器并将 `font-size` 设置为 `0.85rem`,计算结果大致为 `13.6px`(记得你之前将 `html` 设置为具有 `16px` 的 `font-size`)。 +Create an `.small-text` selector and set the `font-size` to `0.85rem`, which would calculate to be roughly `13.6px` (remember that you set your `html` to have a `font-size` of `16px`). # --hints-- -应该有一个 `.sm-text` 选择器。 +You should have an `.small-text` selector. ```js -assert(new __helpers.CSSHelp(document).getStyle('.sm-text')); +assert(new __helpers.CSSHelp(document).getStyle('.small-text')); ``` -`.sm-text` 选择器应该有一个 `font-size` 属性设置为 `0.85rem`。 +Your `.small-text` selector should have a `font-size` property set to `0.85rem`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.sm-text')?.fontSize === '0.85rem'); +assert(new __helpers.CSSHelp(document).getStyle('.small-text')?.fontSize === '0.85rem'); ``` # --seed-- @@ -32,26 +32,30 @@ assert(new __helpers.CSSHelp(document).getStyle('.sm-text')?.fontSize === '0.85r ```html - - - Nutrition Label - - - - -
                                                                                                  -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  Amount per serving

                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +

                                                                                                  Amount per serving

                                                                                                  - +
                                                                                                  + ``` @@ -83,6 +87,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -94,15 +100,11 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5486b8fd4b71633f69b0.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5486b8fd4b71633f69b0.md index 061c81c8ce9..476010261b1 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5486b8fd4b71633f69b0.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5486b8fd4b71633f69b0.md @@ -1,51 +1,50 @@ --- id: 615f5486b8fd4b71633f69b0 -title: 步骤 32 +title: Step 33 challengeType: 0 -dashedName: step-32 +dashedName: step-33 --- # --description-- -在 `.sm-text` 元素下方,使用文本 `Calories 230` 创建一个新的 `h1` 元素。 将文本的 `230` 部分包裹在 `span` 元素中,其中 `class` 设置为 `right`。 +Below your `.small-text` element, create a new `p` element with the text `Calories`. Also below the `.left-container` element, create a new `span` element with the text `230`. # --hints-- -`.calories-info` 元素中应该有一个新的 `h1` 元素。 +You should have a new `p` element within your `.calories-info` element. ```js -assert(document.querySelector('.calories-info')?.querySelector('h1')) +assert(document.querySelector('.calories-info')?.querySelector('p')) ``` -`h1` 元素应该在 `.sm-text` 元素之后。 +You should have a new `span` element within your `.calories-info` element. ```js -assert(document.querySelector('.sm-text')?.nextElementSibling?.localName === 'h1'); +assert(document.querySelector('.calories-info')?.querySelector('span')) ``` -`h1` 元素应包含文本 `Calories 230`。 +Your `p` element should come after your `.small-text` element. ```js -// the float: right property does weird things to the inner text. -assert(document.querySelector('.calories-info')?.lastElementChild?.innerText.match(/Calories[\s|\n]*230/)); +assert(document.querySelector('.small-text')?.nextElementSibling?.localName === 'p'); ``` -应该在新的 `h1` 元素中创建一个 `span` 元素。 +Your `p` element should have the text `Calories`. ```js -assert(document.querySelector('.calories-info')?.lastElementChild?.querySelector('span')); +assert(document.querySelector('.left-container')?.lastElementChild?.innerText === 'Calories'); ``` -`span` 元素应该将 `class` 设置为 `right`。 +Your `span` element should come after your `.left-container` element. ```js -assert(document.querySelector('.calories-info')?.lastElementChild?.querySelector('span')?.classList?.contains('right')); +assert(document.querySelector('.left-container')?.nextElementSibling?.localName ==='span'); ``` `span` 元素应包含文本 `230`。 ```js -assert(document.querySelector('.calories-info')?.lastElementChild?.querySelector('span')?.innerText === '230'); +assert(document.querySelector('.calories-info')?.lastElementChild?.innerText === '230'); ``` # --seed-- @@ -55,28 +54,32 @@ assert(document.querySelector('.calories-info')?.lastElementChild?.querySelector ```html - - - Nutrition Label - - - - -
                                                                                                  -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  -
                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

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

                                                                                                  Amount per serving

                                                                                                  +
                                                                                                  +
                                                                                                  +

                                                                                                  Amount per serving

                                                                                                  ---fcc-editable-region--
                                                                                                  - +--fcc-editable-region-- +
                                                                                                  + ``` @@ -108,6 +111,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -119,20 +124,20 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } + +.calories-info h2 { + margin: 0; +} ``` diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f575b50b91e72af079480.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f575b50b91e72af079480.md index 3d7883237a8..14f20ffb784 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f575b50b91e72af079480.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f575b50b91e72af079480.md @@ -1,29 +1,41 @@ --- id: 615f575b50b91e72af079480 -title: 步骤 33 +title: Step 35 challengeType: 0 -dashedName: step-33 +dashedName: step-35 --- # --description-- -创建一个新的 `.calories-info h1` 选择器,将上下边距设置为 `-5px`,将左右边距设置为 `-2px`。 +Create a new `.left-container p` selector setting the top and bottom margin to `-5px`, and the left and right margin to `-2px`. Also set the `font-size` to `2em` and `font-weight` to `700`. # --hints-- -应该有一个新的 `.calories-info h1` 选择器。 +You should have a new `.left-container p` selector. ```js -assert(new __helpers.CSSHelp(document).getStyle('.calories-info h1')); +assert(new __helpers.CSSHelp(document).getStyle('.left-container p')); ``` -新的 `.calories-info h1` 选择器应将 `margin` 属性设置为 `-5px -2px`。 +Your new `.left-container p` selector should have a `margin` property set to `-5px -2px`. ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marginTop, '-5px'); -assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marginBottom, '-5px'); -assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marginLeft, '-2px'); -assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marginRight, '-2px'); +assert.equal(new __helpers.CSSHelp(document).getStyle('.left-container p')?.marginTop, '-5px'); +assert.equal(new __helpers.CSSHelp(document).getStyle('.left-container p')?.marginBottom, '-5px'); +assert.equal(new __helpers.CSSHelp(document).getStyle('.left-container p')?.marginLeft, '-2px'); +assert.equal(new __helpers.CSSHelp(document).getStyle('.left-container p')?.marginRight, '-2px'); +``` + +Your new `.left-container p` selector should have a `font-size` property set to `2em`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.left-container p')?.fontSize === '2em'); +``` + +Your new `.left-container p` selector should have a `font-weight` property set to `700`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.left-container p')?.fontWeight === '700'); ``` # --seed-- @@ -33,27 +45,32 @@ assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marg ```html - - - Nutrition Label - - - - -
                                                                                                  -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  Amount per serving

                                                                                                  -

                                                                                                  Calories 230

                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +

                                                                                                  Amount per serving

                                                                                                  +

                                                                                                  Calories

                                                                                                  + 230
                                                                                                  - +
                                                                                                  + ``` @@ -85,6 +102,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -96,23 +115,29 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + --fcc-editable-region-- --fcc-editable-region-- diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5af373a68e744a3c5a76.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5af373a68e744a3c5a76.md index b4b573a81d8..3cd3c069dea 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5af373a68e744a3c5a76.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5af373a68e744a3c5a76.md @@ -1,13 +1,13 @@ --- id: 615f5af373a68e744a3c5a76 -title: 步骤 34 +title: Step 36 challengeType: 0 -dashedName: step-34 +dashedName: step-36 --- # --description-- -创建一个 `.calories-info span` 选择器并将 `font-size` 设置为 `1.2em`。 +Create a `.calories-info span` selector, set its `font-size` to `2.4em` and `font-weight` to `700`. # --hints-- @@ -17,10 +17,16 @@ dashedName: step-34 assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')); ``` -`.calories-info span` 选择器应该将 `font-size` 属性设置为 `1.2em`。 +Your `.calories-info span` selector should have a `font-size` property set to `2.4em`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.fontSize === '1.2em'); +assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.fontSize === '2.4em'); +``` + +Your `.calories-info span` selector should have a `font-weight` property set to `700`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.fontWeight === '700'); ``` # --seed-- @@ -30,27 +36,32 @@ assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.fontSize ```html - - - Nutrition Label - - - - -
                                                                                                  -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  Amount per serving

                                                                                                  -

                                                                                                  Calories 230

                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +

                                                                                                  Amount per serving

                                                                                                  +

                                                                                                  Calories

                                                                                                  + 230
                                                                                                  - +
                                                                                                  + ``` @@ -82,6 +93,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -93,25 +106,33 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; + font-size: 2em; + font-weight: 700; } --fcc-editable-region-- diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5fd85d0062761f288364.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5fd85d0062761f288364.md index bf98878529e..fe65d52bba4 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5fd85d0062761f288364.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5fd85d0062761f288364.md @@ -1,22 +1,22 @@ --- id: 615f5fd85d0062761f288364 -title: 步骤 36 +title: Step 37 challengeType: 0 -dashedName: step-36 +dashedName: step-37 --- # --description-- 排版往往是艺术而非科学。 你可能需要调整对齐等内容,直到它看起来正确为止。 -给 `.calories-info span` 选择器一个 `margin-top` 设置为 `-7px`。 这会将 `230` 文本移动到位。 +Give your `.calories-info span` selector a `margin` set to `-7px -2px`. 这会将 `230` 文本移动到位。 # --hints-- -`.calories-info span` 选择器应将 `margin-top` 设置为 `-7px`。 +Your `.calories-info span` selector should have a `margin` set to `-7px -2px`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.marginTop === '-7px'); +assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.margin === '-7px -2px'); ``` # --seed-- @@ -26,27 +26,32 @@ assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.marginTo ```html - - - Nutrition Label - - - - -
                                                                                                  -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  Amount per serving

                                                                                                  -

                                                                                                  Calories 230

                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +

                                                                                                  Amount per serving

                                                                                                  +

                                                                                                  Calories

                                                                                                  + 230
                                                                                                  - +
                                                                                                  + ``` @@ -78,6 +83,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -89,31 +96,39 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } --fcc-editable-region-- .calories-info span { - font-size: 1.2em; + font-size: 2.4em; + font-weight: 700; } --fcc-editable-region-- ``` diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f61338c8ca176d6445574.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f61338c8ca176d6445574.md index 911e75a5e10..645d019144d 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f61338c8ca176d6445574.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f61338c8ca176d6445574.md @@ -1,13 +1,13 @@ --- id: 615f61338c8ca176d6445574 -title: 步骤 37 +title: Step 38 challengeType: 0 -dashedName: step-37 +dashedName: step-38 --- # --description-- -在 `.calories-info` 元素下方,添加一个 `div`,并将 `class` 属性设置为 `divider md`。 +Below your `.calories-info` element, add a `div` with the `class` attribute set to `divider medium`. # --hints-- @@ -17,11 +17,11 @@ dashedName: step-37 assert(document.querySelectorAll('.label > div')?.length === 3) ``` -新的 `div` 应该将 `class` 属性设置为 `divider md`。 这个 div 应该是 `.label` 元素中的最后一个元素。 +Your new `div` should have the `class` attribute set to `divider medium`. 这个 div 应该是 `.label` 元素中的最后一个元素。 ```js const div = document.querySelector('.label')?.lastElementChild; -assert(div?.classList?.contains('divider') && div?.classList?.contains('md')); +assert(div?.classList?.contains('divider') && div?.classList?.contains('medium')); ``` # --seed-- @@ -31,30 +31,35 @@ assert(div?.classList?.contains('divider') && div?.classList?.contains('md')); ```html - - - Nutrition Label - - - - -
                                                                                                  -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  Amount per serving

                                                                                                  -

                                                                                                  Calories 230

                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +

                                                                                                  Amount per serving

                                                                                                  +

                                                                                                  Calories

                                                                                                  + 230 +
                                                                                                  --fcc-editable-region-- --fcc-editable-region-- -
                                                                                                  - +
                                                                                                  + ``` @@ -86,6 +91,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -97,30 +104,38 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; } ``` diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f666ac5edea782feb7e75.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f666ac5edea782feb7e75.md index 16bc07c337f..f074a2cf764 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f666ac5edea782feb7e75.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f666ac5edea782feb7e75.md @@ -1,26 +1,26 @@ --- id: 615f666ac5edea782feb7e75 -title: 步骤 38 +title: Step 39 challengeType: 0 -dashedName: step-38 +dashedName: step-39 --- # --description-- -创建一个 `.md` 选择器并为其赋予 `height` 属性为 `5px`。 +Create an `.medium` selector and give it a `height` property of `5px`. # --hints-- -应该创建一个 `.md` 选择器。 +You should create an `.medium` selector. ```js -assert(new __helpers.CSSHelp(document).getStyle('.md')); +assert(new __helpers.CSSHelp(document).getStyle('.medium')); ``` -`.md` 选择器应该将 `height` 属性设置为 `5px`。 +Your `.medium` selector should have a `height` property set to `5px`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.md')?.height === '5px'); +assert(new __helpers.CSSHelp(document).getStyle('.medium')?.height === '5px'); ``` # --seed-- @@ -30,28 +30,33 @@ assert(new __helpers.CSSHelp(document).getStyle('.md')?.height === '5px'); ```html - - - Nutrition Label - - - - -
                                                                                                  -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  Amount per serving

                                                                                                  -

                                                                                                  Calories 230

                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +

                                                                                                  Amount per serving

                                                                                                  +

                                                                                                  Calories

                                                                                                  -
                                                                                                  + 230
                                                                                                  - +
                                                                                                  +
                                                                                                  + ``` @@ -83,6 +88,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -94,15 +101,11 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } @@ -111,17 +114,29 @@ p { --fcc-editable-region-- -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; } ``` diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f671b6d1919792745aa5d.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f671b6d1919792745aa5d.md index f42ff791fd7..96f880e9f6d 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f671b6d1919792745aa5d.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f671b6d1919792745aa5d.md @@ -1,29 +1,29 @@ --- id: 615f671b6d1919792745aa5d -title: 步骤 39 +title: Step 40 challengeType: 0 -dashedName: step-39 +dashedName: step-40 --- # --description-- -在 `.md` 元素下创建一个新的 `div` 元素。 给它一个 `class` 属性设置为 `daily-value sm-text`。 在这个新的 `div` 中,添加带有文本 `% Daily Value *` 的 `p` 元素,并设置 `class` 属性 `right bold`。 +Create a new `div` element below your `.medium` element. Give it a `class` attribute set to `daily-value small-text`. Within this new `div`, add a `p` element with the text `% Daily Value *`, and set the `class` attribute to `bold right`. # --hints-- -应该在 `.md` 元素之后创建一个新的 `div` 元素。 +You should create a new `div` element after your `.medium` element. ```js assert(document.querySelector('.label')?.lastElementChild?.localName === 'div'); assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('divider')); -assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('md')); +assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('medium')); ``` -新的 `div` 应该有一个 `class` 属性设置为 `daily-value sm-text`。 +Your new `div` should have a `class` attribute set to `daily-value small-text`. ```js assert(document.querySelector('.label')?.lastElementChild?.classList?.contains('daily-value')); -assert(document.querySelector('.label')?.lastElementChild?.classList?.contains('sm-text')); +assert(document.querySelector('.label')?.lastElementChild?.classList?.contains('small-text')); ``` 新的 `div` 元素应该有一个 `p` 元素。 @@ -38,11 +38,11 @@ assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.lo assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.textContent === '% Daily Value *'); ``` -新的 `p` 元素应该有一个 `class` 属性设置为 `right bold`。 +Your new `p` element should have a `class` attribute set to `bold right`. ```js -assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.classList?.contains('right')); assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.classList?.contains('right')); ``` # --seed-- @@ -52,32 +52,36 @@ assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.cl ```html - - - Nutrition Label - - - - -
                                                                                                  -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  Amount per serving

                                                                                                  -

                                                                                                  Calories 230

                                                                                                  -
                                                                                                  -
                                                                                                  ---fcc-editable-region-- ---fcc-editable-region-- + + + Nutrition Label + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +

                                                                                                  Amount per serving

                                                                                                  +

                                                                                                  Calories

                                                                                                  + 230
                                                                                                  - + --fcc-editable-region-- +
                                                                                                  + + --fcc-editable-region-- +
                                                                                                  + ``` @@ -109,6 +113,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -120,34 +126,42 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; } ``` diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6823d0815b7a991f2a75.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6823d0815b7a991f2a75.md index 647af1d0ed4..862f541db13 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6823d0815b7a991f2a75.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6823d0815b7a991f2a75.md @@ -1,32 +1,32 @@ --- id: 615f6823d0815b7a991f2a75 -title: 步骤 40 +title: Step 42 challengeType: 0 -dashedName: step-40 +dashedName: step-42 --- # --description-- -`float` 样式导致新的 `p` 元素位于标签边框之外。 以现有的 `.divider` 元素为例,在 `p` 元素之后添加新的分隔符。 +Use your existing `.divider` element as an example to add a new divider after the `p` element. # --hints-- -应该在 `.daily-value.sm-text` 元素中创建一个新的 `div`。 +You should create a new `div` within your `.daily-value` element. ```js -assert(document.querySelectorAll('.daily-value.sm-text > div')?.length === 1) +assert(document.querySelectorAll('.daily-value.small-text > div')?.length === 1) ``` 新的 `div` 应该将 `class` 属性设置为 `divider`。 ```js -assert(document.querySelector('.daily-value.sm-text > div')?.classList?.contains('divider')) +assert(document.querySelector('.daily-value.small-text > div')?.classList?.contains('divider')) ``` 新的 `div` 应该在 `p` 元素之后。 ```js -assert(document.querySelector('.daily-value.sm-text > div')?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text > div')?.previousElementSibling?.localName === 'p'); ``` # --seed-- @@ -36,34 +36,38 @@ assert(document.querySelector('.daily-value.sm-text > div')?.previousElementSibl ```html - - - Nutrition Label - - - - -
                                                                                                  -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  Amount per serving

                                                                                                  -

                                                                                                  Calories 230

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

                                                                                                  % Daily Value *

                                                                                                  + + + Nutrition Label + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +

                                                                                                  Amount per serving

                                                                                                  +

                                                                                                  Calories

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

                                                                                                  % Daily Value *

                                                                                                  +
                                                                                                  + --fcc-editable-region-- +
                                                                                                  + ``` @@ -95,6 +99,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -106,34 +112,46 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } ``` diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6b2d164f81809efd9bdc.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6b2d164f81809efd9bdc.md index 3b913da9209..edba1dc5c5e 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6b2d164f81809efd9bdc.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6b2d164f81809efd9bdc.md @@ -1,56 +1,62 @@ --- id: 615f6b2d164f81809efd9bdc -title: 步骤 42 +title: Step 43 challengeType: 0 -dashedName: step-42 +dashedName: step-43 --- # --description-- -在最后一个 `.divider` 元素之后,创建一个 `p` 元素并为其指定文本 `Total Fat 8g 10%`。 将 `Total Fat` 包裹在 `span` 元素中,并将 `class` 设置为 `bold`。 将 `10%` 包裹在另一个 `span` 元素中,并将 `class` 设置为 `bold right`。 +在最后一个 `.divider` 元素之后,创建一个 `p` 元素并为其指定文本 `Total Fat 8g 10%`。 将 `Total Fat` 包裹在 `span` 元素中,并将 `class` 设置为 `bold`。 Wrap `10%` in another `span` element with the `class` set to `bold`. Also wrap the words `Total Fat 8g` in an additional `span` element for alignment. # --hints-- 应该在 `.daily-value` 元素的末尾创建一个新的 `p` 元素。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` 新的 `p` 元素应包含文本 `Total Fat 8g 10%`。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Total Fat 8g[\s|\n]+10%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Total Fat[\s|\n]+8g[\s|\n]+10%/)); ``` -`p` 元素应该有两个 `span` 元素。 +Your `p` element should have three `span` elements. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 2); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 3); ``` -第一个 `span` 元素应该包含文本 `Total Fat`。 +One `span` element should wrap the text `Total Fat`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.innerText === 'Total Fat'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span > span')?.innerText === 'Total Fat'); ``` -第一个 `span` 元素应该将 `class` 设置为 `bold`。 +The `span` element around `Total Fat` should have the `class` set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.className === 'bold'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span > span')?.className === 'bold'); ``` -第二个 `span` 元素应该包含文本 `10%`。 +A `span` element should wrap the text `10%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.[1]?.innerText === '10%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span + span')?.innerText === '10%'); ``` -第二个 `span` 元素应该将 `class` 设置为 `bold right`。 +The `span` element around `10%` should have the `class` set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.[1]?.className === 'bold right'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.[1]?.className === 'bold'); +``` + +A `span` element should have the text `Total Fat 8g`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Total Fat[\s|\n]+8g/)); ``` # --seed-- @@ -60,35 +66,39 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySe ```html - - - Nutrition Label - - - - -
                                                                                                  -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  Amount per serving

                                                                                                  -

                                                                                                  Calories 230

                                                                                                  -
                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  % Daily Value *

                                                                                                  -
                                                                                                  ---fcc-editable-region-- ---fcc-editable-region-- + + + Nutrition Label + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +

                                                                                                  Amount per serving

                                                                                                  +

                                                                                                  Calories

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

                                                                                                  % Daily Value *

                                                                                                  +
                                                                                                  +
                                                                                                  + --fcc-editable-region-- +
                                                                                                  + ``` @@ -120,46 +130,59 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } ``` diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6cc778f7698258467596.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6cc778f7698258467596.md index 0d0643b129d..78afe02cb9f 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6cc778f7698258467596.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6cc778f7698258467596.md @@ -1,46 +1,45 @@ --- id: 615f6cc778f7698258467596 -title: 步骤 43 +title: Step 44 challengeType: 0 -dashedName: step-43 +dashedName: step-44 --- # --description-- -在带有 `Total Fat` 文本的元素下方,使用文本 `Saturated Fat 1g 5%` 创建一个新的 `p` 元素。 将 `5%` 包裹在 `span` 中,并将 `class` 属性设置为 `bold right`。 +在带有 `Total Fat` 文本的元素下方,使用文本 `Saturated Fat 1g 5%` 创建一个新的 `p` 元素。 Wrap the `5%` in a `span` with the `class` attribute set to `bold`. In this case this is enough to align the percentage to `5%`. # --hints-- 应该使用 `Total Fat` 文本在元素下方创建一个新的 `p` 元素。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.innerText.match(/Total Fat 8g\s*10%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.innerText.match(/Total Fat 8g\s*10%/)); ``` 新 `p` 元素应包含文本 `Saturated Fat 1g 5%`。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText.match(/Saturated Fat 1g\s*5%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText.match(/Saturated Fat 1g\s*5%/)); ``` 新 `p` 元素应该有一个 `span` 元素。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.localName === 'span'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.localName === 'span'); ``` -`span` 元素应该将 `class` 属性设置为 `bold right`。 +Your `span` element should have the `class` attribute set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); ``` `span` 元素应该包含 `5%` 文本。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.innerText === "5%"); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === "5%"); ``` # --seed-- @@ -50,36 +49,40 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastEle ```html - - - Nutrition Label - - - - -
                                                                                                  -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  Amount per serving

                                                                                                  -

                                                                                                  Calories 230

                                                                                                  -
                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  % Daily Value *

                                                                                                  -
                                                                                                  -

                                                                                                  Total Fat 8g10%

                                                                                                  ---fcc-editable-region-- ---fcc-editable-region-- + + + Nutrition Label + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +

                                                                                                  Amount per serving

                                                                                                  +

                                                                                                  Calories

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

                                                                                                  % Daily Value *

                                                                                                  +
                                                                                                  +

                                                                                                  Total Fat 8g 10%

                                                                                                  +
                                                                                                  + --fcc-editable-region-- +
                                                                                                  + ``` @@ -111,46 +114,59 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } ``` diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6fddaac1e083502d3e6a.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6fddaac1e083502d3e6a.md index 881b8544f41..3a6483ebef2 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6fddaac1e083502d3e6a.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6fddaac1e083502d3e6a.md @@ -1,8 +1,8 @@ --- id: 615f6fddaac1e083502d3e6a -title: 步骤 44 +title: Step 45 challengeType: 0 -dashedName: step-44 +dashedName: step-45 --- # --description-- @@ -14,7 +14,7 @@ dashedName: step-44 带有文本 `Saturated Fat 1g 5%` 的 `p` 元素应该将 `class` 属性设置为 `indent`。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('indent')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('indent')); ``` # --seed-- @@ -24,36 +24,41 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                  -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  Amount per serving

                                                                                                  -

                                                                                                  Calories 230

                                                                                                  -
                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  % Daily Value *

                                                                                                  -
                                                                                                  -

                                                                                                  Total Fat 8g10%

                                                                                                  ---fcc-editable-region-- -

                                                                                                  Saturated Fat 1g 5%

                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +

                                                                                                  Amount per serving

                                                                                                  +

                                                                                                  Calories

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

                                                                                                  % Daily Value *

                                                                                                  +
                                                                                                  +

                                                                                                  Total Fat 8g 10%

                                                                                                  +

                                                                                                  Saturated Fat 1g 5%

                                                                                                  +
                                                                                                  + --fcc-editable-region-- +
                                                                                                  + ``` @@ -85,46 +90,59 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } ``` diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f70077a4ff98424236c1e.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f70077a4ff98424236c1e.md index ff463b119e2..09c875d488a 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f70077a4ff98424236c1e.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f70077a4ff98424236c1e.md @@ -1,8 +1,8 @@ --- id: 615f70077a4ff98424236c1e -title: 步骤 45 +title: Step 46 challengeType: 0 -dashedName: step-45 +dashedName: step-46 --- # --description-- @@ -30,34 +30,39 @@ assert(new __helpers.CSSHelp(document).getStyle('.indent')?.marginLeft === '1em' ```html - - - Nutrition Label - - - - -
                                                                                                  -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  Amount per serving

                                                                                                  -

                                                                                                  Calories 230

                                                                                                  -
                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  % Daily Value *

                                                                                                  -
                                                                                                  -

                                                                                                  Total Fat 8g10%

                                                                                                  -

                                                                                                  Saturated Fat 1g 5%

                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +

                                                                                                  Amount per serving

                                                                                                  +

                                                                                                  Calories

                                                                                                  + 230
                                                                                                  - +
                                                                                                  +
                                                                                                  +

                                                                                                  % Daily Value *

                                                                                                  +
                                                                                                  +

                                                                                                  Total Fat 8g 10%

                                                                                                  +

                                                                                                  Saturated Fat 1g 5%

                                                                                                  +
                                                                                                  +
                                                                                                  + ``` @@ -89,47 +94,60 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } --fcc-editable-region-- diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f72a872354a850d4f533e.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f72a872354a850d4f533e.md index f06a10c52ed..754f0cf3f5c 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f72a872354a850d4f533e.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f72a872354a850d4f533e.md @@ -1,8 +1,8 @@ --- id: 615f72a872354a850d4f533e -title: 步骤 46 +title: Step 47 challengeType: 0 -dashedName: step-46 +dashedName: step-47 --- # --description-- @@ -30,34 +30,39 @@ assert(new __helpers.CSSHelp(document).getStyle('.daily-value p')?.borderBottom ```html - - - Nutrition Label - - - - -
                                                                                                  -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  Amount per serving

                                                                                                  -

                                                                                                  Calories 230

                                                                                                  -
                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  % Daily Value *

                                                                                                  -
                                                                                                  -

                                                                                                  Total Fat 8g10%

                                                                                                  -

                                                                                                  Saturated Fat 1g 5%

                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +

                                                                                                  Amount per serving

                                                                                                  +

                                                                                                  Calories

                                                                                                  + 230
                                                                                                  - +
                                                                                                  +
                                                                                                  +

                                                                                                  % Daily Value *

                                                                                                  +
                                                                                                  +

                                                                                                  Total Fat 8g 10%

                                                                                                  +

                                                                                                  Saturated Fat 1g 5%

                                                                                                  +
                                                                                                  +
                                                                                                  + ``` @@ -89,47 +94,60 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f74a71f1e498619e38ee8.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f74a71f1e498619e38ee8.md index d64237388c5..94e20625ea4 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f74a71f1e498619e38ee8.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f74a71f1e498619e38ee8.md @@ -1,8 +1,8 @@ --- id: 615f74a71f1e498619e38ee8 -title: 步骤 47 +title: Step 48 challengeType: 0 -dashedName: step-47 +dashedName: step-48 --- # --description-- @@ -14,16 +14,15 @@ dashedName: step-47 带有文本 `% Daily Value *` 的 `p` 元素应该将 `no-divider` 添加到 `class` 属性中。 不要删除现有的类。 ```js -const p = document.querySelector('.daily-value.sm-text')?.firstElementChild; +const p = document.querySelector('.daily-value.small-text')?.firstElementChild; assert(p?.classList?.contains('no-divider')); assert(p?.classList?.contains('bold')); -assert(p?.classList?.contains('right')); ``` 带有文本 `Saturated Fat 1g 5%` 的 `p` 元素应该将 `no-divider` 添加到 `class` 属性中。 不要删除现有的类。 ```js -const p = document.querySelector('.daily-value.sm-text')?.lastElementChild; +const p = document.querySelector('.daily-value.small-text')?.lastElementChild; assert(p?.classList?.contains('no-divider')); assert(p?.classList?.contains('indent')); ``` @@ -35,36 +34,41 @@ assert(p?.classList?.contains('indent')); ```html - - - Nutrition Label - - - - -
                                                                                                  -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  Amount per serving

                                                                                                  -

                                                                                                  Calories 230

                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +

                                                                                                  Amount per serving

                                                                                                  +

                                                                                                  Calories

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

                                                                                                  % Daily Value *

                                                                                                  -
                                                                                                  -

                                                                                                  Total Fat 8g10%

                                                                                                  -

                                                                                                  Saturated Fat 1g 5%

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

                                                                                                  % Daily Value *

                                                                                                  +
                                                                                                  +

                                                                                                  Total Fat 8g 10%

                                                                                                  +

                                                                                                  Saturated Fat 1g 5%

                                                                                                  +
                                                                                                  + --fcc-editable-region-- +
                                                                                                  + ``` @@ -96,47 +100,60 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ad94380408d971d14f6.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ad94380408d971d14f6.md index 05e8e714ca4..251a31f88be 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ad94380408d971d14f6.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ad94380408d971d14f6.md @@ -1,8 +1,8 @@ --- id: 615f7ad94380408d971d14f6 -title: 步骤 48 +title: Step 49 challengeType: 0 -dashedName: step-48 +dashedName: step-49 --- # --description-- @@ -44,37 +44,43 @@ assert(style?.borderBottom === '1px solid rgb(136, 137, 137)'); ## --seed-contents-- + ```html - - - Nutrition Label - - - - -
                                                                                                  -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  Amount per serving

                                                                                                  -

                                                                                                  Calories 230

                                                                                                  -
                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  % Daily Value *

                                                                                                  -
                                                                                                  -

                                                                                                  Total Fat 8g10%

                                                                                                  -

                                                                                                  Saturated Fat 1g 5%

                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +

                                                                                                  Amount per serving

                                                                                                  +

                                                                                                  Calories

                                                                                                  + 230
                                                                                                  - +
                                                                                                  +
                                                                                                  +

                                                                                                  % Daily Value *

                                                                                                  +
                                                                                                  +

                                                                                                  Total Fat 8g 10%

                                                                                                  +

                                                                                                  Saturated Fat 1g 5%

                                                                                                  +
                                                                                                  +
                                                                                                  + ``` @@ -106,47 +112,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7bc680f7168ea01ebf99.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7bc680f7168ea01ebf99.md index 59ca7975077..06c31cc7cdd 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7bc680f7168ea01ebf99.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7bc680f7168ea01ebf99.md @@ -1,8 +1,8 @@ --- id: 615f7bc680f7168ea01ebf99 -title: 步骤 49 +title: Step 50 challengeType: 0 -dashedName: step-49 +dashedName: step-50 --- # --description-- @@ -13,16 +13,16 @@ dashedName: step-49 # --hints-- -应该在 `.daily-value.sm-text` 元素的末尾创建一个新的 `div`。 +You should create a new `div` at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` 新的 `div` 应该将 `class` 属性设置为 `divider`。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -32,36 +32,41 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                  -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  Amount per serving

                                                                                                  -

                                                                                                  Calories 230

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

                                                                                                  % Daily Value *

                                                                                                  -
                                                                                                  -

                                                                                                  Total Fat 8g10%

                                                                                                  -

                                                                                                  Saturated Fat 1g 5%

                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +

                                                                                                  Amount per serving

                                                                                                  +

                                                                                                  Calories

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

                                                                                                  % Daily Value *

                                                                                                  +
                                                                                                  +

                                                                                                  Total Fat 8g 10%

                                                                                                  +

                                                                                                  Saturated Fat 1g 5%

                                                                                                  +
                                                                                                  + --fcc-editable-region-- +
                                                                                                  + ``` @@ -93,47 +98,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7c71eab8218f846e4503.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7c71eab8218f846e4503.md index cc0e596ab68..555776a7c78 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7c71eab8218f846e4503.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7c71eab8218f846e4503.md @@ -1,32 +1,32 @@ --- id: 615f7c71eab8218f846e4503 -title: 步骤 50 +title: Step 51 challengeType: 0 -dashedName: step-50 +dashedName: step-51 --- # --description-- -在最后一个 `.divider` 之后,创建另一个 `p` 元素,其中包含文本 `Trans Fat 0g`。 通过将单词 `Trans` 包装在 `i` 元素中,将其变为斜体。 给新的 `p` 元素的 `class` 属性设置为 `indent no-divider`。 +在最后一个 `.divider` 之后,创建另一个 `p` 元素,其中包含文本 `Trans Fat 0g`。 通过将单词 `Trans` 包装在 `i` 元素中,将其变为斜体。 给新的 `p` 元素的 `class` 属性设置为 `indent no-divider`。 Wrap `Trans Fat 0g` in a `span` element for alignment. # --hints-- -应该在 `.daily-value.sm-text` 元素的末尾创建一个新的 `p` 元素。 +You should create a new `p` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` 新 `p` 元素应该包含文本 `Trans Fat 0g`。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText === 'Trans Fat 0g'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText === 'Trans Fat 0g'); ``` 新的 `p` 元素应该将 `class` 属性设置为 `indent no-divider`。 ```js -const p = document.querySelector('.daily-value.sm-text')?.lastElementChild; +const p = document.querySelector('.daily-value.small-text')?.lastElementChild; assert(p?.classList?.contains('indent')); assert(p?.classList?.contains('no-divider')); ``` @@ -34,13 +34,25 @@ assert(p?.classList?.contains('no-divider')); 新的 `p` 元素应该有一个 `i` 元素。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.localName === 'i'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('i')); ``` `i` 元素应该包含文本 `Trans`。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.innerText === 'Trans'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('i')?.innerText === 'Trans'); +``` + +Your new `p` element should have a `span` element. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span')); +``` + +Your `span` element should wrap the text `Trans Fat 0g`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span')?.innerText?.match(/Trans[\s|\n]+Fat 0g/)); ``` # --seed-- @@ -50,37 +62,42 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstEl ```html - - - Nutrition Label - - - - -
                                                                                                  -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  Amount per serving

                                                                                                  -

                                                                                                  Calories 230

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

                                                                                                  % Daily Value *

                                                                                                  -
                                                                                                  -

                                                                                                  Total Fat 8g10%

                                                                                                  -

                                                                                                  Saturated Fat 1g 5%

                                                                                                  -
                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +

                                                                                                  Amount per serving

                                                                                                  +

                                                                                                  Calories

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

                                                                                                  % Daily Value *

                                                                                                  +
                                                                                                  +

                                                                                                  Total Fat 8g 10%

                                                                                                  +

                                                                                                  Saturated Fat 1g 5%

                                                                                                  +
                                                                                                  +
                                                                                                  + --fcc-editable-region-- +
                                                                                                  + ``` @@ -112,47 +129,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7d489a581590d1350288.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7d489a581590d1350288.md index 06b3d20a9dd..02d08aca477 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7d489a581590d1350288.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7d489a581590d1350288.md @@ -1,8 +1,8 @@ --- id: 615f7d489a581590d1350288 -title: 步骤 51 +title: Step 52 challengeType: 0 -dashedName: step-51 +dashedName: step-52 --- # --description-- @@ -11,16 +11,16 @@ dashedName: step-51 # --hints-- -应该在 `.daily-value.sm-text` 元素的末尾创建一个新的 `div` 元素。 +You should create a new `div` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` 新的 `div` 元素应该将 `class` 属性设置为 `divider`。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -30,38 +30,43 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                  -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  Amount per serving

                                                                                                  -

                                                                                                  Calories 230

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

                                                                                                  % Daily Value *

                                                                                                  -
                                                                                                  -

                                                                                                  Total Fat 8g10%

                                                                                                  -

                                                                                                  Saturated Fat 1g 5%

                                                                                                  -
                                                                                                  -

                                                                                                  Trans Fat 0g

                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +

                                                                                                  Amount per serving

                                                                                                  +

                                                                                                  Calories

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

                                                                                                  % Daily Value *

                                                                                                  +
                                                                                                  +

                                                                                                  Total Fat 8g 10%

                                                                                                  +

                                                                                                  Saturated Fat 1g 5%

                                                                                                  +
                                                                                                  +

                                                                                                  Trans Fat 0g

                                                                                                  +
                                                                                                  + --fcc-editable-region-- +
                                                                                                  + ``` @@ -93,47 +98,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7de4487b64919bb4aa5e.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7de4487b64919bb4aa5e.md index 57cee3b662c..e0eb5d1d12f 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7de4487b64919bb4aa5e.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7de4487b64919bb4aa5e.md @@ -1,57 +1,62 @@ --- id: 615f7de4487b64919bb4aa5e -title: 步骤 52 +title: Step 53 challengeType: 0 -dashedName: step-52 +dashedName: step-53 --- # --description-- -在最后一个 `.divider` 之后,使用文本 `Cholesterol 0mg 0%` 创建一个新的 `p` 元素。 将文本 `Cholesterol` 包裹在 `span` 元素中,并将 `span` 元素的 `class` 属性设置为 `bold`。 将文本 `0%` 包裹在另一个 `span` 元素中,并将 `class` 设置为 `bold right`。 +在最后一个 `.divider` 之后,使用文本 `Cholesterol 0mg 0%` 创建一个新的 `p` 元素。 将文本 `Cholesterol` 包裹在 `span` 元素中,并将 `span` 元素的 `class` 属性设置为 `bold`。 Wrap the text `0%` in another `span` element, with the `class` set to `bold`. Also wrap `Cholesterol 0mg` in an additional `span` element for the alignment. # --hints-- -应该在 `.daily-value.sm-text` 元素的末尾创建一个新的 `p` 元素。 +You should create a new `p` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` 新的 `p` 元素应包含文本 `Cholesterol 0mg 0%`。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Cholesterol 0mg[\s|\n]+0%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Cholesterol[\s|\n]+0mg[\s|\n]+0%/)); ``` -新的 `p` 元素应该有两个 `span` 元素。 +Your new `p` element should have three `span` elements. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 2); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 3); ``` -第一个 `span` 元素应该将 `class` 属性设置为 `bold`。 +Your first `span` `Cholesterol` element should have the `class` attribute set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.classList?.contains('bold')); ``` -第一个 `span` 元素应该包含文本 `Cholesterol`。 +Your first `span` element should wrap the text `Cholesterol 0mg`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.innerText === 'Cholesterol'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.innerText?.match(/Cholesterol[\s|\n]+0mg/)); ``` -第二个 `span` 元素应该将 `class` 属性设置为 `bold right`。 +Your first `span` element should wrap the text `Cholesterol`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.innerText === 'Cholesterol'); ``` -第二个 `span` 元素应该包含文本 `0%`。 +Your second `span` element should have the `class` attribute set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.innerText === '0%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); +``` + +Your second `span` element should wrap the text `0%`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === '0%'); ``` # --seed-- @@ -61,39 +66,44 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastEle ```html - - - Nutrition Label - - - - -
                                                                                                  -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  Amount per serving

                                                                                                  -

                                                                                                  Calories 230

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

                                                                                                  % Daily Value *

                                                                                                  -
                                                                                                  -

                                                                                                  Total Fat 8g10%

                                                                                                  -

                                                                                                  Saturated Fat 1g 5%

                                                                                                  -
                                                                                                  -

                                                                                                  Trans Fat 0g

                                                                                                  -
                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +

                                                                                                  Amount per serving

                                                                                                  +

                                                                                                  Calories

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

                                                                                                  % Daily Value *

                                                                                                  +
                                                                                                  +

                                                                                                  Total Fat 8g 10%

                                                                                                  +

                                                                                                  Saturated Fat 1g 5%

                                                                                                  +
                                                                                                  +

                                                                                                  Trans Fat 0g

                                                                                                  +
                                                                                                  +
                                                                                                  + --fcc-editable-region-- +
                                                                                                  + ``` @@ -125,47 +135,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7e7281626a92bbd62da8.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7e7281626a92bbd62da8.md index 20f8f1a18e5..631a8c9215c 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7e7281626a92bbd62da8.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7e7281626a92bbd62da8.md @@ -1,57 +1,62 @@ --- id: 615f7e7281626a92bbd62da8 -title: 步骤 53 +title: Step 54 challengeType: 0 -dashedName: step-53 +dashedName: step-54 --- # --description-- -在最后一个 `p` 元素下方,使用文本 `Sodium 160mg 7%` 创建另一个 `p` 元素。 将文本 `Sodium` 包裹在 `span` 元素中,并将 `class` 属性设置为 `bold`。 将 `7%` 文本包裹在另一个 `span` 元素中,其中 `class` 设置为 `bold right`。 +在最后一个 `p` 元素下方,使用文本 `Sodium 160mg 7%` 创建另一个 `p` 元素。 将文本 `Sodium` 包裹在 `span` 元素中,并将 `class` 属性设置为 `bold`。 Wrap the `7%` text in another `span` element with the `class` set to `bold`. Also add an additional `span` element around `Sodium 160mg` for aligning it correctly. # --hints-- -应该在 `.daily-value.sm-text` 元素的末尾创建一个新的 `p` 元素。 +You should create a new `p` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` 新的 `p` 元素应包含文本 `Sodium 160mg 7%`。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Sodium 160mg[\s|\n]+7%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Sodium[\s|\n]160mg[\s|\n]+7%/)); ``` -新的 `p` 元素应该有两个 `span` 元素。 +Your new `p` element should have three `span` elements. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 2); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 3); ``` -第一个 `span` 元素应该将 `class` 属性设置为 `bold`。 +A `span` element should wrap the text `Sodium 360mg`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.innerText?.match(/Sodium[\s|\n]160mg/)); ``` -第一个 `span` 元素应该包含文本 `Sodium`。 +A `span` element should wrap the text `Sodium`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.innerText === 'Sodium'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.innerText === "Sodium"); ``` -第二个 `span` 元素应该将 `class` 属性设置为 `bold right`。 +The `span` around `Sodium` should have the `class` attribute set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.classList?.contains('bold')); ``` -第二个 `span` 元素应该包含文本 `7%`。 +A `span` element should wrap the text `7%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.innerText === '7%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === '7%'); +``` + +The `span` element around `7%` should have the `class` attribute set to `bold`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); ``` # --seed-- @@ -61,40 +66,45 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastEle ```html - - - Nutrition Label - - - - -
                                                                                                  -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  Amount per serving

                                                                                                  -

                                                                                                  Calories 230

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

                                                                                                  % Daily Value *

                                                                                                  -
                                                                                                  -

                                                                                                  Total Fat 8g10%

                                                                                                  -

                                                                                                  Saturated Fat 1g 5%

                                                                                                  -
                                                                                                  -

                                                                                                  Trans Fat 0g

                                                                                                  -
                                                                                                  -

                                                                                                  Cholesterol 0mg 0%

                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +

                                                                                                  Amount per serving

                                                                                                  +

                                                                                                  Calories

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

                                                                                                  % Daily Value *

                                                                                                  +
                                                                                                  +

                                                                                                  Total Fat 8g 10%

                                                                                                  +

                                                                                                  Saturated Fat 1g 5%

                                                                                                  +
                                                                                                  +

                                                                                                  Trans Fat 0g

                                                                                                  +
                                                                                                  +

                                                                                                  Cholesterol 0mg 0%

                                                                                                  +
                                                                                                  + --fcc-editable-region-- +
                                                                                                  + ``` @@ -126,47 +136,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ecb09de9a938ef94756.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ecb09de9a938ef94756.md index eeb0c447eed..47489421b7a 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ecb09de9a938ef94756.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ecb09de9a938ef94756.md @@ -1,57 +1,68 @@ --- id: 615f7ecb09de9a938ef94756 -title: 步骤 54 +title: Step 55 challengeType: 0 -dashedName: step-54 +dashedName: step-55 --- # --description-- -添加另一个 `p` 元素,其文本为 `Total Carbohydrate 37g 13%`。 像以前一样,使用 `span` 元素使文本 `Total Carbohydrate` 加粗,文本 `13%` 加粗并右对齐。 +添加另一个 `p` 元素,其文本为 `Total Carbohydrate 37g 13%`。 Like before, use `span` elements to make the text `Total Carbohydrate` and `13%` bold. Also add an additional `span` element to wrap the `Total Carbohydrate 37g` text in a span element so to have it aligned to the left, and `13%` to the right. # --hints-- -应该在 `.daily-value.sm-text` 元素的末尾创建一个新的 `p` 元素。 +You should create a new `p` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` 新的 `p` 元素应包含文本 `Total Carbohydrate 37g 13%`。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Total Carbohydrate 37g[\s|\n]+13%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Total Carbohydrate[\s|\n]+37g[\s|\n]+13%/)); ``` -新的 `p` 元素应该有两个 `span` 元素。 +Your new `p` element should have three `span` elements. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 2); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 3); ``` -第一个 `span` 元素应该将 `class` 属性设置为 `bold`。 +One `span` element should wrap the text `Total Carbohydrate 37g`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.innerText?.match(/Total Carbohydrate[\s|\n]+37g/)); ``` -第一个 `span` 元素应该包含文本 `Total Carbohydrate`。 +One `span` element should wrap the text `Total Carbohydrate`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.innerText === 'Total Carbohydrate'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.innerText === 'Total Carbohydrate'); ``` -第二个 `span` 元素应该将 `class` 属性设置为 `bold right`。 +The `span` element around `Total Carbohydrate` should have the `class` attribute set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.classList?.contains('bold')); ``` -第二个 `span` 元素应该包含文本 `13%`。 +A `span` element should wrap the text `13%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.innerText === '13%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === '13%'); +``` + +The `span` element around `13%` should have the `class` attribute set to `bold`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); +``` + +Your second `span` element should wrap the text `13%`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === '13%'); ``` # --seed-- @@ -61,41 +72,46 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastEle ```html - - - Nutrition Label - - - - -
                                                                                                  -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  Amount per serving

                                                                                                  -

                                                                                                  Calories 230

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

                                                                                                  % Daily Value *

                                                                                                  -
                                                                                                  -

                                                                                                  Total Fat 8g10%

                                                                                                  -

                                                                                                  Saturated Fat 1g 5%

                                                                                                  -
                                                                                                  -

                                                                                                  Trans Fat 0g

                                                                                                  -
                                                                                                  -

                                                                                                  Cholesterol 0mg 0%

                                                                                                  -

                                                                                                  Sodium 160mg 7%

                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +

                                                                                                  Amount per serving

                                                                                                  +

                                                                                                  Calories

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

                                                                                                  % Daily Value *

                                                                                                  +
                                                                                                  +

                                                                                                  Total Fat 8g 10%

                                                                                                  +

                                                                                                  Saturated Fat 1g 5%

                                                                                                  +
                                                                                                  +

                                                                                                  Trans Fat 0g

                                                                                                  +
                                                                                                  +

                                                                                                  Cholesterol 0mg 0%

                                                                                                  +

                                                                                                  Sodium 160mg 7%

                                                                                                  +
                                                                                                  + --fcc-editable-region-- +
                                                                                                  + ``` @@ -127,47 +143,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7fa959ab75948f96a0d6.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7fa959ab75948f96a0d6.md index 65f83fffc28..61109ce2474 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7fa959ab75948f96a0d6.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7fa959ab75948f96a0d6.md @@ -1,8 +1,8 @@ --- id: 615f7fa959ab75948f96a0d6 -title: 步骤 55 +title: Step 56 challengeType: 0 -dashedName: step-55 +dashedName: step-56 --- # --description-- @@ -11,30 +11,30 @@ dashedName: step-55 # --hints-- -应该在 `.daily-value.sm-text` 元素的末尾创建一个新的 `p` 和 `div` 元素。 +You should create a new `p` and `div` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` 新的 `p` 元素应包含文本 `Dietary Fiber 4g`。 ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.innerText.match(/Dietary Fiber[\s|\n]+4g/)); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.innerText.match(/Dietary Fiber[\s|\n]+4g/)); ``` 新的 `p` 元素应该将 `class` 属性设置为 `indent no-divider`。 ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('indent')); -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('indent')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('no-divider')); ``` 新的 `div` 应该将 `class` 属性设置为 `divider`。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -44,42 +44,47 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                  -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  Amount per serving

                                                                                                  -

                                                                                                  Calories 230

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

                                                                                                  % Daily Value *

                                                                                                  -
                                                                                                  -

                                                                                                  Total Fat 8g10%

                                                                                                  -

                                                                                                  Saturated Fat 1g 5%

                                                                                                  -
                                                                                                  -

                                                                                                  Trans Fat 0g

                                                                                                  -
                                                                                                  -

                                                                                                  Cholesterol 0mg 0%

                                                                                                  -

                                                                                                  Sodium 160mg 7%

                                                                                                  -

                                                                                                  Total Carbohydrate 37g 13%

                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +

                                                                                                  Amount per serving

                                                                                                  +

                                                                                                  Calories

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

                                                                                                  % Daily Value *

                                                                                                  +
                                                                                                  +

                                                                                                  Total Fat 8g 10%

                                                                                                  +

                                                                                                  Saturated Fat 1g 5%

                                                                                                  +
                                                                                                  +

                                                                                                  Trans Fat 0g

                                                                                                  +
                                                                                                  +

                                                                                                  Cholesterol 0mg 0%

                                                                                                  +

                                                                                                  Sodium 160mg 7%

                                                                                                  +

                                                                                                  Total Carbohydrate 37g 13%

                                                                                                  +
                                                                                                  + --fcc-editable-region-- +
                                                                                                  + ``` @@ -111,47 +116,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f808d85793195b0f53be9.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f808d85793195b0f53be9.md index ba6d850d88b..bd4b3d82824 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f808d85793195b0f53be9.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f808d85793195b0f53be9.md @@ -1,8 +1,8 @@ --- id: 615f808d85793195b0f53be9 -title: 步骤 56 +title: Step 57 challengeType: 0 -dashedName: step-56 +dashedName: step-57 --- # --description-- @@ -11,30 +11,30 @@ dashedName: step-56 # --hints-- -应该在 `.daily-value.sm-text` 元素的末尾创建一个新的 `p` 和 `div` 元素。 +You should create a new `p` and `div` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` 新的 `p` 元素应包含文本 `Total Sugars 12g`。 ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.innerText.match(/Total Sugars[\s|\n]+12g/)); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.innerText.match(/Total Sugars[\s|\n]+12g/)); ``` 新的 `p` 元素应该将 `class` 属性设置为 `indent no-divider`。 ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('indent')); -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('indent')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('no-divider')); ``` 新的 `div` 应该将 `class` 属性设置为 `divider`。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -44,44 +44,49 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                  -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  Amount per serving

                                                                                                  -

                                                                                                  Calories 230

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

                                                                                                  % Daily Value *

                                                                                                  -
                                                                                                  -

                                                                                                  Total Fat 8g10%

                                                                                                  -

                                                                                                  Saturated Fat 1g 5%

                                                                                                  -
                                                                                                  -

                                                                                                  Trans Fat 0g

                                                                                                  -
                                                                                                  -

                                                                                                  Cholesterol 0mg 0%

                                                                                                  -

                                                                                                  Sodium 160mg 7%

                                                                                                  -

                                                                                                  Total Carbohydrate 37g 13%

                                                                                                  -

                                                                                                  Dietary Fiber 4g

                                                                                                  -
                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +

                                                                                                  Amount per serving

                                                                                                  +

                                                                                                  Calories

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

                                                                                                  % Daily Value *

                                                                                                  +
                                                                                                  +

                                                                                                  Total Fat 8g 10%

                                                                                                  +

                                                                                                  Saturated Fat 1g 5%

                                                                                                  +
                                                                                                  +

                                                                                                  Trans Fat 0g

                                                                                                  +
                                                                                                  +

                                                                                                  Cholesterol 0mg 0%

                                                                                                  +

                                                                                                  Sodium 160mg 7%

                                                                                                  +

                                                                                                  Total Carbohydrate 37g 13%

                                                                                                  +

                                                                                                  Dietary Fiber 4g

                                                                                                  +
                                                                                                  +
                                                                                                  + --fcc-editable-region-- +
                                                                                                  + ``` @@ -113,47 +118,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f829d07b18f96f6f6684b.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f829d07b18f96f6f6684b.md index 0dd9ac9947e..c9f95afa68f 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f829d07b18f96f6f6684b.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f829d07b18f96f6f6684b.md @@ -1,21 +1,21 @@ --- id: 615f829d07b18f96f6f6684b -title: 步骤 57 +title: Step 58 challengeType: 0 -dashedName: step-57 +dashedName: step-58 --- # --description-- -创建这些分隔线的好处是你可以应用特定的类来单独设置它们的样式。 将 `dbl-indent` 添加到最后一个 `.divider` 的 `class`。 +创建这些分隔线的好处是你可以应用特定的类来单独设置它们的样式。 Add `double-indent` to the `class` for your last `.divider`. # --hints-- -最后一个 `.divider` 元素应该将 `dbl-indent` 添加到 `class`。 不要删除现有值。 +Your last `.divider` element should have `double-indent` added to the `class`. 不要删除现有值。 ```js -const last = document.querySelector('.daily-value.sm-text')?.lastElementChild; -assert(last?.classList?.contains('dbl-indent')); +const last = document.querySelector('.daily-value.small-text')?.lastElementChild; +assert(last?.classList?.contains('double-indent')); assert(last?.classList?.contains('divider')); ``` @@ -26,46 +26,51 @@ assert(last?.classList?.contains('divider')); ```html - - - Nutrition Label - - - - -
                                                                                                  -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  Amount per serving

                                                                                                  -

                                                                                                  Calories 230

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

                                                                                                  % Daily Value *

                                                                                                  -
                                                                                                  -

                                                                                                  Total Fat 8g10%

                                                                                                  -

                                                                                                  Saturated Fat 1g 5%

                                                                                                  -
                                                                                                  -

                                                                                                  Trans Fat 0g

                                                                                                  -
                                                                                                  -

                                                                                                  Cholesterol 0mg 0%

                                                                                                  -

                                                                                                  Sodium 160mg 7%

                                                                                                  -

                                                                                                  Total Carbohydrate 37g 13%

                                                                                                  -

                                                                                                  Dietary Fiber 4g

                                                                                                  -
                                                                                                  -

                                                                                                  Total Sugars 12g

                                                                                                  -
                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +

                                                                                                  Amount per serving

                                                                                                  +

                                                                                                  Calories

                                                                                                  + 230
                                                                                                  - +
                                                                                                  +
                                                                                                  +

                                                                                                  % Daily Value *

                                                                                                  +
                                                                                                  +

                                                                                                  Total Fat 8g 10%

                                                                                                  +

                                                                                                  Saturated Fat 1g 5%

                                                                                                  +
                                                                                                  +

                                                                                                  Trans Fat 0g

                                                                                                  +
                                                                                                  +

                                                                                                  Cholesterol 0mg 0%

                                                                                                  +

                                                                                                  Sodium 160mg 7%

                                                                                                  +

                                                                                                  Total Carbohydrate 37g 13%

                                                                                                  +

                                                                                                  Dietary Fiber 4g

                                                                                                  +
                                                                                                  +

                                                                                                  Total Sugars 12g

                                                                                                  + --fcc-editable-region-- +
                                                                                                  + --fcc-editable-region-- +
                                                                                                  +
                                                                                                  + ``` @@ -97,47 +102,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f83ef928ec9982b785b6a.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f83ef928ec9982b785b6a.md index cbb8f87e9ad..370fd147adf 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f83ef928ec9982b785b6a.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f83ef928ec9982b785b6a.md @@ -1,26 +1,26 @@ --- id: 615f83ef928ec9982b785b6a -title: 步骤 58 +title: Step 59 challengeType: 0 -dashedName: step-58 +dashedName: step-59 --- # --description-- -创建一个 `.dbl-indent` 选择器并给它一个 `2em` 的左边距。 +Create a `.double-indent` selector and give it a left margin of `2em`. # --hints-- -应该有一个新的 `.dbl-indent` 选择器。 +You should have a new `.double-indent` selector. ```js -assert(new __helpers.CSSHelp(document).getStyle('.dbl-indent')); +assert(new __helpers.CSSHelp(document).getStyle('.double-indent')); ``` -`.dbl-indent` 选择器应该有一个 `margin-left` 属性设置为 `2em`。 +Your `.double-indent` selector should have a `margin-left` property set to `2em`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.dbl-indent')?.marginLeft === '2em'); +assert(new __helpers.CSSHelp(document).getStyle('.double-indent')?.marginLeft === '2em'); ``` # --seed-- @@ -30,44 +30,49 @@ assert(new __helpers.CSSHelp(document).getStyle('.dbl-indent')?.marginLeft === ' ```html - - - Nutrition Label - - - - -
                                                                                                  -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  Amount per serving

                                                                                                  -

                                                                                                  Calories 230

                                                                                                  -
                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  % Daily Value *

                                                                                                  -
                                                                                                  -

                                                                                                  Total Fat 8g10%

                                                                                                  -

                                                                                                  Saturated Fat 1g 5%

                                                                                                  -
                                                                                                  -

                                                                                                  Trans Fat 0g

                                                                                                  -
                                                                                                  -

                                                                                                  Cholesterol 0mg 0%

                                                                                                  -

                                                                                                  Sodium 160mg 7%

                                                                                                  -

                                                                                                  Total Carbohydrate 37g 13%

                                                                                                  -

                                                                                                  Dietary Fiber 4g

                                                                                                  -
                                                                                                  -

                                                                                                  Total Sugars 12g

                                                                                                  -
                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +

                                                                                                  Amount per serving

                                                                                                  +

                                                                                                  Calories

                                                                                                  + 230
                                                                                                  - +
                                                                                                  +
                                                                                                  +

                                                                                                  % Daily Value *

                                                                                                  +
                                                                                                  +

                                                                                                  Total Fat 8g 10%

                                                                                                  +

                                                                                                  Saturated Fat 1g 5%

                                                                                                  +
                                                                                                  +

                                                                                                  Trans Fat 0g

                                                                                                  +
                                                                                                  +

                                                                                                  Cholesterol 0mg 0%

                                                                                                  +

                                                                                                  Sodium 160mg 7%

                                                                                                  +

                                                                                                  Total Carbohydrate 37g 13%

                                                                                                  +

                                                                                                  Dietary Fiber 4g

                                                                                                  +
                                                                                                  +

                                                                                                  Total Sugars 12g

                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  + ``` @@ -99,56 +104,70 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } ---fcc-editable-region-- +--fcc-editable-region-- ---fcc-editable-region-- +--fcc-editable-region-- .daily-value p:not(.no-divider) { border-bottom: 1px solid #888989; diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f84f246e8ba98e3cd97be.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f84f246e8ba98e3cd97be.md index 84c98e811e0..a5e8f3d206d 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f84f246e8ba98e3cd97be.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f84f246e8ba98e3cd97be.md @@ -1,61 +1,60 @@ --- id: 615f84f246e8ba98e3cd97be -title: 步骤 59 +title: Step 60 challengeType: 0 -dashedName: step-59 +dashedName: step-60 --- # --description-- -在 `.dbl-indent` 元素的下方,添加一个新的 `p` 元素,其中包含文本 `Includes 10g Added Sugars 20%`。 新的 `p` 元素也应该是双缩进的,并且没有下边框。 使用 `span` 使 `20%` 加粗并右对齐。 +Below your `.double-indent` element, add a new `p` element with the text `Includes 10g Added Sugars 20%`. 新的 `p` 元素也应该是双缩进的,并且没有下边框。 使用 `span` 使 `20%` 加粗并右对齐。 然后在该 `p` 元素之后创建另一个分隔线。 # --hints-- -应该在 `.daily-value.sm-text` 元素的末尾创建一个新的 `p` 和 `div` 元素。 +You should create a new `p` and `div` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` 新的 `p` 元素应包含文本 `Includes 10g Added Sugars 20%`。 ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.innerText.match(/Includes 10g Added Sugars[\s|\n]+20%/)); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.innerText.match(/Includes 10g Added Sugars[\s|\n]+20%/)); ``` -新的 `p` 元素应该将 `class` 属性设置为 `dbl-indent no-divider`。 +Your new `p` element should have the `class` attribute set to `double-indent no-divider`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('dbl-indent')); -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('double-indent')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('no-divider')); ``` 新 `p` 元素应该有一个 `span` 元素。 ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.firstElementChild?.localName === 'span'); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.firstElementChild?.localName === 'span'); ``` -`span` 元素应该将 `class` 属性设置为 `bold right`。 +Your `span` element should have the `class` attribute set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.firstElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.firstElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.firstElementChild?.classList?.contains('bold')); ``` `span` 元素应该包含文本 `20%`。 ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type span')?.innerText === '20%'); +assert(document.querySelector('.daily-value.small-text p:last-of-type span')?.innerText === '20%'); ``` 新的 `div` 应该将 `class` 属性设置为 `divider`。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -65,46 +64,51 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                  -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  Amount per serving

                                                                                                  -

                                                                                                  Calories 230

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

                                                                                                  % Daily Value *

                                                                                                  -
                                                                                                  -

                                                                                                  Total Fat 8g10%

                                                                                                  -

                                                                                                  Saturated Fat 1g 5%

                                                                                                  -
                                                                                                  -

                                                                                                  Trans Fat 0g

                                                                                                  -
                                                                                                  -

                                                                                                  Cholesterol 0mg 0%

                                                                                                  -

                                                                                                  Sodium 160mg 7%

                                                                                                  -

                                                                                                  Total Carbohydrate 37g 13%

                                                                                                  -

                                                                                                  Dietary Fiber 4g

                                                                                                  -
                                                                                                  -

                                                                                                  Total Sugars 12g

                                                                                                  -
                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +

                                                                                                  Amount per serving

                                                                                                  +

                                                                                                  Calories

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

                                                                                                  % Daily Value *

                                                                                                  +
                                                                                                  +

                                                                                                  Total Fat 8g 10%

                                                                                                  +

                                                                                                  Saturated Fat 1g 5%

                                                                                                  +
                                                                                                  +

                                                                                                  Trans Fat 0g

                                                                                                  +
                                                                                                  +

                                                                                                  Cholesterol 0mg 0%

                                                                                                  +

                                                                                                  Sodium 160mg 7%

                                                                                                  +

                                                                                                  Total Carbohydrate 37g 13%

                                                                                                  +

                                                                                                  Dietary Fiber 4g

                                                                                                  +
                                                                                                  +

                                                                                                  Total Sugars 12g

                                                                                                  +
                                                                                                  +
                                                                                                  + --fcc-editable-region-- +
                                                                                                  + ``` @@ -136,54 +140,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f887466db4ba14b5342cc.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f887466db4ba14b5342cc.md index 84e81ca4103..f5e76e6994e 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f887466db4ba14b5342cc.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f887466db4ba14b5342cc.md @@ -1,8 +1,8 @@ --- id: 615f887466db4ba14b5342cc -title: 步骤 60 +title: Step 61 challengeType: 0 -dashedName: step-60 +dashedName: step-61 --- # --description-- @@ -13,30 +13,30 @@ dashedName: step-60 # --hints-- -应该在 `.daily-value.sm-text` 元素的末尾创建一个新的 `p` 和 `div` 元素。 +You should create a new `p` and `div` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` 新的 `p` 元素应包含文本 `Protein 3g`。 ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.innerText.match(/Protein[\s|\n]+3g/)); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.innerText.match(/Protein[\s|\n]+3g/)); ``` 新的 `p` 元素应该将 `class` 属性设置为 `no-divider`。 ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('no-divider')); ``` -新的 `div` 应该将 `class` 属性设置为 `divider lg`。 +Your new `div` should have the `class` attribute set to `divider large`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('lg')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('large')); ``` # --seed-- @@ -46,48 +46,53 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                  -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  Amount per serving

                                                                                                  -

                                                                                                  Calories 230

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

                                                                                                  % Daily Value *

                                                                                                  -
                                                                                                  -

                                                                                                  Total Fat 8g10%

                                                                                                  -

                                                                                                  Saturated Fat 1g 5%

                                                                                                  -
                                                                                                  -

                                                                                                  Trans Fat 0g

                                                                                                  -
                                                                                                  -

                                                                                                  Cholesterol 0mg 0%

                                                                                                  -

                                                                                                  Sodium 160mg 7%

                                                                                                  -

                                                                                                  Total Carbohydrate 37g 13%

                                                                                                  -

                                                                                                  Dietary Fiber 4g

                                                                                                  -
                                                                                                  -

                                                                                                  Total Sugars 12g

                                                                                                  -
                                                                                                  -

                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +

                                                                                                  Amount per serving

                                                                                                  +

                                                                                                  Calories

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

                                                                                                  % Daily Value *

                                                                                                  +
                                                                                                  +

                                                                                                  Total Fat 8g 10%

                                                                                                  +

                                                                                                  Saturated Fat 1g 5%

                                                                                                  +
                                                                                                  +

                                                                                                  Trans Fat 0g

                                                                                                  +
                                                                                                  +

                                                                                                  Cholesterol 0mg 0%

                                                                                                  +

                                                                                                  Sodium 160mg 7%

                                                                                                  +

                                                                                                  Total Carbohydrate 37g 13%

                                                                                                  +

                                                                                                  Dietary Fiber 4g

                                                                                                  +
                                                                                                  +

                                                                                                  Total Sugars 12g

                                                                                                  +
                                                                                                  +

                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                  +
                                                                                                  + --fcc-editable-region-- +
                                                                                                  + ``` @@ -119,54 +124,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f89e055040ba294719d2f.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f89e055040ba294719d2f.md index c7905496766..009cfbe5a99 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f89e055040ba294719d2f.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f89e055040ba294719d2f.md @@ -1,39 +1,40 @@ --- id: 615f89e055040ba294719d2f -title: 步骤 61 +title: Step 62 challengeType: 0 -dashedName: step-61 +dashedName: step-62 --- # --description-- -在大分隔线下方创建另一个 `p` 元素。 为 `p` 元素提供文本 `Vitamin D 2mcg 10%`。 使用 `span` 使 `10%` 向右对齐,但不要使其变为粗体。 +在大分隔线下方创建另一个 `p` 元素。 为 `p` 元素提供文本 `Vitamin D 2mcg 10%`。 + +The `p` element contains only text, you can wrap the percentage in a `span` element so that it is considered a separate entity from the rest of the text, and it's moved to the right. # --hints-- -应该在 `.daily-value.sm-text` 元素的末尾创建一个新的 `p` 元素。 +You should create a new `p` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` -新的 `p` 元素应包含文本 `Vitamin D 2mcg 10%`。 +Your new `p` element should have the text `Vitamin D 2mcg 10%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Vitamin D 2mcg[\s|\n]+10%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Vitamin D 2mcg[\s|\n]+10%/)); ``` -新 `p` 元素应该有一个 `span` 元素。 +Your new `p` element should have a `span` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 1); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 1); ``` -`span` 元素应该将 `class` 设置为 `right`。 记住,不要让它变得粗体。 +Your `span` element should not be bold. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.classList?.contains('right')); -assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.classList?.contains('bold')); +assert(!document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span')?.classList?.contains('bold')); ``` # --seed-- @@ -43,50 +44,55 @@ assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.queryS ```html - - - Nutrition Label - - - - -
                                                                                                  -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  Amount per serving

                                                                                                  -

                                                                                                  Calories 230

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

                                                                                                  % Daily Value *

                                                                                                  -
                                                                                                  -

                                                                                                  Total Fat 8g10%

                                                                                                  -

                                                                                                  Saturated Fat 1g 5%

                                                                                                  -
                                                                                                  -

                                                                                                  Trans Fat 0g

                                                                                                  -
                                                                                                  -

                                                                                                  Cholesterol 0mg 0%

                                                                                                  -

                                                                                                  Sodium 160mg 7%

                                                                                                  -

                                                                                                  Total Carbohydrate 37g 13%

                                                                                                  -

                                                                                                  Dietary Fiber 4g

                                                                                                  -
                                                                                                  -

                                                                                                  Total Sugars 12g

                                                                                                  -
                                                                                                  -

                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                  -

                                                                                                  Protein 3g

                                                                                                  -
                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +

                                                                                                  Amount per serving

                                                                                                  +

                                                                                                  Calories

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

                                                                                                  % Daily Value *

                                                                                                  +
                                                                                                  +

                                                                                                  Total Fat 8g 10%

                                                                                                  +

                                                                                                  Saturated Fat 1g 5%

                                                                                                  +
                                                                                                  +

                                                                                                  Trans Fat 0g

                                                                                                  +
                                                                                                  +

                                                                                                  Cholesterol 0mg 0%

                                                                                                  +

                                                                                                  Sodium 160mg 7%

                                                                                                  +

                                                                                                  Total Carbohydrate 37g 13%

                                                                                                  +

                                                                                                  Dietary Fiber 4g

                                                                                                  +
                                                                                                  +

                                                                                                  Total Sugars 12g

                                                                                                  +
                                                                                                  +

                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                  +

                                                                                                  Protein 3g

                                                                                                  +
                                                                                                  +
                                                                                                  + --fcc-editable-region-- +
                                                                                                  + ``` @@ -118,54 +124,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8bfe0f30a1a3c340356b.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8bfe0f30a1a3c340356b.md index 597ea9b9f99..f898a1da1a7 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8bfe0f30a1a3c340356b.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8bfe0f30a1a3c340356b.md @@ -1,8 +1,8 @@ --- id: 615f8bfe0f30a1a3c340356b -title: 步骤 62 +title: Step 63 challengeType: 0 -dashedName: step-62 +dashedName: step-63 --- # --description-- @@ -11,55 +11,53 @@ dashedName: step-62 # --hints-- -应该在 `.daily-value.sm-text` 元素的末尾创建两个新的 `p` 元素。 +You should create two new `p` elements at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); ``` 第一个新的 `p` 元素应包含文本 `Calcium 260mg 20%`。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.innerText?.match(/Calcium 260mg[\s|\n]+20%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.innerText?.match(/Calcium 260mg[\s|\n]+20%/)); ``` 第一个新 `p` 元素应该有一个 `span` 元素。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.localName === 'span'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.localName === 'span'); ``` -第一个 `span` 元素应该将 `class` 属性设置为 `right`。 记住,不要让它变得粗体。 +Your first `span` element should not be bold. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.classList?.contains('right')); -assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.classList?.contains('bold')); +assert(!document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.classList?.contains('bold')); ``` 第一个 `span` 元素应该包含文本 `20%`。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.innerText === '20%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.innerText === '20%'); ``` 第二个新的 `p` 元素应包含文本 `Iron 8mg 45%`。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Iron 8mg[\s|\n]+45%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Iron 8mg[\s|\n]+45%/)); ``` 第二个新 `p` 元素应该有一个 `span` 元素。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.localName === 'span'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.localName === 'span'); ``` -第二个 `span` 元素应该将 `class` 属性设置为 `right`。 记住,不要让它变得粗体。 +Your second `span` element should not be bold. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('right')); -assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(!document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); ``` # --seed-- @@ -69,51 +67,56 @@ assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstE ```html - - - Nutrition Label - - - - -
                                                                                                  -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  Amount per serving

                                                                                                  -

                                                                                                  Calories 230

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

                                                                                                  % Daily Value *

                                                                                                  -
                                                                                                  -

                                                                                                  Total Fat 8g10%

                                                                                                  -

                                                                                                  Saturated Fat 1g 5%

                                                                                                  -
                                                                                                  -

                                                                                                  Trans Fat 0g

                                                                                                  -
                                                                                                  -

                                                                                                  Cholesterol 0mg 0%

                                                                                                  -

                                                                                                  Sodium 160mg 7%

                                                                                                  -

                                                                                                  Total Carbohydrate 37g 13%

                                                                                                  -

                                                                                                  Dietary Fiber 4g

                                                                                                  -
                                                                                                  -

                                                                                                  Total Sugars 12g

                                                                                                  -
                                                                                                  -

                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                  -

                                                                                                  Protein 3g

                                                                                                  -
                                                                                                  -

                                                                                                  Vitamin D 2mcg 10%

                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +

                                                                                                  Amount per serving

                                                                                                  +

                                                                                                  Calories

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

                                                                                                  % Daily Value *

                                                                                                  +
                                                                                                  +

                                                                                                  Total Fat 8g 10%

                                                                                                  +

                                                                                                  Saturated Fat 1g 5%

                                                                                                  +
                                                                                                  +

                                                                                                  Trans Fat 0g

                                                                                                  +
                                                                                                  +

                                                                                                  Cholesterol 0mg 0%

                                                                                                  +

                                                                                                  Sodium 160mg 7%

                                                                                                  +

                                                                                                  Total Carbohydrate 37g 13%

                                                                                                  +

                                                                                                  Dietary Fiber 4g

                                                                                                  +
                                                                                                  +

                                                                                                  Total Sugars 12g

                                                                                                  +
                                                                                                  +

                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                  +

                                                                                                  Protein 3g

                                                                                                  +
                                                                                                  +

                                                                                                  Vitamin D 2mcg 10%

                                                                                                  +
                                                                                                  + --fcc-editable-region-- +
                                                                                                  + ``` @@ -145,54 +148,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8f1223601fa546e93f31.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8f1223601fa546e93f31.md index 9b013da4750..942a0149a1a 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8f1223601fa546e93f31.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8f1223601fa546e93f31.md @@ -1,8 +1,8 @@ --- id: 615f8f1223601fa546e93f31 -title: 步骤 63 +title: Step 64 challengeType: 0 -dashedName: step-63 +dashedName: step-64 --- # --description-- @@ -11,35 +11,34 @@ dashedName: step-63 # --hints-- -应该在 `.daily-value.sm-text` 元素的末尾创建一个新的 `p` 元素。 +You should create a new `p` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` 新的 `p` 元素应该将 `class` 属性设置为 `no-divider`。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('no-divider')); ``` 新的 `p` 元素应包含文本 `Potassium 235mg 6%`。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Potassium 235mg[\s|\n]+6%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Potassium 235mg[\s|\n]+6%/)); ``` 新 `p` 元素应该有一个 `span` 元素。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 1); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 1); ``` -`span` 元素应该将 `class` 设置为 `right`。 记住,不要让它变得粗体。 +Your `span` element should not be bold. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.classList?.contains('right')); -assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.classList?.contains('bold')); +assert(!document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span')?.classList?.contains('bold')); ``` # --seed-- @@ -49,53 +48,58 @@ assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.queryS ```html - - - Nutrition Label - - - - -
                                                                                                  -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  Amount per serving

                                                                                                  -

                                                                                                  Calories 230

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

                                                                                                  % Daily Value *

                                                                                                  -
                                                                                                  -

                                                                                                  Total Fat 8g10%

                                                                                                  -

                                                                                                  Saturated Fat 1g 5%

                                                                                                  -
                                                                                                  -

                                                                                                  Trans Fat 0g

                                                                                                  -
                                                                                                  -

                                                                                                  Cholesterol 0mg 0%

                                                                                                  -

                                                                                                  Sodium 160mg 7%

                                                                                                  -

                                                                                                  Total Carbohydrate 37g 13%

                                                                                                  -

                                                                                                  Dietary Fiber 4g

                                                                                                  -
                                                                                                  -

                                                                                                  Total Sugars 12g

                                                                                                  -
                                                                                                  -

                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                  -

                                                                                                  Protein 3g

                                                                                                  -
                                                                                                  -

                                                                                                  Vitamin D 2mcg 10%

                                                                                                  -

                                                                                                  Calcium 260mg 20%

                                                                                                  -

                                                                                                  Iron 8mg 45%

                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +

                                                                                                  Amount per serving

                                                                                                  +

                                                                                                  Calories

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

                                                                                                  % Daily Value *

                                                                                                  +
                                                                                                  +

                                                                                                  Total Fat 8g 10%

                                                                                                  +

                                                                                                  Saturated Fat 1g 5%

                                                                                                  +
                                                                                                  +

                                                                                                  Trans Fat 0g

                                                                                                  +
                                                                                                  +

                                                                                                  Cholesterol 0mg 0%

                                                                                                  +

                                                                                                  Sodium 160mg 7%

                                                                                                  +

                                                                                                  Total Carbohydrate 37g 13%

                                                                                                  +

                                                                                                  Dietary Fiber 4g

                                                                                                  +
                                                                                                  +

                                                                                                  Total Sugars 12g

                                                                                                  +
                                                                                                  +

                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                  +

                                                                                                  Protein 3g

                                                                                                  +
                                                                                                  +

                                                                                                  Vitamin D 2mcg 10%

                                                                                                  +

                                                                                                  Calcium 260mg 20%

                                                                                                  +

                                                                                                  Iron 8mg 45%

                                                                                                  +
                                                                                                  + --fcc-editable-region-- +
                                                                                                  + ``` @@ -127,54 +131,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f905fbd1017a65ca224eb.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f905fbd1017a65ca224eb.md index b2aa5bef729..4faead51906 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f905fbd1017a65ca224eb.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f905fbd1017a65ca224eb.md @@ -1,8 +1,8 @@ --- id: 615f905fbd1017a65ca224eb -title: 步骤 64 +title: Step 65 challengeType: 0 -dashedName: step-64 +dashedName: step-65 --- # --description-- @@ -23,11 +23,11 @@ dashedName: step-64 assert(document.querySelector('.daily-value').nextElementSibling?.localName === 'div'); ``` -新的 `div` 应该将 `class` 设置为 `divider md`。 +Your new `div` should have the `class` set to `divider medium`. ```js assert(document.querySelector('.daily-value')?.nextElementSibling?.classList?.contains('divider')); -assert(document.querySelector('.daily-value')?.nextElementSibling?.classList?.contains('md')); +assert(document.querySelector('.daily-value')?.nextElementSibling?.classList?.contains('medium')); ``` 应该在新的 `div` 元素之后创建一个 `p` 元素。 @@ -55,55 +55,60 @@ assert.equal(document.querySelector('.label')?.lastElementChild?.innerText, '* T ```html - - - Nutrition Label - - - - -
                                                                                                  -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  Amount per serving

                                                                                                  -

                                                                                                  Calories 230

                                                                                                  -
                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  % Daily Value *

                                                                                                  -
                                                                                                  -

                                                                                                  Total Fat 8g10%

                                                                                                  -

                                                                                                  Saturated Fat 1g 5%

                                                                                                  -
                                                                                                  -

                                                                                                  Trans Fat 0g

                                                                                                  -
                                                                                                  -

                                                                                                  Cholesterol 0mg 0%

                                                                                                  -

                                                                                                  Sodium 160mg 7%

                                                                                                  -

                                                                                                  Total Carbohydrate 37g 13%

                                                                                                  -

                                                                                                  Dietary Fiber 4g

                                                                                                  -
                                                                                                  -

                                                                                                  Total Sugars 12g

                                                                                                  -
                                                                                                  -

                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                  -

                                                                                                  Protein 3g

                                                                                                  -
                                                                                                  -

                                                                                                  Vitamin D 2mcg 10%

                                                                                                  -

                                                                                                  Calcium 260mg 20%

                                                                                                  -

                                                                                                  Iron 8mg 45%

                                                                                                  -

                                                                                                  Potassium 235mg 6%

                                                                                                  -
                                                                                                  ---fcc-editable-region-- ---fcc-editable-region-- + + + Nutrition Label + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +

                                                                                                  Amount per serving

                                                                                                  +

                                                                                                  Calories

                                                                                                  +
                                                                                                  + 230
                                                                                                  - +
                                                                                                  +
                                                                                                  +

                                                                                                  % Daily Value *

                                                                                                  +
                                                                                                  +

                                                                                                  Total Fat 8g 10%

                                                                                                  +

                                                                                                  Saturated Fat 1g 5%

                                                                                                  +
                                                                                                  +

                                                                                                  Trans Fat 0g

                                                                                                  +
                                                                                                  +

                                                                                                  Cholesterol 0mg 0%

                                                                                                  +

                                                                                                  Sodium 160mg 7%

                                                                                                  +

                                                                                                  Total Carbohydrate 37g 13%

                                                                                                  +

                                                                                                  Dietary Fiber 4g

                                                                                                  +
                                                                                                  +

                                                                                                  Total Sugars 12g

                                                                                                  +
                                                                                                  +

                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                  +

                                                                                                  Protein 3g

                                                                                                  +
                                                                                                  +

                                                                                                  Vitamin D 2mcg 10%

                                                                                                  +

                                                                                                  Calcium 260mg 20%

                                                                                                  +

                                                                                                  Iron 8mg 45%

                                                                                                  +

                                                                                                  Potassium 235mg 6%

                                                                                                  +
                                                                                                  + --fcc-editable-region-- + + --fcc-editable-region-- +
                                                                                                  + ``` @@ -135,54 +140,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f94786869e1a7fec54375.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f94786869e1a7fec54375.md index 310f91e4160..5ea3c6b6b03 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f94786869e1a7fec54375.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f94786869e1a7fec54375.md @@ -1,8 +1,8 @@ --- id: 615f94786869e1a7fec54375 -title: 步骤 65 +title: Step 66 challengeType: 0 -dashedName: step-65 +dashedName: step-66 --- # --description-- @@ -36,54 +36,60 @@ assert(new __helpers.CSSHelp(document).getStyle('.note')?.margin === '5px 0px'); ```html - - - Nutrition Label - - - - -
                                                                                                  -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  Amount per serving

                                                                                                  -

                                                                                                  Calories 230

                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +

                                                                                                  Amount per serving

                                                                                                  +

                                                                                                  Calories

                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  % Daily Value *

                                                                                                  -
                                                                                                  -

                                                                                                  Total Fat 8g 10%

                                                                                                  -

                                                                                                  Saturated Fat 1g 5%

                                                                                                  -
                                                                                                  -

                                                                                                  Trans Fat 0g

                                                                                                  -
                                                                                                  -

                                                                                                  Cholesterol 0mg 0%

                                                                                                  -

                                                                                                  Sodium 160mg 7%

                                                                                                  -

                                                                                                  Total Carbohydrate 37g 13%

                                                                                                  -

                                                                                                  Dietary Fiber 4g

                                                                                                  -
                                                                                                  -

                                                                                                  Total Sugars 12g

                                                                                                  -
                                                                                                  -

                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                  -

                                                                                                  Protein 3g

                                                                                                  -
                                                                                                  -

                                                                                                  Vitamin D 2mcg 10%

                                                                                                  -

                                                                                                  Calcium 260mg 20%

                                                                                                  -

                                                                                                  Iron 8mg 45%

                                                                                                  -

                                                                                                  Potassium 235mg 6%

                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                  + 230
                                                                                                  - +
                                                                                                  +
                                                                                                  +

                                                                                                  % Daily Value *

                                                                                                  +
                                                                                                  +

                                                                                                  Total Fat 8g 10%

                                                                                                  +

                                                                                                  Saturated Fat 1g 5%

                                                                                                  +
                                                                                                  +

                                                                                                  Trans Fat 0g

                                                                                                  +
                                                                                                  +

                                                                                                  Cholesterol 0mg 0%

                                                                                                  +

                                                                                                  Sodium 160mg 7%

                                                                                                  +

                                                                                                  Total Carbohydrate 37g 13%

                                                                                                  +

                                                                                                  Dietary Fiber 4g

                                                                                                  +
                                                                                                  +

                                                                                                  Total Sugars 12g

                                                                                                  +
                                                                                                  +

                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                  +

                                                                                                  Protein 3g

                                                                                                  +
                                                                                                  +

                                                                                                  Vitamin D 2mcg 10%

                                                                                                  +

                                                                                                  Calcium 260mg 20%

                                                                                                  +

                                                                                                  Iron 8mg 45%

                                                                                                  +

                                                                                                  Potassium 235mg 6%

                                                                                                  +
                                                                                                  +
                                                                                                  +

                                                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily + diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                  +
                                                                                                  + ``` @@ -115,54 +121,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f951dff9317a900ef683f.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f951dff9317a900ef683f.md index 0b845c5a991..b20b3f495a9 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f951dff9317a900ef683f.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f951dff9317a900ef683f.md @@ -1,8 +1,8 @@ --- id: 615f951dff9317a900ef683f -title: 步骤 66 +title: Step 67 challengeType: 0 -dashedName: step-66 +dashedName: step-67 --- # --description-- @@ -35,54 +35,60 @@ assert(new __helpers.CSSHelp(document).getStyle('.note')?.textIndent === '-8px') ```html - - - Nutrition Label - - - - -
                                                                                                  -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  Amount per serving

                                                                                                  -

                                                                                                  Calories 230

                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +

                                                                                                  Amount per serving

                                                                                                  +

                                                                                                  Calories

                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  % Daily Value *

                                                                                                  -
                                                                                                  -

                                                                                                  Total Fat 8g 10%

                                                                                                  -

                                                                                                  Saturated Fat 1g 5%

                                                                                                  -
                                                                                                  -

                                                                                                  Trans Fat 0g

                                                                                                  -
                                                                                                  -

                                                                                                  Cholesterol 0mg 0%

                                                                                                  -

                                                                                                  Sodium 160mg 7%

                                                                                                  -

                                                                                                  Total Carbohydrate 37g 13%

                                                                                                  -

                                                                                                  Dietary Fiber 4g

                                                                                                  -
                                                                                                  -

                                                                                                  Total Sugars 12g

                                                                                                  -
                                                                                                  -

                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                  -

                                                                                                  Protein 3g

                                                                                                  -
                                                                                                  -

                                                                                                  Vitamin D 2mcg 10%

                                                                                                  -

                                                                                                  Calcium 260mg 20%

                                                                                                  -

                                                                                                  Iron 8mg 45%

                                                                                                  -

                                                                                                  Potassium 235mg 6%

                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                  + 230
                                                                                                  - +
                                                                                                  +
                                                                                                  +

                                                                                                  % Daily Value *

                                                                                                  +
                                                                                                  +

                                                                                                  Total Fat 8g 10%

                                                                                                  +

                                                                                                  Saturated Fat 1g 5%

                                                                                                  +
                                                                                                  +

                                                                                                  Trans Fat 0g

                                                                                                  +
                                                                                                  +

                                                                                                  Cholesterol 0mg 0%

                                                                                                  +

                                                                                                  Sodium 160mg 7%

                                                                                                  +

                                                                                                  Total Carbohydrate 37g 13%

                                                                                                  +

                                                                                                  Dietary Fiber 4g

                                                                                                  +
                                                                                                  +

                                                                                                  Total Sugars 12g

                                                                                                  +
                                                                                                  +

                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                  +

                                                                                                  Protein 3g

                                                                                                  +
                                                                                                  +

                                                                                                  Vitamin D 2mcg 10%

                                                                                                  +

                                                                                                  Calcium 260mg 20%

                                                                                                  +

                                                                                                  Iron 8mg 45%

                                                                                                  +

                                                                                                  Potassium 235mg 6%

                                                                                                  +
                                                                                                  +
                                                                                                  +

                                                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily + diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                  +
                                                                                                  + ``` @@ -114,54 +120,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } @@ -182,54 +202,60 @@ p { ```html - - - Nutrition Label - - - - -
                                                                                                  -
                                                                                                  -

                                                                                                  Nutrition Facts

                                                                                                  -
                                                                                                  -

                                                                                                  8 servings per container

                                                                                                  -

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  -
                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  Amount per serving

                                                                                                  -

                                                                                                  Calories 230

                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +

                                                                                                  Amount per serving

                                                                                                  +

                                                                                                  Calories

                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  % Daily Value *

                                                                                                  -
                                                                                                  -

                                                                                                  Total Fat 8g 10%

                                                                                                  -

                                                                                                  Saturated Fat 1g 5%

                                                                                                  -
                                                                                                  -

                                                                                                  Trans Fat 0g

                                                                                                  -
                                                                                                  -

                                                                                                  Cholesterol 0mg 0%

                                                                                                  -

                                                                                                  Sodium 160mg 7%

                                                                                                  -

                                                                                                  Total Carbohydrate 37g 13%

                                                                                                  -

                                                                                                  Dietary Fiber 4g

                                                                                                  -
                                                                                                  -

                                                                                                  Total Sugars 12g

                                                                                                  -
                                                                                                  -

                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                  -

                                                                                                  Protein 3g

                                                                                                  -
                                                                                                  -

                                                                                                  Vitamin D 2mcg 10%

                                                                                                  -

                                                                                                  Calcium 260mg 20%

                                                                                                  -

                                                                                                  Iron 8mg 45%

                                                                                                  -

                                                                                                  Potassium 235mg 6%

                                                                                                  -
                                                                                                  -
                                                                                                  -

                                                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                  + 230
                                                                                                  - +
                                                                                                  +
                                                                                                  +

                                                                                                  % Daily Value *

                                                                                                  +
                                                                                                  +

                                                                                                  Total Fat 8g 10%

                                                                                                  +

                                                                                                  Saturated Fat 1g 5%

                                                                                                  +
                                                                                                  +

                                                                                                  Trans Fat 0g

                                                                                                  +
                                                                                                  +

                                                                                                  Cholesterol 0mg 0%

                                                                                                  +

                                                                                                  Sodium 160mg 7%

                                                                                                  +

                                                                                                  Total Carbohydrate 37g 13%

                                                                                                  +

                                                                                                  Dietary Fiber 4g

                                                                                                  +
                                                                                                  +

                                                                                                  Total Sugars 12g

                                                                                                  +
                                                                                                  +

                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                  +

                                                                                                  Protein 3g

                                                                                                  +
                                                                                                  +

                                                                                                  Vitamin D 2mcg 10%

                                                                                                  +

                                                                                                  Calcium 260mg 20%

                                                                                                  +

                                                                                                  Iron 8mg 45%

                                                                                                  +

                                                                                                  Potassium 235mg 6%

                                                                                                  +
                                                                                                  +
                                                                                                  +

                                                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily + diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                  +
                                                                                                  + ``` @@ -261,54 +287,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/635bde33c91c80540eae239b.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/635bde33c91c80540eae239b.md new file mode 100644 index 00000000000..d9073bf18ba --- /dev/null +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/635bde33c91c80540eae239b.md @@ -0,0 +1,153 @@ +--- +id: 635bde33c91c80540eae239b +title: Step 41 +challengeType: 0 +dashedName: step-41 +--- + +# --description-- + +The text `* Daily Value %` should be aligned to the right. Create a `.right` selector and use the `justify-content` property to do it. + +# --hints-- + +You should have a `.right` selector. + +```js +const hasRight = new __helpers.CSSHelp(document).getStyle('.right'); +assert(hasRight); + +``` + +The `.right` selector should have the `justify-content` property set to `flex-end`. + +```js +const rightJustifyContent = new __helpers.CSSHelp(document).getStyle('.right')?.getPropertyValue('justify-content'); +assert(rightJustifyContent === 'flex-end'); + +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Nutrition Label + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +

                                                                                                  Amount per serving

                                                                                                  +

                                                                                                  Calories

                                                                                                  +
                                                                                                  + 230 +
                                                                                                  +
                                                                                                  +
                                                                                                  +

                                                                                                  % Daily Value *

                                                                                                  +
                                                                                                  +
                                                                                                  + + +``` + +```css +* { + box-sizing: border-box; +} + +html { + font-size: 16px; +} + +body { + font-family: 'Open Sans', sans-serif; +} + +.label { + border: 2px solid black; + width: 270px; + margin: 20px auto; + padding: 0 7px; +} + +header h1 { + text-align: center; + margin: -4px 0; + letter-spacing: 0.15px +} + +p { + margin: 0; + display: flex; + justify-content: space-between; +} + +.divider { + border-bottom: 1px solid #888989; + margin: 2px 0; +} + +.bold { + font-weight: 800; +} + +.large { + height: 10px; +} + +.large, .medium { + background-color: black; + border: 0; +} + +.medium { + height: 5px; +} + +.small-text { + font-size: 0.85rem; +} + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { + margin: -5px -2px; + font-size: 2em; + font-weight: 700; +} + +.calories-info span { + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +--fcc-editable-region-- + +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6395d33ab5d91bf317107c48.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6395d33ab5d91bf317107c48.md new file mode 100644 index 00000000000..e6f009b7e04 --- /dev/null +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6395d33ab5d91bf317107c48.md @@ -0,0 +1,117 @@ +--- +id: 6395d33ab5d91bf317107c48 +title: Step 32 +challengeType: 0 +dashedName: step-32 +--- + +# --description-- + +Create a `.calories-info h2` selector and remove all margins. + +# --hints-- + +Create a `.calories-info h2` selector. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info h2')); +``` + +Your `.calories-info h2` selector should have a `margin` set to `0`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info h2')?.margin === '0px'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Nutrition Label + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +

                                                                                                  Amount per serving

                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  + + +``` + +```css +* { + box-sizing: border-box; +} + +html { + font-size: 16px; +} + +body { + font-family: 'Open Sans', sans-serif; +} + +.label { + border: 2px solid black; + width: 270px; + margin: 20px auto; + padding: 0 7px; +} + +header h1 { + text-align: center; + margin: -4px 0; + letter-spacing: 0.15px +} + +p { + margin: 0; + display: flex; + justify-content: space-between; +} + +.divider { + border-bottom: 1px solid #888989; + margin: 2px 0; +} + +.bold { + font-weight: 800; +} + +.large { + height: 10px; +} + +.large, .medium { + background-color: black; + border: 0; +} + +.small-text { + font-size: 0.85rem; +} + +--fcc-editable-region-- + +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6396e33fe478dd264ebbf278.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6396e33fe478dd264ebbf278.md new file mode 100644 index 00000000000..6a2dbb37aa9 --- /dev/null +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6396e33fe478dd264ebbf278.md @@ -0,0 +1,135 @@ +--- +id: 6396e33fe478dd264ebbf278 +title: Step 34 +challengeType: 0 +dashedName: step-34 +--- + +# --description-- + +Create a new `.calories-info` selector and give it a `display` property set to `flex`. Also give it a `justify-content` property set to `space-between` and `align-items` property set to `flex-end`. + +# --hints-- + +You should create a `.calories-info` selector. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info')); +``` + +Your `.calories-info` selector should have a `display` property set to `flex`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info')?.display === 'flex'); +``` + +Your `.calories-info` selector should have a `justify-content` property set to `space-between`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info')?.justifyContent === 'space-between'); +``` + +Your `.calories-info` selector should have a `align-items` property set to `flex-end`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info')?.alignItems === 'flex-end'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Nutrition Label + + + + + +
                                                                                                  +
                                                                                                  +

                                                                                                  Nutrition Facts

                                                                                                  +
                                                                                                  +

                                                                                                  8 servings per container

                                                                                                  +

                                                                                                  Serving size 2/3 cup (55g)

                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +
                                                                                                  +

                                                                                                  Amount per serving

                                                                                                  +

                                                                                                  Calories

                                                                                                  +
                                                                                                  + 230 +
                                                                                                  +
                                                                                                  + + +``` + +```css +* { + box-sizing: border-box; +} + +html { + font-size: 16px; +} + +body { + font-family: 'Open Sans', sans-serif; +} + +.label { + border: 2px solid black; + width: 270px; + margin: 20px auto; + padding: 0 7px; +} + +header h1 { + text-align: center; + margin: -4px 0; + letter-spacing: 0.15px +} + +p { + margin: 0; + display: flex; + justify-content: space-between; +} + +.divider { + border-bottom: 1px solid #888989; + margin: 2px 0; +} + +.bold { + font-weight: 800; +} + +.large { + height: 10px; +} + +.large, .medium { + background-color: black; + border: 0; +} + +.small-text { + font-size: 0.85rem; +} + +--fcc-editable-region-- + +--fcc-editable-region-- + +.calories-info h2 { + margin: 0; +} +``` diff --git a/curriculum/challenges/chinese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c8bf3980c14c438d2aed.md b/curriculum/challenges/chinese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c8bf3980c14c438d2aed.md index 7bec654ec15..ae7f2b797d2 100644 --- a/curriculum/challenges/chinese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c8bf3980c14c438d2aed.md +++ b/curriculum/challenges/chinese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c8bf3980c14c438d2aed.md @@ -7,7 +7,7 @@ dashedName: step-39 # --description-- -For now, make your `goStore` function output the message `Going to store.` to the console. For example, here is a function that outputs the message "Hello World". +For now, make your `goStore` function output the message `Going to store.` to the console. For example, here is a function that outputs the message `Hello World`. ```js function functionName() { diff --git a/curriculum/challenges/chinese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b0b5053f16111b0b6b5f.md b/curriculum/challenges/chinese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b0b5053f16111b0b6b5f.md index c60cf5907da..8cbcb969f78 100644 --- a/curriculum/challenges/chinese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b0b5053f16111b0b6b5f.md +++ b/curriculum/challenges/chinese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b0b5053f16111b0b6b5f.md @@ -47,7 +47,7 @@ Your `update` function should set `button3.onclick` to `fightDragon`. assert.match(update.toString(), /button3\.onclick\s*=\s*fightDragon/); ``` -Your `update` function should set `text.innerText` to `You are in the town square. You see a sign that says "Store".`. +Your `update` function should set `text.innerText` to `You are in the town square. You see a sign that says \"Store\".`. ```js assert.match(update.toString(), /text\.innerText\s*=\s*"You are in the town square. You see a sign that says \\"Store\\"\."/); diff --git a/curriculum/challenges/chinese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md b/curriculum/challenges/chinese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md index a8bef26a706..294662a5750 100644 --- a/curriculum/challenges/chinese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md +++ b/curriculum/challenges/chinese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md @@ -7,7 +7,7 @@ dashedName: step-62 # --description-- -The `locations` array contains two locations: the town square and the store. Currently you are passing that entire array into the update functions. Pass in only the first element of the `locations` array by adding `[0]` at the end of the variable. For example: `myFunction(arg[0]);`. +The `locations` array contains two locations: the `town square` and the `store`. Currently you are passing that entire array into the `update` function. Pass in only the first element of the `locations` array by adding `[0]` at the end of the variable. For example: `myFunction(arg[0]);`. This is called bracket notation. Values in an array are accessed by index. Indices are numerical values and start at 0 - this is called zero-based indexing. `arg[0]` would be the first element in the `arg` array. diff --git a/curriculum/challenges/chinese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md b/curriculum/challenges/chinese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md index ca8a532ec15..1506701e4ab 100644 --- a/curriculum/challenges/chinese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md +++ b/curriculum/challenges/chinese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md @@ -7,7 +7,7 @@ dashedName: step-67 # --description-- -Finally, update the `text.innerText` assignment to equal the `text` from the location object. However, instead of using bracket notation, use dot notation. Here is an example of accessing the `name` property of an object called `obj`: `obj.name`. +Finally, update the `text.innerText` assignment to equal the `text` from the `location` object. However, instead of using bracket notation, use dot notation. Here is an example of accessing the `name` property of an object called `obj`: `obj.name`. # --hints-- diff --git a/curriculum/challenges/chinese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c89e4272512d44fc1c66.md b/curriculum/challenges/chinese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c89e4272512d44fc1c66.md index cded49b4395..dab6fabe2b3 100644 --- a/curriculum/challenges/chinese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c89e4272512d44fc1c66.md +++ b/curriculum/challenges/chinese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c89e4272512d44fc1c66.md @@ -7,7 +7,7 @@ dashedName: step-83 # --description-- -Similar to your `buyHealth` function, set `gold` equal to 30 less than its current value. Make sure this is inside your `if` statement. +Similar to your `buyHealth` function, set `gold` equal to `30` less than its current value. Make sure this is inside your `if` statement. # --hints-- diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/subtract-one-number-from-another-with-javascript.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/subtract-one-number-from-another-with-javascript.md index c60160bcf2d..83508131f07 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/subtract-one-number-from-another-with-javascript.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/subtract-one-number-from-another-with-javascript.md @@ -26,13 +26,13 @@ Change the `0` so the difference is `12`. # --hints-- -The variable `difference` should be equal to 12. +The variable `difference` should be equal to `12`. ```js assert(difference === 12); ``` -You should only subtract one number from 45. +You should only subtract one number from `45`. ```js assert(/difference=45-33;?/.test(__helpers.removeWhiteSpace(code))); diff --git a/curriculum/challenges/english/05-back-end-development-and-apis/back-end-development-and-apis-projects/exercise-tracker.md b/curriculum/challenges/english/05-back-end-development-and-apis/back-end-development-and-apis-projects/exercise-tracker.md index 8748a9c5347..09fca82b5a8 100644 --- a/curriculum/challenges/english/05-back-end-development-and-apis/back-end-development-and-apis-projects/exercise-tracker.md +++ b/curriculum/challenges/english/05-back-end-development-and-apis/back-end-development-and-apis-projects/exercise-tracker.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --instructions-- @@ -411,7 +411,7 @@ The `description` property of any object in the `log` array that is returned fro ```js async(getUserInput) => { const url = getUserInput('url'); - const res = await fetch(url + '/api/users/', { + const res = await fetch(url + '/api/users', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', @@ -458,7 +458,7 @@ The `duration` property of any object in the `log` array that is returned from ` ```js async(getUserInput) => { const url = getUserInput('url'); - const res = await fetch(url + '/api/users/', { + const res = await fetch(url + '/api/users', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', @@ -505,7 +505,7 @@ The `date` property of any object in the `log` array that is returned from `GET ```js async(getUserInput) => { const url = getUserInput('url'); - const res = await fetch(url + '/api/users/', { + const res = await fetch(url + '/api/users', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', diff --git a/curriculum/challenges/english/05-back-end-development-and-apis/back-end-development-and-apis-projects/file-metadata-microservice.md b/curriculum/challenges/english/05-back-end-development-and-apis/back-end-development-and-apis-projects/file-metadata-microservice.md index 8bfbefca661..2fd385b7ce2 100644 --- a/curriculum/challenges/english/05-back-end-development-and-apis/back-end-development-and-apis-projects/file-metadata-microservice.md +++ b/curriculum/challenges/english/05-back-end-development-and-apis/back-end-development-and-apis-projects/file-metadata-microservice.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --instructions-- diff --git a/curriculum/challenges/english/05-back-end-development-and-apis/back-end-development-and-apis-projects/request-header-parser-microservice.md b/curriculum/challenges/english/05-back-end-development-and-apis/back-end-development-and-apis-projects/request-header-parser-microservice.md index ad7db108c34..fdb87d75856 100644 --- a/curriculum/challenges/english/05-back-end-development-and-apis/back-end-development-and-apis-projects/request-header-parser-microservice.md +++ b/curriculum/challenges/english/05-back-end-development-and-apis/back-end-development-and-apis-projects/request-header-parser-microservice.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --hints-- diff --git a/curriculum/challenges/english/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md b/curriculum/challenges/english/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md index 05eb29fb725..68938e90273 100644 --- a/curriculum/challenges/english/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md +++ b/curriculum/challenges/english/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. **Note:** Time zones conversion is not a purpose of this project, so assume all sent valid dates will be parsed with `new Date()` as GMT dates. @@ -106,7 +106,7 @@ Your project can handle dates that can be successfully parsed by `new Date(date_ ); ``` -If the input date string is invalid, the api returns an object having the structure `{ error : "Invalid Date" }` +If the input date string is invalid, the API returns an object having the structure `{ error : "Invalid Date" }` ```js (getUserInput) => diff --git a/curriculum/challenges/english/05-back-end-development-and-apis/back-end-development-and-apis-projects/url-shortener-microservice.md b/curriculum/challenges/english/05-back-end-development-and-apis/back-end-development-and-apis-projects/url-shortener-microservice.md index 20f7fa3fbce..b350b025b02 100644 --- a/curriculum/challenges/english/05-back-end-development-and-apis/back-end-development-and-apis-projects/url-shortener-microservice.md +++ b/curriculum/challenges/english/05-back-end-development-and-apis/back-end-development-and-apis-projects/url-shortener-microservice.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --instructions-- diff --git a/curriculum/challenges/english/05-back-end-development-and-apis/basic-node-and-express/meet-the-node-console.md b/curriculum/challenges/english/05-back-end-development-and-apis/basic-node-and-express/meet-the-node-console.md index 0bc80cb6c91..c3bb31b3df2 100644 --- a/curriculum/challenges/english/05-back-end-development-and-apis/basic-node-and-express/meet-the-node-console.md +++ b/curriculum/challenges/english/05-back-end-development-and-apis/basic-node-and-express/meet-the-node-console.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. During the development process, it is important to be able to check what’s going on in your code. diff --git a/curriculum/challenges/english/05-back-end-development-and-apis/basic-node-and-express/serve-json-on-a-specific-route.md b/curriculum/challenges/english/05-back-end-development-and-apis/basic-node-and-express/serve-json-on-a-specific-route.md index 1e977061c7c..91adaf364a0 100644 --- a/curriculum/challenges/english/05-back-end-development-and-apis/basic-node-and-express/serve-json-on-a-specific-route.md +++ b/curriculum/challenges/english/05-back-end-development-and-apis/basic-node-and-express/serve-json-on-a-specific-route.md @@ -18,7 +18,7 @@ Serve the object `{"message": "Hello json"}` as a response, in JSON format, to G # --hints-- -The endpoint `/json` should serve the json object `{"message": "Hello json"}` +The endpoint `/json` should serve the JSON object `{"message": "Hello json"}` ```js (getUserInput) => diff --git a/curriculum/challenges/english/05-back-end-development-and-apis/managing-packages-with-npm/how-to-use-package.json-the-core-of-any-node.js-project-or-npm-package.md b/curriculum/challenges/english/05-back-end-development-and-apis/managing-packages-with-npm/how-to-use-package.json-the-core-of-any-node.js-project-or-npm-package.md index 66cc0c44807..8f2c7a872f7 100644 --- a/curriculum/challenges/english/05-back-end-development-and-apis/managing-packages-with-npm/how-to-use-package.json-the-core-of-any-node.js-project-or-npm-package.md +++ b/curriculum/challenges/english/05-back-end-development-and-apis/managing-packages-with-npm/how-to-use-package.json-the-core-of-any-node.js-project-or-npm-package.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. The `package.json` file is the center of any Node.js project or npm package. It stores information about your project, similar to how the <head> section of an HTML document describes the content of a webpage. It consists of a single JSON object where information is stored in key-value pairs. There are only two required fields; "name" and "version", but it’s good practice to provide additional information about your project that could be useful to future users or maintainers. diff --git a/curriculum/challenges/english/05-back-end-development-and-apis/mongodb-and-mongoose/install-and-set-up-mongoose.md b/curriculum/challenges/english/05-back-end-development-and-apis/mongodb-and-mongoose/install-and-set-up-mongoose.md index 63217d55561..c7fa5c12145 100644 --- a/curriculum/challenges/english/05-back-end-development-and-apis/mongodb-and-mongoose/install-and-set-up-mongoose.md +++ b/curriculum/challenges/english/05-back-end-development-and-apis/mongodb-and-mongoose/install-and-set-up-mongoose.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. In this challenge, you will set up a MongoDB Atlas database and import the required packages to connect to it. diff --git a/curriculum/challenges/english/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md b/curriculum/challenges/english/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md index 231520a4fc7..c0e910201de 100644 --- a/curriculum/challenges/english/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md +++ b/curriculum/challenges/english/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. A template engine enables you to use static template files (such as those written in *Pug*) in your app. At runtime, the template engine replaces variables in a template file with actual values which can be supplied by your server. Then it transforms the template into a static HTML file that is sent to the client. This approach makes it easier to design an HTML page and allows for displaying variables on the page without needing to make an API call from the client. diff --git a/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/learn-how-javascript-assertions-work.md b/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/learn-how-javascript-assertions-work.md index d5314f04916..86da63708f9 100644 --- a/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/learn-how-javascript-assertions-work.md +++ b/curriculum/challenges/english/06-quality-assurance/quality-assurance-and-testing-with-chai/learn-how-javascript-assertions-work.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. # --instructions-- diff --git a/curriculum/challenges/english/06-quality-assurance/quality-assurance-projects/american-british-translator.md b/curriculum/challenges/english/06-quality-assurance/quality-assurance-projects/american-british-translator.md index 24614374237..268241fa98c 100644 --- a/curriculum/challenges/english/06-quality-assurance/quality-assurance-projects/american-british-translator.md +++ b/curriculum/challenges/english/06-quality-assurance/quality-assurance-projects/american-british-translator.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --instructions-- diff --git a/curriculum/challenges/english/06-quality-assurance/quality-assurance-projects/issue-tracker.md b/curriculum/challenges/english/06-quality-assurance/quality-assurance-projects/issue-tracker.md index bc19e1fbfdf..2de15ebc34f 100644 --- a/curriculum/challenges/english/06-quality-assurance/quality-assurance-projects/issue-tracker.md +++ b/curriculum/challenges/english/06-quality-assurance/quality-assurance-projects/issue-tracker.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --instructions-- diff --git a/curriculum/challenges/english/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md b/curriculum/challenges/english/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md index 6420a0235e9..b161902e84f 100644 --- a/curriculum/challenges/english/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md +++ b/curriculum/challenges/english/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --instructions-- diff --git a/curriculum/challenges/english/06-quality-assurance/quality-assurance-projects/personal-library.md b/curriculum/challenges/english/06-quality-assurance/quality-assurance-projects/personal-library.md index 6ce4912ae2a..727c65bcf18 100644 --- a/curriculum/challenges/english/06-quality-assurance/quality-assurance-projects/personal-library.md +++ b/curriculum/challenges/english/06-quality-assurance/quality-assurance-projects/personal-library.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --instructions-- diff --git a/curriculum/challenges/english/06-quality-assurance/quality-assurance-projects/sudoku-solver.md b/curriculum/challenges/english/06-quality-assurance/quality-assurance-projects/sudoku-solver.md index 6cc1274e3bd..c60869f8302 100644 --- a/curriculum/challenges/english/06-quality-assurance/quality-assurance-projects/sudoku-solver.md +++ b/curriculum/challenges/english/06-quality-assurance/quality-assurance-projects/sudoku-solver.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --instructions-- diff --git a/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-projects/sea-level-predictor.md b/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-projects/sea-level-predictor.md index 4ac73167c59..b940f705107 100644 --- a/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-projects/sea-level-predictor.md +++ b/curriculum/challenges/english/08-data-analysis-with-python/data-analysis-with-python-projects/sea-level-predictor.md @@ -28,7 +28,7 @@ You will analyze a dataset of the global average sea level change since 1880. Yo Use the data to complete the following tasks: - Use Pandas to import the data from `epa-sea-level.csv`. -- Use matplotlib to create a scatter plot using the `Year` column as the x-axis and the `CSIRO Adjusted Sea Level` column as the y-axix. +- Use matplotlib to create a scatter plot using the `Year` column as the x-axis and the `CSIRO Adjusted Sea Level` column as the y-axis. - Use the `linregress` function from `scipy.stats` to get the slope and y-intercept of the line of best fit. Plot the line of best fit over the top of the scatter plot. Make the line go through the year 2050 to predict the sea level rise in 2050. - Plot a new line of best fit just using the data from year 2000 through the most recent year in the dataset. Make the line also go through the year 2050 to predict the sea level rise in 2050 if the rate of rise continues as it has since the year 2000. - The x label should be `Year`, the y label should be `Sea Level (inches)`, and the title should be `Rise in Sea Level`. diff --git a/curriculum/challenges/english/09-information-security/information-security-projects/anonymous-message-board.md b/curriculum/challenges/english/09-information-security/information-security-projects/anonymous-message-board.md index 50cb04f4433..fc060f4510e 100644 --- a/curriculum/challenges/english/09-information-security/information-security-projects/anonymous-message-board.md +++ b/curriculum/challenges/english/09-information-security/information-security-projects/anonymous-message-board.md @@ -22,7 +22,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --instructions-- diff --git a/curriculum/challenges/english/09-information-security/information-security-projects/secure-real-time-multiplayer-game.md b/curriculum/challenges/english/09-information-security/information-security-projects/secure-real-time-multiplayer-game.md index 8c717f3a527..e0be1176a5b 100644 --- a/curriculum/challenges/english/09-information-security/information-security-projects/secure-real-time-multiplayer-game.md +++ b/curriculum/challenges/english/09-information-security/information-security-projects/secure-real-time-multiplayer-game.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --instructions-- diff --git a/curriculum/challenges/english/09-information-security/information-security-projects/stock-price-checker.md b/curriculum/challenges/english/09-information-security/information-security-projects/stock-price-checker.md index c5557e9752b..c5d05a7dee4 100644 --- a/curriculum/challenges/english/09-information-security/information-security-projects/stock-price-checker.md +++ b/curriculum/challenges/english/09-information-security/information-security-projects/stock-price-checker.md @@ -24,7 +24,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --instructions-- diff --git a/curriculum/challenges/english/09-information-security/information-security-with-helmetjs/install-and-require-helmet.md b/curriculum/challenges/english/09-information-security/information-security-with-helmetjs/install-and-require-helmet.md index caf0392a539..53a4ac70f07 100644 --- a/curriculum/challenges/english/09-information-security/information-security-with-helmetjs/install-and-require-helmet.md +++ b/curriculum/challenges/english/09-information-security/information-security-with-helmetjs/install-and-require-helmet.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Helmet helps you secure your Express apps by setting various HTTP headers. diff --git a/curriculum/challenges/english/10-coding-interview-prep/algorithms/implement-binary-search.md b/curriculum/challenges/english/10-coding-interview-prep/algorithms/implement-binary-search.md index bd2e8306ee1..caa2c40514c 100644 --- a/curriculum/challenges/english/10-coding-interview-prep/algorithms/implement-binary-search.md +++ b/curriculum/challenges/english/10-coding-interview-prep/algorithms/implement-binary-search.md @@ -10,9 +10,10 @@ dashedName: implement-binary-search Binary search is an **O(log(n))** efficiency algorithm for searching a sorted array to find an element. It operates using the following steps: -1. Find the middle `value` of a sorted array. If `value == target` return (found it!). +1. Find the middle `value` of a sorted array. If `value == target` return `true` (The value has been found and the search is complete). 1. If middle `value < target`, search right half of array in next compare. 1. If middle `value > target`, search left half of array in next compare. +1. If after searching the whole array the value is not present, return `false` (The array has been searched and the value is not in the array). As you can see, you are successively halving an array, which gives you the log(n) efficiency. For this challenge, we want you to show your work - how you got to the target value... the path you took! @@ -20,7 +21,7 @@ As you can see, you are successively halving an array, which gives you the log(n Write a function `binarySearch` that implements the binary search algorithm on an array, returning the path you took (each middle value comparison) to find the target in an array. -The function takes a sorted array of integers and a target value as input. It returns an array containing (in-order) the middle value you found at each halving of the original array until you found the target value. The target value should be the last element of the returned array. If value not is found, return the string `Value Not Found`. +The function takes a sorted array of integers and a target value as input. It returns an array containing (in-order) the middle value you found at each halving of the original array until you found the target value. The target value should be the last element of the returned array. If the value is not found, return the string `Value Not Found`. For example, `binarySearch([1,2,3,4,5,6,7], 5)` would return `[4,6,5]`. diff --git a/curriculum/challenges/english/10-coding-interview-prep/take-home-projects/build-a-nightlife-coordination-app.md b/curriculum/challenges/english/10-coding-interview-prep/take-home-projects/build-a-nightlife-coordination-app.md index 8dd028cc0c2..c75478c71af 100644 --- a/curriculum/challenges/english/10-coding-interview-prep/take-home-projects/build-a-nightlife-coordination-app.md +++ b/curriculum/challenges/english/10-coding-interview-prep/take-home-projects/build-a-nightlife-coordination-app.md @@ -22,7 +22,7 @@ Here are the specific user stories you should implement for this project: **Hint:** Try using the Yelp API to find venues in the cities your users search for. If you use Yelp's API, be sure to mention so in your app. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --solutions-- diff --git a/curriculum/challenges/english/10-coding-interview-prep/take-home-projects/build-a-voting-app.md b/curriculum/challenges/english/10-coding-interview-prep/take-home-projects/build-a-voting-app.md index c5e1f8c05dd..e70b3566764 100644 --- a/curriculum/challenges/english/10-coding-interview-prep/take-home-projects/build-a-voting-app.md +++ b/curriculum/challenges/english/10-coding-interview-prep/take-home-projects/build-a-voting-app.md @@ -28,7 +28,7 @@ Here are the specific user stories you should implement for this project: **User Story:** As an authenticated user, if you don't like the options on a poll, you can create a new option. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --solutions-- diff --git a/curriculum/challenges/english/10-coding-interview-prep/take-home-projects/build-an-image-search-abstraction-layer.md b/curriculum/challenges/english/10-coding-interview-prep/take-home-projects/build-an-image-search-abstraction-layer.md index 47cee2ababe..4c4540d7fce 100644 --- a/curriculum/challenges/english/10-coding-interview-prep/take-home-projects/build-an-image-search-abstraction-layer.md +++ b/curriculum/challenges/english/10-coding-interview-prep/take-home-projects/build-an-image-search-abstraction-layer.md @@ -18,7 +18,7 @@ Here are the specific user stories you should implement for this project: **User Story:** You can get a list of the most recently submitted search strings. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --solutions-- diff --git a/curriculum/challenges/english/10-coding-interview-prep/take-home-projects/chart-the-stock-market.md b/curriculum/challenges/english/10-coding-interview-prep/take-home-projects/chart-the-stock-market.md index a5562365284..c43de0dbaef 100644 --- a/curriculum/challenges/english/10-coding-interview-prep/take-home-projects/chart-the-stock-market.md +++ b/curriculum/challenges/english/10-coding-interview-prep/take-home-projects/chart-the-stock-market.md @@ -20,7 +20,7 @@ Here are the specific user stories you should implement for this project: **User Story:** You can see changes in real-time when any other user adds or removes a stock. For this you will need to use Web Sockets. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --solutions-- diff --git a/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/elements-and-tags-question-a.md b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/elements-and-tags-question-a.md new file mode 100644 index 00000000000..71767010b3c --- /dev/null +++ b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/elements-and-tags-question-a.md @@ -0,0 +1,53 @@ +--- +id: 637f4e0e72c65bc8e73dfe1e +videoId: LGQuIIv2RVA +title: Elements and Tags Question A +challengeType: 15 +dashedName: elements-and-tags-question-a +--- +# --description-- + +Almost all elements on an HTML page are just pieces of content wrapped in opening and closing HTML tags. + +Opening tags tell the browser this is the start of an HTML element. They are comprised of a keyword enclosed in angle brackets `<>`. For example, an opening paragraph tag looks like this: `

                                                                                                  `. + +Closing tags tell the browser where an element ends. They are almost the same as opening tags; the only difference is that they have a forward slash before the keyword. For example, a closing paragraph tag looks like this: `

                                                                                                  `. + +A full paragraph element looks like this: + +element diagram + +You can think of elements as containers for content. The opening and closing tags tell the browser what content the element contains. The browser can then use that information to determine how it should interpret and format the content. + +There are some HTML elements that do not have a closing tag. These elements often look like this: `
                                                                                                  ` or ``, but some can also be used without the closing forward slash such as `
                                                                                                  ` or ``. These are known as self-closing tags or empty elements because they don’t wrap any content. You will encounter a few of these in later lessons, but for the most part, elements will have both opening and closing tags. + +HTML has a vast list of predefined tags that you can use to create all kinds of different elements. It is important to use the correct tags for content. Using the correct tags can have a big impact on two aspects of your sites: how they are ranked in search engines; and how accessible they are to users who rely on assistive technologies, like screen readers, to use the internet. + +Using the correct elements for content is called semantic HTML. You will explore this in much more depth later on in the curriculum. + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s [Introduction to HTML video](https://www.youtube.com/watch?v=LGQuIIv2RVA&list=PL4-IK0AVhVjM0xE0K2uZRvsM7LkIhsPT-) + +## --text-- + +What are HTML tags? + +## --answers-- + +HTML tags tell the browser what content an element contains. + +--- + +HTML tags tell the browser when to load its content. + +--- + +HTML tags tell the browser what content the next element contains. + + +## --video-solution-- + +1 diff --git a/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/elements-and-tags-question-b.md b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/elements-and-tags-question-b.md new file mode 100644 index 00000000000..3e36735f990 --- /dev/null +++ b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/elements-and-tags-question-b.md @@ -0,0 +1,49 @@ +--- +id: 637f4e1672c65bc8e73dfe1f +videoId: LGQuIIv2RVA +title: Elements and Tags Question B +challengeType: 15 +dashedName: elements-and-tags-question-b +--- +# --description-- + +Almost all elements on an HTML page are just pieces of content wrapped in opening and closing HTML tags. + +Opening tags tell the browser this is the start of an HTML element. They are comprised of a keyword enclosed in angle brackets <>. For example, an opening paragraph tag looks like this: `

                                                                                                  `. + +Closing tags tell the browser where an element ends. They are almost the same as opening tags; the only difference is that they have a forward slash before the keyword. For example, a closing paragraph tag looks like this: `

                                                                                                  `. + +A full paragraph element looks like this: + +element diagram + +You can think of elements as containers for content. The opening and closing tags tell the browser what content the element contains. The browser can then use that information to determine how it should interpret and format the content. + +There are some HTML elements that do not have a closing tag. These elements often look like this: `
                                                                                                  ` or ``, but some can also be used without the closing forward slash such as `
                                                                                                  ` or ``. These are known as self-closing tags or empty elements because they don’t wrap any content. You will encounter a few of these in later lessons, but for the most part, elements will have both opening and closing tags. + +HTML has a vast list of predefined tags that you can use to create all kinds of different elements. It is important to use the correct tags for content. Using the correct tags can have a big impact on two aspects of your sites: how they are ranked in search engines; and how accessible they are to users who rely on assistive technologies, like screen readers, to use the internet. + +Using the correct elements for content is called semantic HTML. You will explore this in much more depth later on in the curriculum. + +# --question-- + +## --text-- + +What are the three parts of most HTML elements? + +## --answers-- + +An opening tag, self closing tag, and content. + +--- + +An opening tag, closing tag, and content. + +--- + +An opening tag, closing tag, and attribute. + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/html-boilerplate-question-a.md b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/html-boilerplate-question-a.md new file mode 100644 index 00000000000..8dadb99d7cc --- /dev/null +++ b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/html-boilerplate-question-a.md @@ -0,0 +1,55 @@ +--- +id: 637f4e1c72c65bc8e73dfe20 +videoId: V8UAEoOvqFg +title: HTML Boilerplate Question A +challengeType: 15 +dashedName: html-boilerplate-question-a +--- + +# --description-- + +To demonstrate an HTML boilerplate, you first need an HTML file to work with. + +Create a new folder on your computer and name it `html-boilerplate`. Within that folder create a new file and name it `index.html`. + +You’re probably already familiar with a lot of different types of files, for example doc, pdf, and image files. + +To let the computer know you want to create an HTML file, you need to append the filename with the `.html` extension as you have done when creating the `index.html` file. + +It is worth noting that you named your HTML file index. You should always name the HTML file that will contain the homepage of your websites `index.html`. This is because web servers will by default look for an index.html page when users land on your websites - and not having one will cause big problems. + +## The DOCTYPE + +Every HTML page starts with a doctype declaration. The doctype’s purpose is to tell the browser what version of HTML it should use to render the document. The latest version of HTML is HTML5, and the doctype for that version is simply ``. + +The doctypes for older versions of HTML were a bit more complicated. For example, this is the doctype declaration for HTML4: + +```html + +``` + +However, you probably won’t ever want to be using an older version of HTML, and so you’ll always use ``. + +Open the `index.html` file created earlier in your text editor and add `` to the very first line. + +# --question-- +## --text-- + +What is the purpose of the `DOCTYPE` declaration? + +## --answers-- + +It tells the browser which version of HTML to use to render the document. + +--- + +It tells the browser that this document uses JavaScript. + +--- + +It tells the browser the title of the document. + + +## --video-solution-- + +1 diff --git a/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/html-boilerplate-question-b.md b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/html-boilerplate-question-b.md new file mode 100644 index 00000000000..248f55b6089 --- /dev/null +++ b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/html-boilerplate-question-b.md @@ -0,0 +1,47 @@ +--- +id: 637f4e2872c65bc8e73dfe21 +videoId: V8UAEoOvqFg +title: HTML Boilerplate Question B +challengeType: 15 +dashedName: html-boilerplate-question-b +--- + +# --description-- + +After you declare the doctype, you need to provide an `` element. This is what’s known as the root element of the document, meaning that every other element in the document will be a descendant of it. + +This becomes more important later on when you learn about manipulating HTML with JavaScript. For now, just know that the `html` element should be included on every HTML document. + +Back in the `index.html` file, let’s add the `` element by typing out its opening and closing tags, like so: + +```html + + + +``` + +## What is the lang attribute? +`lang` specifies the language of the text content in that element. This attribute is primarily used for improving accessibility of the webpage. It allows assistive technologies, for example screen readers, to adapt according to the language and invoke correct pronunciation. + +# --question-- + +## --text-- + +What is the `html` element? + +## --answers-- + +It is the root element in the document and tells the browser which version of HTML it should use. + +--- + +It is the root element in the document and all other elements should descend from it. + +--- + +It is the root element in the document and all other elements should come after it. + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/html-boilerplate-question-c.md b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/html-boilerplate-question-c.md new file mode 100644 index 00000000000..31d83ed2e63 --- /dev/null +++ b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/html-boilerplate-question-c.md @@ -0,0 +1,66 @@ +--- +id: 637f4e2f72c65bc8e73dfe22 +videoId: LGQuIIv2RVA +title: HTML Boilerplate Question C +challengeType: 15 +dashedName: html-boilerplate-question-c +--- + +# --description-- + +The `` element is where you put important meta-information about your webpages, and stuff required for your webpages to render correctly in the browser. Inside the ``, you should not use any element that displays content on the webpage. + +## The Charset Meta Element +You should always have the `meta` tag for the charset encoding of the webpage in the head element: ``. + +Setting the encoding is very important because it ensures that the webpage will display special symbols and characters from different languages correctly in the browser. + +## Title Element +Another element you should always include in the head of an HTML document is the `title` element: + +```html +My First Webpage +``` + +The `title` element is used to give webpages a human-readable title which is displayed in your webpage’s browser tab. + +If you didn’t include a `title` element, the webpage’s title would default to its file name. In your case that would be `index.html`, which isn’t very meaningful for users; this would make it very difficult to find your webpage if the user has many browser tabs open. + +There are many more elements that can go within the `head` of an HTML document. However, for now it’s only crucial to know about the two elements you have covered here. You will introduce more elements that go into the `head` throughout the rest of the curriculum. + +Back in `index.html` file, let’s add a `head` element with a `charset` `meta` element and a `title` within it. The head element goes within the HTML element and should always be the first element under the opening `` tag: + + +```html + + + + + + My First Webpage + + +``` + +# --question-- + +## --text-- + +What is the purpose of the `head` element? + +## --answers-- + +The `head` element is used to display all elements that are displayed on the webpage. + +--- + +The `head` element is used to display important information about your webpage and is used to render web pages correctly with `meta` elements. + +--- + +The `head` element is used to display the header content on top of the webpage. + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/html-boilerplate-question-d.md b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/html-boilerplate-question-d.md new file mode 100644 index 00000000000..538a9389ee3 --- /dev/null +++ b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/html-boilerplate-question-d.md @@ -0,0 +1,47 @@ +--- +id: 637f4e3672c65bc8e73dfe23 +videoId: V8UAEoOvqFg +title: HTML Boilerplate Question D +challengeType: 15 +dashedName: html-boilerplate-question-d +--- +# --description-- + +The final element needed to complete the HTML boilerplate is the `` element. This is where all the content that will be displayed to users will go - the text, images, lists, links, and so on. + +To complete the boilerplate, add a `body` element to the `index.html` file. The `body` element also goes within the `html` element and is always below the `head` element, like so: + +# --question-- + +## --assignment-- + +Watch and follow along to Kevin Powell’s brilliant Building your first web page video above. + +--- + +Build some muscle memory by deleting the contents of the `index.html` file and trying to write out all the boilerplate again from memory. Don’t worry if you have to peek at the lesson content the first few times if you get stuck. Just keep going until you can do it a couple of times from memory. + +--- + +Run your boilerplate through this [HTML validator](https://www.freeformatter.com/html-validator.html). Validators ensure your markup is correct and are an excellent learning tool, as they provide feedback on syntax errors you may be making often and aren’t aware of, such as missing closing tags and extra spaces in your HTML. + +## --text-- + +What is the purpose of the `body` element? + +## --answers-- + +This is where all important information about the webpage is displayed such as the `title` and `meta` tags. + +--- + +This is where you tell the browser how to render the webpage correctly. + +--- + +This is where all content will be displayed on the page such images, text, and links. + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-a.md b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-a.md new file mode 100644 index 00000000000..445f8b22dc9 --- /dev/null +++ b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-a.md @@ -0,0 +1,42 @@ +--- +id: 6374f208de18c50e48ba767b +videoId: LGQuIIv2RVA +title: Introduction To HTML and CSS Question A +challengeType: 15 +dashedName: introduction-to-html-and-css-question-a +--- + +# --description-- + +HTML and CSS are two languages that work together to create everything that you see when you look at something on the internet. HTML is the raw data that a webpage is built out of. All the text, links, cards, lists, and buttons are created in HTML. CSS is what adds style to those plain elements. HTML puts information on a webpage, and CSS positions that information, gives it color, changes the font, and makes it look great! + +Many helpful resources out there keep referring to HTML and CSS as programming languages, but if you want to get technical, labeling them as such is not quite accurate. This is because they are only concerned with presenting information. They are not used to program logic. JavaScript, which you will learn in the next section, is a programming language because it’s used to make webpages do things. Yet, there is quite a lot you can do with just HTML and CSS, and you will definitely need them both. Throughout our curriculum, the following lessons focus on giving you the tools you need to succeed once you reach JavaScript content. + +# --question-- + +## --assignment-- + +Read the HTML vs CSS vs JavaScript article. It is a quick overview of the relationships between HTML, CSS, and JavaScript. + +## --text-- + +Which of the following statements is true? + +## --answers-- + +CSS is used to create the basic structure of a webpage, and HTML is used to add style. + +--- + +HTML is used to create the basic structure of a webpage, and CSS is used to add style. + +--- + +HTML and CSS are used to add style to a webpage, and JavaScript is used to create the basic structure. + + +## --video-solution-- + +2 + + diff --git a/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-b.md b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-b.md new file mode 100644 index 00000000000..670bf102e4a --- /dev/null +++ b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-b.md @@ -0,0 +1,37 @@ +--- +id: 6376327e2724a688c04636e3 +videoId: LGQuIIv2RVA +title: Introduction To HTML and CSS Question B +challengeType: 15 +dashedName: introduction-to-html-and-css-question-b +--- + +# --description-- + + +HTML and CSS are two languages that work together to create everything that you see when you look at something on the internet. HTML is the raw data that a webpage is built out of. All the text, links, cards, lists, and buttons are created in HTML. CSS is what adds style to those plain elements. HTML puts information on a webpage, and CSS positions that information, gives it color, changes the font, and makes it look great! + +Many helpful resources out there keep referring to HTML and CSS as programming languages, but if you want to get technical, labeling them as such is not quite accurate. This is because they are only concerned with presenting information. They are not used to program logic. JavaScript, which you will learn in the next section, is a programming language because it’s used to make webpages do things. Yet, there is quite a lot you can do with just HTML and CSS, and you will definitely need them both. Throughout our curriculum, the following lessons focus on giving you the tools you need to succeed once you reach JavaScript content. + +# --question-- + +## --text-- + +Between HTML and CSS, which should you use to add paragraphs of text on a webpage? + +## --answers-- + +CSS + +--- + +JavaScript + +--- + +HTML + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-c.md b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-c.md new file mode 100644 index 00000000000..2c50a29e74e --- /dev/null +++ b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-c.md @@ -0,0 +1,34 @@ +--- +id: 637633162724a688c04636e4 +videoId: LGQuIIv2RVA +title: Introduction To HTML and CSS Question C +challengeType: 15 +dashedName: introduction-to-html-and-css-question-c +--- + +# --description-- + +HTML and CSS are two languages that work together to create everything that you see when you look at something on the internet. HTML is the raw data that a webpage is built out of. All the text, links, cards, lists, and buttons are created in HTML. CSS is what adds style to those plain elements. HTML puts information on a webpage, and CSS positions that information, gives it color, changes the font, and makes it look great! + +Many helpful resources out there keep referring to HTML and CSS as programming languages, but if you want to get technical, labeling them as such is not quite accurate. This is because they are only concerned with presenting information. They are not used to program logic. JavaScript, which you will learn in the next section, is a programming language because it’s used to make webpages do things. Yet, there is quite a lot you can do with just HTML and CSS, and you will definitely need them both. Throughout our curriculum, the following lessons focus on giving you the tools you need to succeed once you reach JavaScript content. +# --question-- + +## --text-- + +Between HTML and CSS, which should you use to change the font and background color of a button? + +## --answers-- + +You should use CSS to change the background color and font of a button. + +--- + +You should use JavaScript to change the background color and font of a button. + +--- + +You should use HTML to change the background color and font of a button. + +## --video-solution-- + +1 diff --git a/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-d.md b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-d.md new file mode 100644 index 00000000000..ab0e34dcfe4 --- /dev/null +++ b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-d.md @@ -0,0 +1,35 @@ +--- +id: 637633672724a688c04636e5 +videoId: LGQuIIv2RVA +title: Introduction To HTML and CSS Question D +challengeType: 15 +dashedName: introduction-to-html-and-css-question-d +--- + +# --description-- + +HTML and CSS are two languages that work together to create everything that you see when you look at something on the internet. HTML is the raw data that a webpage is built out of. All the text, links, cards, lists, and buttons are created in HTML. CSS is what adds style to those plain elements. HTML puts information on a webpage, and CSS positions that information, gives it color, changes the font, and makes it look great! + +Many helpful resources out there keep referring to HTML and CSS as programming languages, but if you want to get technical, labeling them as such is not quite accurate. This is because they are only concerned with presenting information. They are not used to program logic. JavaScript, which you will learn in the next section, is a programming language because it’s used to make webpages do things. Yet, there is quite a lot you can do with just HTML and CSS, and you will definitely need them both. Throughout our curriculum, the following lessons focus on giving you the tools you need to succeed once you reach JavaScript content. + +# --question-- + +## --text-- + +What is the difference between HTML, CSS, and JavaScript? + +## --answers-- + +HTML is for creating interactive elements, CSS is for the look and feel, and JavaScript is for creating the structure of a webpage. + +--- + +CSS is for the look and feel, JavaScript is for creating interactive elements, and HTML is for creating the structure of a webpage. + +--- + +JavaScript is for the look and feel, CSS is for creating the structure, and HTML is for creating interactive elements of a webpage. + +## --video-solution-- + +2 diff --git a/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/links-and-images-question-a.md b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/links-and-images-question-a.md new file mode 100644 index 00000000000..1f6c5ef99ce --- /dev/null +++ b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/links-and-images-question-a.md @@ -0,0 +1,66 @@ +--- +id: 637f704072c65bc8e73dfe36 +videoId: tsEQgGjSmkM +title: Links and Images Question A +challengeType: 15 +dashedName: links-and-images-question-a +--- +# --description-- + +To get some practice using links and images throughout this lesson you need an HTML project to work with. + +- Create a new directory named `odin-links-and-images`. + +- Within that directory, create a new file named `index.html`. + +- Fill in the usual HTML boilerplate. + +- Finally, add the following `h1` to the `body`: `

                                                                                                  Homepage

                                                                                                  ` + +## Anchor Elements +To create a link in HTML, you use the anchor element. An anchor element is defined by wrapping the text or another HTML element you want to be a link with an `` tag. +Add the following to the `body` of the `index.html` page you created and open it in the browser: + +```html +click me +``` + +You may have noticed that clicking this link doesn’t do anything. This is because an anchor tag on its own won’t know where you want to link to. You have to tell it a destination to go to. You do this by using an HTML attribute. + +An HTML attribute gives additional information to an HTML element and always goes in the element’s opening tag. An attribute is usually made up of two parts: a name, and a value; however, not all attributes require a value. In your case, you need to add a `href` (hyperlink reference) attribute to the opening anchor tag. The value of the `href` attribute is the destination you want your link to go to. + +Add the following `href` attribute to the anchor element you created previously and try clicking it again, don’t forget to refresh the browser so the new changes can be applied. + +```html +click me +``` + +By default, any text wrapped with an anchor tag without a `href` attribute will look like plain text. If the `href` attribute is present, the browser will give the text a blue color and underline it to signify it is a link. + +It’s worth noting you can use anchor tags to link to any kind of resource on the internet, not just other HTML documents. You can link to videos, pdf files, images, and so on, but for the most part, you will be linking to other HTML documents. + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s HTML Links video above. + +## --text-- + +What HTML tag is used to create a link? + +## --answers-- + +`` + +--- + +`

                                                                                                  ` + +--- + +`

                                                                                                    ` + +## --video-solution-- + +1 diff --git a/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/links-and-images-question-b.md b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/links-and-images-question-b.md new file mode 100644 index 00000000000..0c69cc1981b --- /dev/null +++ b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/links-and-images-question-b.md @@ -0,0 +1,58 @@ +--- +id: 637f703572c65bc8e73dfe35 +videoId: tsEQgGjSmkM +title: Links and Images Question B +challengeType: 15 +dashedName: links-and-images-question-b +--- +# --description-- + +To get some practice using links and images throughout this lesson you need an HTML project to work with. + +- Create a new directory named odin-links-and-images. + +- Within that directory, create a new file named index.html. + +- Fill in the usual HTML boilerplate. + +- finally, add the following h1 to the body: `

                                                                                                    Homepage

                                                                                                    ` + +## Anchor Elements +To create a link in HTML, you use the anchor element. An anchor element is defined by wrapping the text or another HTML element you want to be a link with an `
                                                                                                    ` tag. +Add the following to the body of the index.html page you created and open it in the browser: + +```html +click me +``` + +You may have noticed that clicking this link doesn’t do anything. This is because an anchor tag on its own won’t know where you want to link to. You have to tell it a destination to go to. You do this by using an HTML attribute. +An HTML attribute gives additional information to an HTML element and always goes in the element’s opening tag. An attribute is usually made up of two parts: a name, and a value; however, not all attributes require a value. In your case, you need to add a href (hyperlink reference) attribute to the opening anchor tag. The value of the href attribute is the destination you want your link to go to. +Add the following href attribute to the anchor element you created previously and try clicking it again, don’t forget to refresh the browser so the new changes can be applied. + +```html +click me +``` + +By default, any text wrapped with an anchor tag without a `href` attribute will look like plain text. If the `href` attribute is present, the browser will give the text a blue color and underline it to signify it is a link. +It’s worth noting you can use anchor tags to link to any kind of resource on the internet, not just other HTML documents. You can link to videos, pdf files, images, and so on, but for the most part, you will be linking to other HTML documents. + +# --question-- +## --text-- + +What is an attribute? +## --answers-- + +An HTML attribute gives additional information to an HTML element and always goes in the element’s closing tag. + +--- + +An HTML attribute is used to tell the browser what the element contains. + +--- + +An HTML attribute gives additional information to an HTML element and always goes in the element’s opening tag. + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/links-and-images-question-c.md b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/links-and-images-question-c.md new file mode 100644 index 00000000000..8270794a1ea --- /dev/null +++ b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/links-and-images-question-c.md @@ -0,0 +1,59 @@ +--- +id: 637f703072c65bc8e73dfe34 +videoId: tsEQgGjSmkM +title: Links and Images Question C +challengeType: 15 +dashedName: links-and-images-question-c +--- +# --description-- + +To get some practice using links and images throughout this lesson you need an HTML project to work with. + +- Create a new directory named odin-links-and-images. + +- Within that directory, create a new file named index.html. + +- Fill in the usual HTML boilerplate. + +- finally, add the following h1 to the body: `

                                                                                                    Homepage

                                                                                                    ` + +## Anchor Elements +To create a link in HTML, you use the anchor element. An anchor element is defined by wrapping the text or another HTML element you want to be a link with an `` tag. +Add the following to the body of the index.html page you created and open it in the browser: + +```html +click me +``` + +You may have noticed that clicking this link doesn’t do anything. This is because an anchor tag on its own won’t know where you want to link to. You have to tell it a destination to go to. You do this by using an HTML attribute. +An HTML attribute gives additional information to an HTML element and always goes in the element’s opening tag. An attribute is usually made up of two parts: a name, and a value; however, not all attributes require a value. In your case, you need to add a href (hyperlink reference) attribute to the opening anchor tag. The value of the href attribute is the destination you want your link to go to. +Add the following href attribute to the anchor element you created previously and try clicking it again, don’t forget to refresh the browser so the new changes can be applied. + +```html +click me +``` + +By default, any text wrapped with an anchor tag without a `href` attribute will look like plain text. If the `href` attribute is present, the browser will give the text a blue color and underline it to signify it is a link. +It’s worth noting you can use anchor tags to link to any kind of resource on the internet, not just other HTML documents. You can link to videos, pdf files, images, and so on, but for the most part, you will be linking to other HTML documents. + +# --question-- + +## --text-- + +What attribute tells links where to go to? + +## --answers-- + +`src` + +--- + +`href` + +--- + +`link` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/links-and-images-question-d.md b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/links-and-images-question-d.md new file mode 100644 index 00000000000..358954ad698 --- /dev/null +++ b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/links-and-images-question-d.md @@ -0,0 +1,111 @@ +--- +id: 637f702872c65bc8e73dfe33 +videoId: ta3Oxx7Yqbo +title: Links and Images Question D +challengeType: 15 +dashedName: links-and-images-question-d +--- +# --description-- + + +Generally, there are two kinds of links you will create: + +- Links to pages on other websites on the internet + +- Links to pages located on your own websites + + +## Absolute Links +Links to pages on other websites on the internet are called absolute links. A typical absolute link will be made up of the following parts: `protocol://domain/path`. An absolute link will always contain the protocol and domain of the destination. + +You’ve already seen an absolute link in action. The link you created to The Odin Project’s About page earlier was an absolute link as it contains the protocol and domain. + +`https://www.theodinproject.com/about` + +## Relative Links +Links to other pages within your own website are called relative links. Relative links do not include the domain name, since it is another page on the same site, it assumes the domain name will be the same as the page you created the link on. + +Relative links only include the file path to the other page, relative to the page you are creating the link on. This is quite abstract, let’s see this in action using an example. + +Within the `odin-links-and-images` directory, create another HTML file named `about.html` and paste the following code into it: + +```html + + + + + Odin Links and Images + + + +

                                                                                                    About Page

                                                                                                    + + +``` + +Back in the index page, add the following anchor element to create a link to the about page: + +```html + +

                                                                                                    Homepage

                                                                                                    + click me + + About + +``` + +Open the index file in a browser and click on the about link to make sure it is all wired together correctly. Clicking the link should go to the about page you just created. + +This works because the index and about page are in the same directory. That means you can simply use its name (`about.html`) as the link’s href value. + +But you will usually want to organize your website directories a little better. Normally you would only have the `index.html` at the root directory and all other HTML files in their own directory. + +Create a directory named `pages` within the `odin-links-and-images` directory and move the `about.html` file into this new directory. + +Refresh the index page in the browser and then click on the about link. It will now be broken. This is because the location of the about page file has changed. + +To fix this, you just need to update the about link `href` value to include the `pages/` directory since that is the new location of the about file relative to the index file. + +```html + +

                                                                                                    Homepage

                                                                                                    + About + +``` + +Refresh the index page in the browser and try clicking the about link again, it should now be back in working order. + +In many cases, this will work just fine; however, you can still run into unexpected issues with this approach. Prepending `./` before the link will in most cases prevent such issues. By adding `./` you are specifying to your code that it should start looking for the file/directory relative to the **current** directory. + +```html + +

                                                                                                    Homepage

                                                                                                    + About + +``` + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s HTML File Structure video above. + +## --text-- + +What is the difference between an absolute and a relative link? + +## --answers-- + +An absolute link is a link to another page on the current website. A relative link is a link to another website. + +--- + +An absolute link is a link to another website. A relative link is a link another page on the current website. + +--- + +There is no difference between absolute and relative links. + +## --video-solution-- + +2 diff --git a/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/links-and-images-question-e.md b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/links-and-images-question-e.md new file mode 100644 index 00000000000..e83d656458f --- /dev/null +++ b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/links-and-images-question-e.md @@ -0,0 +1,97 @@ +--- +id: 637f702372c65bc8e73dfe32 +videoId: 0xoztJCHpbQ +title: Links and Images Question E +challengeType: 15 +dashedName: links-and-images-question-e +--- +# --description-- + +Websites would be fairly boring if they could only display text. Luckily HTML provides a wide variety of elements for displaying all sorts of different media. The most widely used of these is the image element. + +To display an image in HTML you use the `` element. Unlike the other elements you have encountered, the `` element is self-closing. Empty, self-closing HTML elements do not need a closing tag. + +Instead of wrapping content with an opening and closing tag, it embeds an image into the page using a `src` attribute which tells the browser where the image file is located. The `src` attribute works much like the `href` attribute for anchor tags. It can embed an image using both absolute and relative paths. + +For example, using an absolute path you can display an image located on The Odin Project site: + + + +To use images that you have on your own websites, you can use a relative path. + +- Create a new directory named `images` within the `odin-links-and-images` project. + +- Next, download [this image](https://unsplash.com/photos/Mv9hjnEUHR4/download?force=true&w=640) and move it into the `images` directory you just created. + +- Rename the image to `dog.jpg`. + +Finally add the image to the `index.html` file: + +```html + +

                                                                                                    Homepage

                                                                                                    + click me + + About + + + +``` + +Save the `index.html` file and open it in a browser to view Charles in all his glory. + + +## Parent Directories + +What if you want to use the dog image in the about page? You would first have to go up one level out of the pages directory into its parent directory so you could then access the images directory. + +To go to the parent directory you need to use two dots in the relative filepath like this: `../.` Let’s see this in action, within the body of the `about.html` file, add the following image below the heading you added earlier: + +```html + +``` + +To break this down: + +- First, you are going to the parent directory of the pages directory which is `odin-links-and-images`. + +- Then, from the parent directory, you can go into the `images` directory. + +- Finally, you can access the `dog.jpg` file. + +Using the metaphor we used earlier, using `../` in a filepath is kind of like stepping out from the room you are currently in to the main hallway so you can go to another room. + +## `Alt` attribute + +Besides the `src` attribute, every image element should also have an `alt` (alternative text) attribute. + +The `alt` attribute is used to describe an image. It will be used in place of the image if it cannot be loaded. It is also used with screen readers to describe what the image is to visually impaired users. + +This is how the The Odin Project logo example you used earlier looks with an `alt` attribute included: + + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s HTML Images Video above. + +## --text-- + +Which tag is used to display an image? + +## --answers-- + +`` + +--- + +`` + +--- + +`` + +## --video-solution-- + +3 diff --git a/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/links-and-images-question-f.md b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/links-and-images-question-f.md new file mode 100644 index 00000000000..60b2ba8191f --- /dev/null +++ b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/links-and-images-question-f.md @@ -0,0 +1,93 @@ +--- +id: 637f701c72c65bc8e73dfe31 +videoId: 0xoztJCHpbQ +title: Links and Images Question F +challengeType: 15 +dashedName: links-and-images-question-f +--- +# --description-- + +Websites would be fairly boring if they could only display text. Luckily HTML provides a wide variety of elements for displaying all sorts of different media. The most widely used of these is the image element. + +To display an image in HTML you use the `` element. Unlike the other elements you have encountered, the `` element is self-closing. Empty, self-closing HTML elements do not need a closing tag. + +Instead of wrapping content with an opening and closing tag, it embeds an image into the page using a src attribute which tells the browser where the image file is located. The src attribute works much like the href attribute for anchor tags. It can embed an image using both absolute and relative paths. + +For example, using an absolute path you can display an image located on The Odin Project site: + + + +To use images that you have on your own websites, you can use a relative path. + +- Create a new directory named `images` within the `odin-links-and-images` project. + +- Next, download [this image](https://unsplash.com/photos/Mv9hjnEUHR4/download?force=true&w=640) and move it into the images directory you just created. + +- Rename the image to `dog.jpg`. + +Finally add the image to the `index.html` file: + +```html + +

                                                                                                    Homepage

                                                                                                    +
                                                                                                    click me + + About + + + +``` + +Save the `index.html` file and open it in a browser to view Charles in all his glory. + + +## Parent Directories + +What if you want to use the dog image in the about page? You would first have to go up one level out of the pages directory into its parent directory so you could then access the images directory. + +To go to the parent directory you need to use two dots in the relative filepath like this: `../.` Let’s see this in action, within the body of the `about.html` file, add the following image below the heading you added earlier: + +```html + +``` + +To break this down: + +- First, you are going to the parent directory of the pages directory which is `odin-links-and-images`. + +- Then, from the parent directory, you can go into the `images` directory. + +- Finally, you can access the `dog.jpg` file. + +Using the metaphor we used earlier, using `../` in a filepath is kind of like stepping out from the room you are currently in to the main hallway so you can go to another room. + +## Alt attribute + +Besides the src attribute, every image element should also have an alt (alternative text) attribute. + +The alt attribute is used to describe an image. It will be used in place of the image if it cannot be loaded. It is also used with screen readers to describe what the image is to visually impaired users. + +This is how the The Odin Project logo example you used earlier looks with an alt attribute included: + + +# --question-- + +## --text-- + +What two attributes do images always need to have? + +## --answers-- + +`href` and `alt` + +--- + +`name` and `href` + +--- + +`alt` and `src` + +## --video-solution-- + +3 diff --git a/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/links-and-images-question-g.md b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/links-and-images-question-g.md new file mode 100644 index 00000000000..a64b4b80e38 --- /dev/null +++ b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/links-and-images-question-g.md @@ -0,0 +1,93 @@ +--- +id: 637f701572c65bc8e73dfe30 +videoId: 0xoztJCHpbQ +title: Links and Images Question G +challengeType: 15 +dashedName: links-and-images-question-g +--- +# --description-- + +Websites would be fairly boring if they could only display text. Luckily HTML provides a wide variety of elements for displaying all sorts of different media. The most widely used of these is the image element. + +To display an image in HTML you use the `` element. Unlike the other elements you have encountered, the `` element is self-closing. Empty, self-closing HTML elements do not need a closing tag. + +Instead of wrapping content with an opening and closing tag, it embeds an image into the page using a src attribute which tells the browser where the image file is located. The src attribute works much like the href attribute for anchor tags. It can embed an image using both absolute and relative paths. + +For example, using an absolute path you can display an image located on The Odin Project site: + + + +To use images that you have on your own websites, you can use a relative path. + +- Create a new directory named `images` within the `odin-links-and-images` project. + +- Next, download [this image](https://unsplash.com/photos/Mv9hjnEUHR4/download?force=true&w=640) and move it into the images directory you just created. + +- Rename the image to `dog.jpg`. + +Finally add the image to the `index.html` file: + +```html + +

                                                                                                    Homepage

                                                                                                    + click me + + About + + + +``` + +Save the `index.html` file and open it in a browser to view Charles in all his glory. + + +## Parent Directories + +What if you want to use the dog image in the about page? You would first have to go up one level out of the pages directory into its parent directory so you could then access the images directory. + +To go to the parent directory you need to use two dots in the relative filepath like this: `../.` Let’s see this in action, within the body of the `about.html` file, add the following image below the heading you added earlier: + +```html + +``` + +To break this down: + +- First, you are going to the parent directory of the pages directory which is `odin-links-and-images`. + +- Then, from the parent directory, you can go into the `images` directory. + +- Finally, you can access the `dog.jpg` file. + +Using the metaphor we used earlier, using `../` in a filepath is kind of like stepping out from the room you are currently in to the main hallway so you can go to another room. + +## Alt attribute + +Besides the src attribute, every image element should also have an alt (alternative text) attribute. + +The alt attribute is used to describe an image. It will be used in place of the image if it cannot be loaded. It is also used with screen readers to describe what the image is to visually impaired users. + +This is how the The Odin Project logo example you used earlier looks with an alt attribute included: + + +# --question-- + +## --text-- + +How do you access a parent directory in a filepath? + +## --answers-- + +`../` + +--- + +`./` + +--- + +`.../` + +## --video-solution-- + +1 diff --git a/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/links-and-images-question-h.md b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/links-and-images-question-h.md new file mode 100644 index 00000000000..21c05af224b --- /dev/null +++ b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/links-and-images-question-h.md @@ -0,0 +1,97 @@ +--- +id: 637f700b72c65bc8e73dfe2f +videoId: 0xoztJCHpbQ +title: Links and Images Question H +challengeType: 15 +dashedName: links-and-images-question-h +--- +# --description-- + +Websites would be fairly boring if they could only display text. Luckily HTML provides a wide variety of elements for displaying all sorts of different media. The most widely used of these is the image element. + +To display an image in HTML you use the `` element. Unlike the other elements you have encountered, the `` element is self-closing. Empty, self-closing HTML elements do not need a closing tag. + +Instead of wrapping content with an opening and closing tag, it embeds an image into the page using a src attribute which tells the browser where the image file is located. The src attribute works much like the href attribute for anchor tags. It can embed an image using both absolute and relative paths. + +For example, using an absolute path you can display an image located on The Odin Project site: + + + +To use images that you have on your own websites, you can use a relative path. + +- Create a new directory named `images` within the `odin-links-and-images` project. + +- Next, download [this image](https://unsplash.com/photos/Mv9hjnEUHR4/download?force=true&w=640) and move it into the images directory you just created. + +- Rename the image to `dog.jpg`. + +Finally add the image to the `index.html` file: + +```html + +

                                                                                                    Homepage

                                                                                                    + click me + + About + + + +``` + +Save the `index.html` file and open it in a browser to view Charles in all his glory. + + +## Parent Directories + +What if you want to use the dog image in the about page? You would first have to go up one level out of the pages directory into its parent directory so you could then access the images directory. + +To go to the parent directory you need to use two dots in the relative filepath like this: `../.` Let’s see this in action, within the body of the `about.html` file, add the following image below the heading you added earlier: + +```html + +``` + +To break this down: + +- First, you are going to the parent directory of the pages directory which is `odin-links-and-images`. + +- Then, from the parent directory, you can go into the `images` directory. + +- Finally, you can access the `dog.jpg` file. + +Using the metaphor we used earlier, using `../` in a filepath is kind of like stepping out from the room you are currently in to the main hallway so you can go to another room. + +## Alt attribute + +Besides the src attribute, every image element should also have an alt (alternative text) attribute. + +The alt attribute is used to describe an image. It will be used in place of the image if it cannot be loaded. It is also used with screen readers to describe what the image is to visually impaired users. + +This is how the The Odin Project logo example you used earlier looks with an alt attribute included: + + +# --question-- + +## --assignment-- + +Read about the four main image formats that can be used on the web. + +## --text-- + +What are the four main image formats that you can use for images on the web? + +## --answers-- + +TIFF, GIF, PNG, and SVG. + +--- + +JPG, PNG, GIF, and SVG. + +--- + +JPG, PDF, SVG, and GIF. + +## --video-solution-- + +2 diff --git a/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/project-create-a-recipe-page.md b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/project-create-a-recipe-page.md new file mode 100644 index 00000000000..7f7926e3df6 --- /dev/null +++ b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/project-create-a-recipe-page.md @@ -0,0 +1,207 @@ +--- +id: 6391d1a4f7ac71efd0621380 +title: Build a Recipe Page Project +challengeType: 14 +dashedName: project-create-a-recipe-page +--- + +# --description-- + +The website will consist of a main index page which will have links to a few recipes. The website won’t look very pretty by the time you’ve finished. + +**User Stories:** + +1. Your recipe page should contain a `DOCTYPE` tag. +1. Your recipe page should include an `html` element with a `head` and `body` element as children. +1. You should have a `title` element within the `head` element with the text `The Odin Recipes`. +1. You should see an `h1` element that has the text `Creamy Chocolate Fudge`. +1. You should see an image with the url `*placeholder-fcc-cdn*` with a fitting `alt` text. +1. There should be an `h2` element with the text `Description` under the image. +1. You should see a couple of paragraphs under `Description` that describe the recipe. +1. There should be an `h2` element with the text `Ingredients` +1. Under the `Ingredients` heading there should be an unordered list with the ingredients needed for the recipe. +1. Under the list of ingredients add another heading called `Steps`. +1. You should see an ordered list with a couple of steps needed to complete the recipe. +1. Under the steps there should be an `h2` element with the text `More Recipes` +1. You should see a couple of links to other recipes inside an unordered list which has a couple of list items with anchor elements within. +1. These anchor elements should have `href` attribute with the value set to `#` + +# --hints-- + +You should have a `DOCTYPE` tag. + +```js +assert(code.match(//gi)); +``` + +You should have a `html` element with `head` and `body` element. + +```js +const html = document.querySelectorAll('html')[0]; +const head = document.querySelectorAll('html > head')[0]; +const body = document.querySelectorAll('html > body')[0]; + +assert(html && head && body); +``` + +You should have a `title` element within the `head` element that contains the text +`The Odin Recipes`. + +```js +assert(document.querySelectorAll('HEAD > TITLE')[0].innerText == 'The Odin Recipes'); +``` + +You should have a `h1` element within your `body` element that contains the text +`Creamy Chocolate Fudge`. + +```js +assert(document.querySelectorAll('BODY > H1')[0].innerText == 'Creamy Chocolate Fudge'); +``` + +You should have an image with the url `*placeholder-fcc-cdn*` with an `alt` attribute that has +a fitting text. + +```js +const img = document.querySelectorAll('IMG')[0]; + +assert(img && img.alt !='' && img.src === 'https://i.imgur.com/p0J5baJ.jpg') +``` + +You should have an `h2` element with the text `Description`. + +```js +const h2 = document.querySelectorAll('H2')[0]; + +assert(h2.innerText == 'Description'); +``` + +You should have at least two `p` elements describing the recipe. + +```js +const paragraphs = document.querySelectorAll('P'); + +assert(paragraphs.length > 1); +``` + +You should have an `h2` element with the text `Ingredients`. + +```js +const h2 = document.querySelectorAll('H2')[1]; + +assert(h2.innerText == 'Ingredients'); +``` + +You should have an unordered list `
                                                                                                      ` with some ingredients as the list items `
                                                                                                    • `. + +```js +const unorderedList = document.querySelectorAll('UL')[0]; +const listItems = document.querySelectorAll('UL > LI'); + +assert(unorderedList && listItems && listItems.length > 1); +``` + +You should have an `h2` element with the text `Steps`. + +```js +const h2 = document.querySelectorAll('H2')[2]; + +assert(h2.innerText == 'Steps'); +``` + +You should have a `
                                                                                                        ` with the the steps as the list items `
                                                                                                      1. `. + +```js +const orderedList = document.querySelectorAll('OL')[0]; +const listItems = document.querySelectorAll('OL > LI'); + +assert(orderedList && listItems && listItems.length > 1); +``` + +You should have an `h2` element with the text `More Recipes`. + +```js +const h2 = document.querySelectorAll('H2')[3]; + +assert(h2.innerText == 'More Recipes'); +``` + +You should have an unordered list `
                                                                                                          ` element with list items `
                                                                                                        • ` that contain `` tags which lead to other recipes. + +```js +const unorderedList = document.querySelectorAll('UL')[1]; +const listItems = unorderedList.querySelectorAll('LI'); + +const allAreListItems = unorderedList.children.length == listItems.length; + +const containsAnchors = [...listItems].every(function(listItem) { + return listItem.querySelector("a") !== null; +}); + +assert(unorderedList && allAreListItems && containsAnchors && listItems.length > 1); +``` + +Your anchor tags linking to the recipes should have a `href` attribute with the value set to `#` + +```js +const anchorTags = document.querySelectorAll("a"); + +const allAnchorsHaveHrefHash = [...anchorTags].every(function(anchorTag) { + return anchorTag.hasAttribute("href") && anchorTag.getAttribute("href") === "#"; +}); + +assert(allAnchorsHaveHrefHash && anchorTags.length > 0); +``` + +# --seed-- + +## --seed-contents-- + +```html + +``` + +```css + +``` + +## --solutions-- + +```html + + + + The Odin Recipes + + +

                                                                                                          Creamy Chocolate Fudge

                                                                                                          + A delicious chocolate fudge dessert +

                                                                                                          Description

                                                                                                          +

                                                                                                          This recipe is for a rich and creamy chocolate fudge that is sure to satisfy your sweet tooth. It's perfect for a special occasion or as a tasty treat for any time of the year.

                                                                                                          +

                                                                                                          This recipe is easy to follow and only requires a few simple ingredients. With just a few steps, you'll be able to create a delicious dessert that everyone will love.

                                                                                                          +

                                                                                                          Ingredients

                                                                                                          +
                                                                                                            +
                                                                                                          • 1 cup sugar
                                                                                                          • +
                                                                                                          • 1/2 cup unsalted butter
                                                                                                          • +
                                                                                                          • 1/4 cup milk
                                                                                                          • +
                                                                                                          • 1/4 cup cocoa powder
                                                                                                          • +
                                                                                                          • 1/4 cup chocolate chips
                                                                                                          • +
                                                                                                          • 1/4 tsp salt
                                                                                                          • +
                                                                                                          • 1 tsp vanilla extract
                                                                                                          • +
                                                                                                          +

                                                                                                          Steps

                                                                                                          +
                                                                                                            +
                                                                                                          1. In a medium saucepan, melt the butter over medium heat.
                                                                                                          2. +
                                                                                                          3. Add the sugar, milk, cocoa powder, and salt to the saucepan and stir until well combined.
                                                                                                          4. +
                                                                                                          5. Bring the mixture to a boil, stirring constantly, and then reduce the heat to low and simmer for 5 minutes.
                                                                                                          6. +
                                                                                                          7. Remove the saucepan from the heat and stir in the chocolate chips and vanilla extract until the chocolate is melted and the mixture is smooth.
                                                                                                          8. +
                                                                                                          9. Pour the fudge into a greased 8-inch square pan and let it cool completely before cutting into squares.
                                                                                                          10. +
                                                                                                          +

                                                                                                          More Recipes

                                                                                                          +
                                                                                                          + + +``` diff --git a/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-a.md b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-a.md new file mode 100644 index 00000000000..db2821856ac --- /dev/null +++ b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-a.md @@ -0,0 +1,64 @@ +--- +id: 637f4e3e72c65bc8e73dfe24 +videoId: kcHKFZBVtf4 +title: Understand Ordered and Unordered List Question A +challengeType: 15 +dashedName: understand-ordered-and-unordered-list-question-a +--- +# --description-- + +If you want to have a list of items where the order doesn’t matter, like a shopping list of items that can be bought in any order, then you can use an unordered list. + +Unordered lists are created using the `
                                                                                                            ` element, and each item within the list is created using the list item element `
                                                                                                          • `. + +Each list item in an unordered list begins with a bullet point: + + + +If you instead want to create a list of items where the order does matter, like step-by-step instructions for a recipe, or your top 10 favorite TV shows, then you can use an ordered list. + +Ordered lists are created using the `
                                                                                                              ` element. Each individual item in them is again created using the list item element `
                                                                                                            1. `. However, each list item in an ordered list begins with a number instead: + + + +# --question-- + +## --assignment-- + +Watch the first three minutes of Kevin Powell's video on Ordered and Unordered lists above. + +--- + +Make an unordered shopping list of your favorite foods. + +--- + +Make an ordered list of todo’s you need to get done today. + +--- + +Make an unordered list of places you’d like to visit someday. + +--- + +Make an ordered list of your all time top 5 favorite video games or movies. + +## --text-- + +What HTML tag is used to create an unordered list? + +## --answers-- + +`
                                                                                                            2. ` + +--- + +`
                                                                                                                ` + +--- + +`
                                                                                                                  ` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-b.md b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-b.md new file mode 100644 index 00000000000..e76a6a5eb31 --- /dev/null +++ b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-b.md @@ -0,0 +1,44 @@ +--- +id: 637f4e4672c65bc8e73dfe25 +videoId: LGQuIIv2RVA +title: Understand Ordered and Unordered List Question B +challengeType: 15 +dashedName: understand-ordered-and-unordered-list-question-b +--- +# --description-- + +If you want to have a list of items where the order doesn’t matter, like a shopping list of items that can be bought in any order, then you can use an unordered list. + +Unordered lists are created using the `
                                                                                                                    ` element, and each item within the list is created using the list item element `
                                                                                                                  • `. + +Each list item in an unordered list begins with a bullet point: + + + +If you instead want to create a list of items where the order does matter, like step-by-step instructions for a recipe, or your top 10 favorite TV shows, then you can use an ordered list. + +Ordered lists are created using the `
                                                                                                                      ` element. Each individual item in them is again created using the list item element `
                                                                                                                    1. `. However, each list item in an ordered list begins with a number instead: + + + +# --question-- + +## --text-- + +What HTML tag is used to create an ordered list? + +## --answers-- + +`
                                                                                                                        ` + +--- + +`
                                                                                                                      1. ` + +--- + +`
                                                                                                                          ` + +## --video-solution-- + +1 diff --git a/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-c.md b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-c.md new file mode 100644 index 00000000000..a516984c0b6 --- /dev/null +++ b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-c.md @@ -0,0 +1,44 @@ +--- +id: 637f4e5172c65bc8e73dfe26 +videoId: LGQuIIv2RVA +title: Understand Ordered and Unordered List Question C +challengeType: 15 +dashedName: understand-ordered-and-unordered-list-question-c +--- +# --description-- + +If you want to have a list of items where the order doesn’t matter, like a shopping list of items that can be bought in any order, then you can use an unordered list. + +Unordered lists are created using the `
                                                                                                                            ` element, and each item within the list is created using the list item element `
                                                                                                                          • `. + +Each list item in an unordered list begins with a bullet point: + + + +If you instead want to create a list of items where the order does matter, like step-by-step instructions for a recipe, or your top 10 favorite TV shows, then you can use an ordered list. + +Ordered lists are created using the `
                                                                                                                              ` element. Each individual item in them is again created using the list item element `
                                                                                                                            1. `. However, each list item in an ordered list begins with a number instead: + + + +# --question-- + +## --text-- + +What HTML tag is used to create list items within both unordered and ordered lists? + +## --answers-- + +`
                                                                                                                                ` + +--- + +`
                                                                                                                              1. ` + +--- + +`
                                                                                                                                  ` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/working-with-text-question-a.md b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/working-with-text-question-a.md new file mode 100644 index 00000000000..c5ea3792d82 --- /dev/null +++ b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/working-with-text-question-a.md @@ -0,0 +1,59 @@ +--- +id: 637f4e5872c65bc8e73dfe27 +videoId: yqcd-XkxZNM +title: Working With Text Question A +challengeType: 15 +dashedName: working-with-text-question-a +--- +# --description-- + +What would you expect the following text to output on an HTML page? + +```html + + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor + incididunt ut labore et dolore magna aliqua. + + Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris + nisi ut aliquip ex ea commodo consequat. + +``` + +It looks like two paragraphs of text, and so you might expect it to display in that way. However that is not the case, as you can see in the output below: + + + +When the browser encounters new lines like this in your HTML, it will compress them down into one single space. The result of this compression is that all of the text is clumped together into one long line. + +If you want to create paragraphs in HTML, you need to use the paragraph element, which will add a newline after each of your paragraphs. A paragraph element is defined by wrapping text content with a `

                                                                                                                                  ` tag. + +Changing our example from before to use paragraph elements fixes the issue: + + + +# --question-- + +## --assignment-- + +Watch and follow along to Kevin Powell’s HTML Paragraph and Headings Video above. + +## --text-- + +How do you create a paragraph in HTML? + +## --answers-- + +`

                                                                                                                                  This is a paragraph

                                                                                                                                  ` + +--- + +`

                                                                                                                                  This is a paragraph

                                                                                                                                  ` + +--- + +`This is a paragraph` + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/working-with-text-question-b.md b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/working-with-text-question-b.md new file mode 100644 index 00000000000..2dba9270a58 --- /dev/null +++ b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/working-with-text-question-b.md @@ -0,0 +1,39 @@ +--- +id: 637f4e5f72c65bc8e73dfe28 +videoId: yqcd-XkxZNM +title: Working With Text Question B +challengeType: 15 +dashedName: working-with-text-question-b +--- +# --description-- + +Headings are different from other HTML text elements: they are displayed larger and bolder than other text to signify that they are headings. + +There are 6 different levels of headings starting from `

                                                                                                                                  ` to `

                                                                                                                                  `. The number within a heading tag represents that heading’s level. The largest and most important heading is `h1`, while `h6` is the tiniest heading at the lowest level. + +Headings are defined much like paragraphs. For example, to create an `h1` heading, we wrap our heading text in a `

                                                                                                                                  ` tag. + + + +Using the correct level of heading is important as levels provide a hierarchy to the content. An `h1` heading should always be used for the heading of the overall page, and the lower level headings should be used as the headings for content in smaller sections of the page. + +# --question-- +## --text-- + +How many different levels of headings are there and what is the difference between them? + +## --answers-- + +There are 5 different levels of headings. `h5` is the smallest and least important heading, and `h1` is the largest and most important heading. + +--- + +There are 6 different levels of headings. `h6` is the largest and most important heading, and `h1` is the smallest and least important heading. + +--- + +There are 6 different levels of headings. `h1` is the largest and most important heading, and `h6` is the smallest and least important heading. + +## --video-solution-- + +3 diff --git a/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/working-with-text-question-c.md b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/working-with-text-question-c.md new file mode 100644 index 00000000000..d0d5e42a90d --- /dev/null +++ b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/working-with-text-question-c.md @@ -0,0 +1,46 @@ +--- +id: 637f4e6672c65bc8e73dfe29 +videoId: gW6cBZLUk6M +title: Working With Text Question C +challengeType: 15 +dashedName: working-with-text-question-c +--- +# --description-- + +The `` element makes text bold. It also semantically marks text as important; this affects tools, like screen readers, that users with visual impairments will rely on to use your website. The tone of voice on some screen readers will change to communicate the importance of the text within a `strong` element. To define a `strong` element you wrap text content in a `` tag. + +You can use `strong` on its own: + + + +But you will probably find yourself using the `strong` element much more in combination with other text elements, like this: + + + +Sometimes you will want to make text bold without giving it an important meaning. You’ll learn how to do that in the CSS lessons later in the curriculum. + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s HTML Bold and Italic Text Video above. + +## --text-- + +What element should you use to make text bold and important? + +## --answers-- + +`This is an important message` + +--- + +`

                                                                                                                                  This is an important message

                                                                                                                                  ` + +--- + +`This is an important message` + +## --video-solution-- + +3 diff --git a/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/working-with-text-question-d.md b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/working-with-text-question-d.md new file mode 100644 index 00000000000..c62a07be49c --- /dev/null +++ b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/working-with-text-question-d.md @@ -0,0 +1,38 @@ +--- +id: 637f4e6e72c65bc8e73dfe2a +videoId: gW6cBZLUk6M +title: Working With Text Question D +challengeType: 15 +dashedName: working-with-text-question-d +--- +# --description-- + +The `em` element makes text italic. It also semantically places emphasis on the text, which again may affect things like screen readers. To define an emphasized element you wrap text content in a `` tag. + +To use `em` on its own: + + +Again, like the `strong` element, you will find yourself mostly using the `em` element with other text elements: + + + +# --question-- +## --text-- + +What element should you use to make text italicized to add emphasis? + +## --answers-- + +`This is an italic message` + +--- + +`This is an italic message` + +--- + +`This is an italic message` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/working-with-text-question-e.md b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/working-with-text-question-e.md new file mode 100644 index 00000000000..6de9507ef92 --- /dev/null +++ b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/working-with-text-question-e.md @@ -0,0 +1,65 @@ +--- +id: 637f4e7972c65bc8e73dfe2b +videoId: gW6cBZLUk6M +title: Working With Text Question E +challengeType: 15 +dashedName: working-with-text-question-e +--- +# --description-- + +You may have noticed that in all the examples in this lesson you indent any elements that are within other elements. This is known as nesting elements. + +When you nest elements within other elements, you create a parent and child relationship between them. The nested elements are the children and the element they are nested within is the parent. + +In the following example, the `body` element is the parent and the `p` is the child: + +```html + + + + +

                                                                                                                                  Lorem ipsum dolor sit amet.

                                                                                                                                  + + +``` + +Just as in human relationships, HTML parent elements can have many children. Elements at the same level of nesting are considered to be siblings. + +For example, the two `p` elements in the following code are siblings, since they are both children of the `body` tag and are at the same level of nesting as each other: + +```html + + + + +

                                                                                                                                  Lorem ipsum dolor sit amet.

                                                                                                                                  +

                                                                                                                                  Ut enim ad minim veniam.

                                                                                                                                  + + +``` + +You use indentation to make the level of nesting clear and readable for yourselves and other developers who will work with your HTML in the future. It is recommended to indent any child elements by two spaces. + +The parent, child, and sibling relationships between elements will become much more important later when you start styling your HTML with CSS and adding behavior with JavaScript. For now, however, it is just important to know the distinction between how elements are related and the terminology used to describe their relationships. + +# --question-- + +## --text-- + +What relationship do two elements have if they are at the same level of nesting? + +## --answers-- + +The elements are each other's parents. + +--- + +The elements are each other's children. + +--- + +The elements are siblings. + +## --video-solution-- + +3 diff --git a/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/working-with-text-question-f.md b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/working-with-text-question-f.md new file mode 100644 index 00000000000..f7d550a413a --- /dev/null +++ b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/working-with-text-question-f.md @@ -0,0 +1,66 @@ +--- +id: 637f4e8072c65bc8e73dfe2c +videoId: gW6cBZLUk6M +title: Working With Text Question F +challengeType: 15 +dashedName: working-with-text-question-f +--- +# --description-- + +You may have noticed that in all the examples in this lesson you indent any elements that are within other elements. This is known as nesting elements. + +When you nest elements within other elements, you create a parent and child relationship between them. The nested elements are the children and the element they are nested within is the parent. + +In the following example, the body element is the parent and the paragraph is the child: + +```html + + + + +

                                                                                                                                  Lorem ipsum dolor sit amet.

                                                                                                                                  + + +``` + +Just as in human relationships, HTML parent elements can have many children. Elements at the same level of nesting are considered to be siblings. + +For example, the two paragraphs in the following code are siblings, since they are both children of the body tag and are at the same level of nesting as each other: + +```html + + + + +

                                                                                                                                  Lorem ipsum dolor sit amet.

                                                                                                                                  +

                                                                                                                                  Ut enim ad minim veniam.

                                                                                                                                  + + +``` + +You use indentation to make the level of nesting clear and readable for yourselves and other developers who will work with your HTML in the future. It is recommended to indent any child elements by two spaces. + +The parent, child, and sibling relationships between elements will become much more important later when you start styling your HTML with CSS and adding behavior with JavaScript. For now, however, it is just important to know the distinction between how elements are related and the terminology used to describe their relationships. + +# --question-- + +## --text-- + +What relationship does an element have with any nested element within it? + +## --answers-- + +The element within the other element is called the parent element. + +--- + +The element within the other element is called the child element. + +--- + +The element within the other element is called the sibling element. + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/working-with-text-question-g.md b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/working-with-text-question-g.md new file mode 100644 index 00000000000..c85ec0d8e9f --- /dev/null +++ b/curriculum/challenges/english/10-coding-interview-prep/the-odin-project/working-with-text-question-g.md @@ -0,0 +1,48 @@ +--- +id: 637f4e8772c65bc8e73dfe2d +videoId: gW6cBZLUk6M +title: Working With Text Question G +challengeType: 15 +dashedName: working-with-text-question-g +--- +# --description-- + +HTML comments are not visible to the browser; they allow us to comment on your code so that other developers or your future selves can read them and get some context about something that might not be clear in the code. + +Writing an HTML comment is simple: You just enclose the comment with ``tags. For example: + +```html +

                                                                                                                                  View the html to see the hidden comments

                                                                                                                                  + + + +

                                                                                                                                  Some paragraph text

                                                                                                                                  + + +``` + +# --question-- + +## --assignment-- + +To get some practice working with text in HTML, create a plain blog article page which uses different headings, uses paragraphs, and has some text in the paragraphs bolded and italicized. You can use [Lorem Ipsum](https://loremipsum.io) to generate dummy text, in place of real text as you build your sites. + +## --text-- + +How do you create HTML comments? + +## --answers-- + +`/* This is an HTML comment */` + +--- + +`` + +--- + +`<-- This is an HTML comment --!>` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d1ac33c68d27dcda5796.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d1ac33c68d27dcda5796.md index a07fa582a50..cdd348db03a 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d1ac33c68d27dcda5796.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d1ac33c68d27dcda5796.md @@ -14,13 +14,25 @@ Rotate the `.back-mountain` element by `45deg` clockwise. Then, give it a `left` You should use the `transform` property to rotate the element. ```js -assert.notEmpty(new __helpers.CSSHelp(document).getStyle('.back-mountain')?.transform); +const backMountain = new __helpers.CSSHelp(document).getStyle('.back-mountain'); + +if (backMountain?.transform) { + assert.notEmpty(backMountain?.transform); +} else { + assert.notEmpty(backMountain?.rotate); +} ``` You should give `.back-mountain` a `transform` of `--fcc-expected--`, but found `--fcc-actual--`. ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.back-mountain')?.transform, 'rotate(45deg)'); +const backMountain = new __helpers.CSSHelp(document).getStyle('.back-mountain'); + +if (backMountain?.transform) { + assert.equal(backMountain?.transform, 'rotate(45deg)'); +} else { + assert.equal(backMountain?.rotate, '45deg'); +} ``` You should give `.back-mountain` a `left` property. diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d229b0e542520cd91c685.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d229b0e542520cd91c685.md index 489c0b1e673..003b9709c0e 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d229b0e542520cd91c685.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d229b0e542520cd91c685.md @@ -14,13 +14,25 @@ To make the penguin's feet look more _penguiny_, rotate the left foot by `80deg` You should give `.foot.left` a `transform` of `rotate(80deg)`. ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.foot.left').getPropVal('transform', true), 'rotate(80deg)'); +const leftFoot = new __helpers.CSSHelp(document).getStyle('.foot.left'); + +if (leftFoot?.transform) { + assert.equal(leftFoot.getPropVal('transform', true), 'rotate(80deg)'); +} else { + assert.equal(leftFoot.getPropVal('rotate', true), '80deg'); +} ``` You should give `.foot.right` a `transform` of `rotate(-80deg)`. ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.foot.right').getPropVal('transform', true), 'rotate(-80deg)'); +const rightFoot = new __helpers.CSSHelp(document).getStyle('.foot.right'); + +if (rightFoot?.transform) { + assert.equal(rightFoot.getPropVal('transform', true), 'rotate(-80deg)'); +} else { + assert.equal(rightFoot.getPropVal('rotate', true), '-80deg'); +} ``` # --seed-- diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2d4e80400325ff89664a.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2d4e80400325ff89664a.md index 403a1e0cbba..ce148c7f626 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2d4e80400325ff89664a.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2d4e80400325ff89664a.md @@ -14,7 +14,14 @@ To keep the linear gradient on the correct side of the penguin's left arm, first You should give `.arm.left` a `transform` of `rotate(130deg) scaleX(-1)`. ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.arm.left').getPropVal('transform', true), 'rotate(130deg)scaleX(-1)'); +const leftArm = new __helpers.CSSHelp(document).getStyle('.arm.left'); + +if (leftArm?.rotate && leftArm?.transform) { + assert.equal(leftArm.getPropVal('rotate', true), '130deg'); + assert.equal(leftArm.getPropVal('transform', true), 'scaleX(-1)'); +} else { + assert.equal(leftArm.getPropVal('transform', true), 'rotate(130deg)scaleX(-1)'); +} ``` # --seed-- @@ -281,7 +288,6 @@ body { top: 35%; left: 5%; transform-origin: top left; - } --fcc-editable-region-- diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2ebc81ba81271460850d.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2ebc81ba81271460850d.md index 1a3b8e3cf6b..7b8d308ed34 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2ebc81ba81271460850d.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2ebc81ba81271460850d.md @@ -14,7 +14,13 @@ Rotate the right arm by `45deg` counterclockwise. You should give `.arm.right` a `transform` of `rotate(-45deg)`. ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.arm.right')?.getPropVal('transform', true), 'rotate(-45deg)'); +const rightArm = new __helpers.CSSHelp(document).getStyle('.arm.right'); + +if (rightArm?.transform) { + assert.equal(rightArm?.getPropVal('transform', true), 'rotate(-45deg)'); +} else { + assert.equal(rightArm?.getPropVal('rotate', true), '-45deg'); +} ``` # --seed-- @@ -287,7 +293,6 @@ body { .arm.right { top: 0%; right: -5%; - } --fcc-editable-region-- diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d32c7fa21f32aaa91d499.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d32c7fa21f32aaa91d499.md index e69b8ec5ec3..74235426b56 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d32c7fa21f32aaa91d499.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d32c7fa21f32aaa91d499.md @@ -14,7 +14,16 @@ Within the first waypoint, rotate to `110deg`, and retain the scaling of the lef You should give the `10%` waypoint a `transform` of `rotate(110deg) scaleX(-1)`. ```js -assert([...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '10%')?.style?.transform?.replace(/\s+/g, '') === 'rotate(110deg)scaleX(-1)'); +const wave10Percent = [...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '10%'); +const rotateProp = wave10Percent?.style?.rotate?.replace(/\s+/g, ''); +const transformProp = wave10Percent?.style?.transform?.replace(/\s+/g, ''); + +if (rotateProp && transformProp) { + assert(rotateProp === '110deg'); + assert(transformProp === 'scaleX(-1)'); +} else { + assert(transformProp === 'rotate(110deg)scaleX(-1)'); +} ``` # --seed-- diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d333b738e3c2b5d58b095.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d333b738e3c2b5d58b095.md index 8616f720202..ac97b33ea2a 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d333b738e3c2b5d58b095.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d333b738e3c2b5d58b095.md @@ -14,7 +14,16 @@ Within the second waypoint, rotate to `130deg`, and retain the scaling of the le You should give the `20%` waypoint a `transform` of `rotate(130deg) scaleX(-1)`. ```js -assert([...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '20%')?.style?.transform?.replace(/\s+/g, '') === 'rotate(130deg)scaleX(-1)'); +const wave20Percent = [...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '20%'); +const transformProp = wave20Percent?.style?.transform?.replace(/\s+/g, ''); +const rotateProp = wave20Percent?.style?.rotate?.replace(/\s+/g, ''); + +if (rotateProp && transformProp) { + assert(rotateProp === '130deg'); + assert(transformProp === 'scaleX(-1)'); +} else { + assert(transformProp === 'rotate(130deg)scaleX(-1)'); +} ``` # --seed-- diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d337765b9f02c10e93722.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d337765b9f02c10e93722.md index 5a7f861b8cb..fd1c9193d00 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d337765b9f02c10e93722.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d337765b9f02c10e93722.md @@ -14,13 +14,31 @@ For the third and fourth waypoints, repeat the `transform` pattern once more. You should give the `30%` waypoint a `transform` of `rotate(110deg) scaleX(-1)`. ```js -assert([...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '30%')?.style?.transform?.replace(/\s+/g, '') === 'rotate(110deg)scaleX(-1)'); +const wave30Percent = [...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '30%'); +const transformProp = wave30Percent?.style?.transform?.replace(/\s+/g, ''); +const rotateProp = wave30Percent?.style?.rotate?.replace(/\s+/g, ''); + +if (rotateProp && transformProp) { + assert(rotateProp === '110deg'); + assert(transformProp === 'scaleX(-1)'); +} else { + assert(transformProp === 'rotate(110deg)scaleX(-1)'); +} ``` You should give the `40%` waypoint a `transform` of `rotate(130deg) scaleX(-1)`. ```js -assert([...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '40%')?.style?.transform?.replace(/\s+/g, '') === 'rotate(130deg)scaleX(-1)'); +const wave40Percent = [...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '40%'); +const transformProp = wave40Percent?.style?.transform?.replace(/\s+/g, ''); +const rotateProp = wave40Percent?.style?.rotate?.replace(/\s+/g, ''); + +if (rotateProp && transformProp) { + assert(rotateProp === '130deg'); + assert(transformProp === 'scaleX(-1)'); +} else { + assert(transformProp === 'rotate(130deg)scaleX(-1)'); +} ``` # --seed-- diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa2407b521be39a3de7be1.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa2407b521be39a3de7be1.md index 132db783a03..c9922875209 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa2407b521be39a3de7be1.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa2407b521be39a3de7be1.md @@ -45,7 +45,7 @@ assert(document.querySelector('a').getAttribute('target') === '_blank');

                                                                                                                                  Cat Photos

                                                                                                                                  --fcc-editable-region-- -

                                                                                                                                  See more cat photos in our gallery.

                                                                                                                                  +

                                                                                                                                  See more cat photos in our gallery.

                                                                                                                                  --fcc-editable-region-- A cute orange cat lying on its back. diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2abbe7d18d49a1e0e1c8.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2abbe7d18d49a1e0e1c8.md index 4526afe38b1..750166024ce 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2abbe7d18d49a1e0e1c8.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2abbe7d18d49a1e0e1c8.md @@ -39,13 +39,15 @@ assert(document.querySelector('h1')?.innerText === 'Nutrition Facts'); --fcc-editable-region-- - - - Nutrition Label - - - + + + Nutrition Label + + + + + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2d4150fe0d4cbd0f2628.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2d4150fe0d4cbd0f2628.md index 11b8188cc98..fad9ec93bdc 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2d4150fe0d4cbd0f2628.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2d4150fe0d4cbd0f2628.md @@ -43,14 +43,16 @@ assert(document.querySelector('p')?.innerText === '8 servings per container'); --fcc-editable-region-- - - - Nutrition Label - - -

                                                                                                                                  Nutrition Facts

                                                                                                                                  - + + + Nutrition Label + + + +

                                                                                                                                  Nutrition Facts

                                                                                                                                  + + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34948891834dd77655a6.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34948891834dd77655a6.md index 94213e09246..b01720ed23b 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34948891834dd77655a6.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34948891834dd77655a6.md @@ -43,15 +43,17 @@ assert(document.querySelectorAll('p')?.[1]?.innerText === 'Serving size 2/3 cup --fcc-editable-region-- - - - Nutrition Label - - -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  + + + + Nutrition Label + + + +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  - + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34ecc1091b4fd5a8a484.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34ecc1091b4fd5a8a484.md index 76f425c598b..4abe85efccd 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34ecc1091b4fd5a8a484.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34ecc1091b4fd5a8a484.md @@ -49,16 +49,18 @@ assert(links.find(link => link?.getAttribute('href') === 'https://fonts.googleap --fcc-editable-region-- - - - Nutrition Label - - -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  - + + + Nutrition Label + + + + +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f357957e370510f21ea16.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f357957e370510f21ea16.md index ad1b189bed0..d66790fd30c 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f357957e370510f21ea16.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f357957e370510f21ea16.md @@ -32,17 +32,19 @@ assert(new __helpers.CSSHelp(document).getStyle('body')?.fontFamily === '"Open S ```html - - - Nutrition Label - - - - -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  - + + + + Nutrition Label + + + + + +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  + ``` diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f378014c2da526a109c81.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f378014c2da526a109c81.md index 52a336e0522..82f736ff482 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f378014c2da526a109c81.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f378014c2da526a109c81.md @@ -30,17 +30,19 @@ assert(new __helpers.CSSHelp(document).getStyle('html')?.fontSize === '16px'); ```html - - - Nutrition Label - - - - -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  - + + + + Nutrition Label + + + + + +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  + ``` diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38279e5c3d53692ea441.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38279e5c3d53692ea441.md index 96e33cc1a34..6ceffde0472 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38279e5c3d53692ea441.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38279e5c3d53692ea441.md @@ -37,18 +37,20 @@ assert(children?.every(child => child?.parentElement?.classList?.contains('label ```html - - - Nutrition Label - - - + + + + Nutrition Label + + + + --fcc-editable-region-- - -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  - + +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38cabc64e3556f98cc1a.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38cabc64e3556f98cc1a.md index 13f5f2593b8..1ea4ac044af 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38cabc64e3556f98cc1a.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38cabc64e3556f98cc1a.md @@ -32,19 +32,21 @@ assert(new __helpers.CSSHelp(document).getStyle('.label')?.border === '2px solid ```html - - - Nutrition Label - - - - -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  + ``` diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3949f58e12577dcefb00.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3949f58e12577dcefb00.md index 9f08de011e6..e436f20dcdf 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3949f58e12577dcefb00.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3949f58e12577dcefb00.md @@ -26,19 +26,21 @@ assert(new __helpers.CSSHelp(document).getStyle('.label')?.width === '270px'); ```html - - - Nutrition Label - - - - -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  + ``` diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f39d7da41b15851fa3fb9.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f39d7da41b15851fa3fb9.md index f273bf9a263..ca537494642 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f39d7da41b15851fa3fb9.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f39d7da41b15851fa3fb9.md @@ -30,19 +30,21 @@ assert(new __helpers.CSSHelp(document).getStyle('.label')?.padding === '0px 7px' ```html - - - Nutrition Label - - - - -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  + ``` diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3b091162165948e1cb33.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3b091162165948e1cb33.md index 63304b702e4..694a4e9ff3d 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3b091162165948e1cb33.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3b091162165948e1cb33.md @@ -32,19 +32,21 @@ assert(new __helpers.CSSHelp(document).getStyle('*')?.boxSizing === 'border-box' ```html - - - Nutrition Label - - - - -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  + ``` diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3cafd794015aa9547a6d.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3cafd794015aa9547a6d.md index cb116abcc95..84ea6cab71b 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3cafd794015aa9547a6d.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3cafd794015aa9547a6d.md @@ -32,19 +32,21 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')?.fontWeight === '800'); ```html - - - Nutrition Label - - - - -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  + ``` diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3d9e59db4b5b8e960762.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3d9e59db4b5b8e960762.md index 43f69ec85a5..fe53466124c 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3d9e59db4b5b8e960762.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3d9e59db4b5b8e960762.md @@ -24,19 +24,21 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')?.textAlign === 'center'); ```html - - - Nutrition Label - - - - -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  + ``` diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e1b7233ee5c7595771f.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e1b7233ee5c7595771f.md index a0c09b066dc..0c437fb4e88 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e1b7233ee5c7595771f.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e1b7233ee5c7595771f.md @@ -24,19 +24,21 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')?.margin === '-4px 0px'); ```html - - - Nutrition Label - - - - -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  + ``` diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e4af8008c5d494d3afe.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e4af8008c5d494d3afe.md index 475d0849491..2448838c5f4 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e4af8008c5d494d3afe.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e4af8008c5d494d3afe.md @@ -30,19 +30,21 @@ assert(new __helpers.CSSHelp(document).getStyle('p')?.margin === '0px'); ```html - - - Nutrition Label - - - - -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  + ``` diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3ed16592445e57941aec.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3ed16592445e57941aec.md index 56ea0615281..53f6d70c156 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3ed16592445e57941aec.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3ed16592445e57941aec.md @@ -44,21 +44,23 @@ assert(document.querySelector('.divider')?.previousElementSibling?.localName === ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  --fcc-editable-region-- - + ``` diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f405b89a7ec5f8e2d11f4.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f405b89a7ec5f8e2d11f4.md index 84de4ac6133..f8e43c0a290 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f405b89a7ec5f8e2d11f4.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f405b89a7ec5f8e2d11f4.md @@ -36,20 +36,22 @@ assert(new __helpers.CSSHelp(document).getStyle('.divider')?.margin === '2px 0px ```html - - - Nutrition Label - - - - -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  + ``` diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f40b01f680e608d360ed4.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f40b01f680e608d360ed4.md index 79da01c2a7f..aa3594ecc59 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f40b01f680e608d360ed4.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f40b01f680e608d360ed4.md @@ -26,20 +26,22 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')?.letterSpacing === '0.15px ```html - - - Nutrition Label - - - - -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  + ``` diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4172e9eec061d6456221.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4172e9eec061d6456221.md index 9fea5c17ce0..a1f84535ff9 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4172e9eec061d6456221.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4172e9eec061d6456221.md @@ -32,22 +32,24 @@ assert(!document.querySelector('p')?.classList?.contains('bold')); ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  --fcc-editable-region-- - + ``` diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f41c979787462e76dab90.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f41c979787462e76dab90.md index 56e13a5ed71..bcbaaf757a2 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f41c979787462e76dab90.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f41c979787462e76dab90.md @@ -44,20 +44,22 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')); ```html - - - Nutrition Label - - - - -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  + ``` diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f423cf65d5864132a0956.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f423cf65d5864132a0956.md index de2bc32eb1e..05d8bb75624 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f423cf65d5864132a0956.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f423cf65d5864132a0956.md @@ -24,22 +24,24 @@ assert(document.querySelector('h1')?.classList?.contains('bold')); ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  --fcc-editable-region-- - + ``` diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f42a021625f656101ef93.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f42a021625f656101ef93.md index 11cdbeaca13..64189f1570a 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f42a021625f656101ef93.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f42a021625f656101ef93.md @@ -9,7 +9,7 @@ dashedName: step-22 Horizontal spacing between equally important elements can increase the readability of your text. -Wrap the text `2/3 cup (55g)` in a `span` element, and give it a `class` attribute set to `right`. +Wrap the text `2/3 cup (55g)` in a `span` element. # --hints-- @@ -19,12 +19,6 @@ You should create a new `span` element. assert(document.querySelector('span')); ``` -Your new `span` element should have the `class` attribute set to `right`. - -```js -assert(document.querySelector('span')?.classList?.contains('right')); -``` - Your `span` element should have the text `2/3 cup (55g)`. ```js @@ -44,22 +38,24 @@ assert(document.querySelectorAll('p')?.[1]?.innerText === 'Serving size 2/3 cup ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  --fcc-editable-region-- - + ``` diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4bfb9de4a16703b56eb6.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4bfb9de4a16703b56eb6.md index a827ed632ca..a1a3c1321f5 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4bfb9de4a16703b56eb6.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4bfb9de4a16703b56eb6.md @@ -7,22 +7,20 @@ dashedName: step-23 # --description-- -The `float` property is used to place an element on the left or right of its container, allowing other content (such as text) to wrap around it. - -Create a new `.right` selector and set the `float` property to `right`. +Now we can add the horizontal spacing using `flex`. In your `p` selector, add a `display` property set to `flex` and a `justify-content` property set to `space-between`. # --hints-- -You should create a new `.right` selector. +Your `p` selector should have a `display` property set to `flex`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.right')); +assert(new __helpers.CSSHelp(document).getStyle('p')?.display === 'flex'); ``` -Your `.right` selector should have a `float` property set to `right`. +Your `p` selector should have a `justify-content` property set to `space-between`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.right')?.float === 'right'); +assert(new __helpers.CSSHelp(document).getStyle('p')?.justifyContent === 'space-between'); ``` # --seed-- @@ -32,20 +30,22 @@ assert(new __helpers.CSSHelp(document).getStyle('.right')?.float === 'right'); ```html - - - Nutrition Label - - - - -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  + ``` @@ -75,9 +75,11 @@ h1 { letter-spacing: 0.15px } +--fcc-editable-region-- p { margin: 0; } +--fcc-editable-region-- .divider { border-bottom: 1px solid #888989; @@ -87,8 +89,4 @@ p { .bold { font-weight: 800; } - ---fcc-editable-region-- - ---fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ce9d877b668417c0c42.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ce9d877b668417c0c42.md index c613e7f30f1..4c960b72196 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ce9d877b668417c0c42.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ce9d877b668417c0c42.md @@ -40,22 +40,24 @@ assert(children?.[3]?.localName === 'p'); ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  --fcc-editable-region-- - + ``` @@ -87,6 +89,8 @@ h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -97,8 +101,4 @@ p { .bold { font-weight: 800; } - -.right { - float: right; -} ``` diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4dde9d72e3694cb9ee3b.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4dde9d72e3694cb9ee3b.md index d7c0c3f1f41..ea61500923f 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4dde9d72e3694cb9ee3b.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4dde9d72e3694cb9ee3b.md @@ -39,22 +39,24 @@ assert(style?.letterSpacing === '0.15px'); ```html - - - Nutrition Label - - - - -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  + ``` @@ -88,6 +90,8 @@ h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -98,8 +102,4 @@ p { .bold { font-weight: 800; } - -.right { - float: right; -} ``` diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ec58334106a4170c2a8.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ec58334106a4170c2a8.md index 2fd85ad3563..6830eadac2c 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ec58334106a4170c2a8.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ec58334106a4170c2a8.md @@ -7,7 +7,7 @@ dashedName: step-26 # --description-- -Create a new `div` element below your `header` element, and give it a `class` attribute set to `divider lg`. +Create a new `div` element below your `header` element, and give it a `class` attribute set to `divider large`. # --hints-- @@ -23,12 +23,12 @@ Your new `div` element should come after your `header` element. assert(document.querySelector('.label')?.lastElementChild?.localName === 'div'); ``` -Your new `div` element should have the `class` attribute set to `divider lg`. +Your new `div` element should have the `class` attribute set to `divider large`. ```js const div = document.querySelector('.label')?.lastElementChild; assert(div?.classList?.contains('divider')); -assert(div?.classList?.contains('lg')); +assert(div?.classList?.contains('large')); ``` # --seed-- @@ -38,25 +38,27 @@ assert(div?.classList?.contains('lg')); ```html - - - Nutrition Label - - - - -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  --fcc-editable-region-- --fcc-editable-region-- -
                                                                                                                                  - +
                                                                                                                                  + ``` @@ -88,6 +90,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -98,8 +102,4 @@ p { .bold { font-weight: 800; } - -.right { - float: right; -} ``` diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4f9e4a40566b776a8f38.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4f9e4a40566b776a8f38.md index 5b5d116e022..4fd89a7f1fa 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4f9e4a40566b776a8f38.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4f9e4a40566b776a8f38.md @@ -7,32 +7,32 @@ dashedName: step-27 # --description-- -Create a new `.lg` selector and give it a `height` property set to `10px`. Also create an `.lg, .md` selector and set the `background-color` property to `black`. +Create a new `.large` selector and give it a `height` property set to `10px`. Also create an `.large, .medium` selector and set the `background-color` property to `black`. # --hints-- -You should have a new `.lg` selector. +You should have a new `.large` selector. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg')); +assert(new __helpers.CSSHelp(document).getStyle('.large')); ``` -Your `.lg` selector should have a `height` property set to `10px`. +Your `.large` selector should have a `height` property set to `10px`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg')?.height === '10px'); +assert(new __helpers.CSSHelp(document).getStyle('.large')?.height === '10px'); ``` -You should have a new `.lg, .md` selector. +You should have a new `.large, .medium` selector. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')); +assert(new __helpers.CSSHelp(document).getStyle('.large, .medium')); ``` -Your `.lg, .md` selector should have a `background-color` property set to `black`. +Your `.large, .medium` selector should have a `background-color` property set to `black`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')?.backgroundColor === 'black'); +assert(new __helpers.CSSHelp(document).getStyle('.large, .medium')?.backgroundColor === 'black'); ``` # --seed-- @@ -42,23 +42,25 @@ assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')?.backgroundColor === ```html - - - Nutrition Label - - - - -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  + ``` @@ -90,6 +92,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -101,10 +105,6 @@ p { font-weight: 800; } -.right { - float: right; -} - --fcc-editable-region-- --fcc-editable-region-- diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f50473cc0196c6dd3892a.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f50473cc0196c6dd3892a.md index 156382a73d0..98326242dfd 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f50473cc0196c6dd3892a.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f50473cc0196c6dd3892a.md @@ -7,16 +7,16 @@ dashedName: step-28 # --description-- -You may notice there is still a small border at the bottom of your `.lg` element. To reset this, give your `.lg, .md` selector a `border` property set to `0`. +You may notice there is still a small border at the bottom of your `.large` element. To reset this, give your `.large, .medium` selector a `border` property set to `0`. -Note: the `md`(medium) class will be utilized in step 37 for the thinner bars of the nutrition label. +Note: the `medium`(medium) class will be utilized in step 37 for the thinner bars of the nutrition label. # --hints-- -Your `.lg, .md` selector should have a `border` property set to `0`. +Your `.large, .medium` selector should have a `border` property set to `0`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')?.borderWidth === '0px'); +assert(new __helpers.CSSHelp(document).getStyle('.large, .medium')?.borderWidth === '0px'); ``` # --seed-- @@ -26,23 +26,25 @@ assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')?.borderWidth === '0p ```html - - - Nutrition Label - - - - -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  + ``` @@ -74,6 +76,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -85,16 +89,12 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } --fcc-editable-region-- -.lg, .md { +.large, .medium { background-color: black; } --fcc-editable-region-- diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51257a8a516d80b6c743.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51257a8a516d80b6c743.md index cc1b6599b46..47197f64ccc 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51257a8a516d80b6c743.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51257a8a516d80b6c743.md @@ -7,7 +7,7 @@ dashedName: step-29 # --description-- -Create a new `div` below your `.lg` element and give it a `class` attribute set to `calories-info`. +Create a new `div` below your `.large` element and give it a `class` attribute set to `calories-info`. # --hints-- @@ -23,10 +23,10 @@ Your new `div` should have a `class` attribute set to `calories-info`. assert(document.querySelector('.label')?.lastElementChild?.classList?.contains('calories-info')); ``` -Your new `div` should come after the `.lg` element. +Your new `div` should come after the `.large` element. ```js -assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('lg')); +assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('large')); ``` # --seed-- @@ -36,26 +36,28 @@ assert(document.querySelector('.label')?.lastElementChild?.previousElementSiblin ```html - - - Nutrition Label - - - - -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  --fcc-editable-region-- --fcc-editable-region-- -
                                                                                                                                  - +
                                                                                                                                  + ``` @@ -87,6 +89,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -98,15 +102,11 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51e4e5b24a6e80eccce1.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51e4e5b24a6e80eccce1.md index b84b3468ee9..136c3e5dfc5 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51e4e5b24a6e80eccce1.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51e4e5b24a6e80eccce1.md @@ -7,27 +7,39 @@ dashedName: step-30 # --description-- -Within your `.calories-info` element, create a `p` element. Give that `p` element a `class` attribute set to `bold sm-text`, and the text `Amount per serving`. +Within your `.calories-info` element, create a `div` element. Give that `div` element a `class` attribute set to `left-container`. Within the newly created `div` element, create a `h2` element with the text `Amount per serving`. Give the `h2` element a `class` attribute set to `bold small-text`. # --hints-- -You should create a new `p` element within your `.calories-info` element. +You should create a new `div` element within your `.calories-info` element. ```js -assert(document.querySelector('.calories-info')?.children?.[0]?.localName === 'p'); +assert(document.querySelector('.calories-info')?.children?.[0]?.localName === 'div'); ``` -Your new `p` element should have a `class` attribute set to `bold sm-text`. +Your new `div` element should have a `class` attribute set to `left-container`. ```js -assert(document.querySelector('.calories-info')?.children?.[0]?.classList.contains('bold')); -assert(document.querySelector('.calories-info')?.children?.[0]?.classList.contains('sm-text')); +assert(document.querySelector('.calories-info')?.children?.[0]?.classList.contains('left-container')); ``` -Your new `p` element should have the text `Amount per serving`. +You should create a new `h2` element within your `.left-container` element. ```js -assert(document.querySelector('.calories-info')?.children?.[0]?.innerText === 'Amount per serving'); +assert(document.querySelector('.left-container')?.children?.[0]?.localName === 'h2'); +``` + +Your new `h2` element should have a `class` attribute set to `bold small-text`. + +```js +assert(document.querySelector('.left-container')?.children?.[0]?.classList.contains('bold')); +assert(document.querySelector('.left-container')?.children?.[0]?.classList.contains('small-text')); +``` + +Your new `h2` element should have the text `Amount per serving`. + +```js +assert(document.querySelector('.left-container')?.children?.[0]?.innerText === 'Amount per serving'); ``` # --seed-- @@ -37,28 +49,30 @@ assert(document.querySelector('.calories-info')?.children?.[0]?.innerText === 'A ```html - - - Nutrition Label - - - - -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  ---fcc-editable-region-- -
                                                                                                                                  -
                                                                                                                                  + + + Nutrition Label + + + + + +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  --fcc-editable-region-- +
                                                                                                                                  +
                                                                                                                                  - +--fcc-editable-region-- +
                                                                                                                                  + ``` @@ -90,6 +104,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -101,15 +117,11 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md index e1e10c1c30f..9fb0777d991 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md @@ -9,20 +9,20 @@ dashedName: step-31 The `rem` unit stands for `root em`, and is relative to the font size of the `html` element. -Create an `.sm-text` selector and set the `font-size` to `0.85rem`, which would calculate to be roughly `13.6px` (remember that you set your `html` to have a `font-size` of `16px`). +Create an `.small-text` selector and set the `font-size` to `0.85rem`, which would calculate to be roughly `13.6px` (remember that you set your `html` to have a `font-size` of `16px`). # --hints-- -You should have an `.sm-text` selector. +You should have an `.small-text` selector. ```js -assert(new __helpers.CSSHelp(document).getStyle('.sm-text')); +assert(new __helpers.CSSHelp(document).getStyle('.small-text')); ``` -Your `.sm-text` selector should have a `font-size` property set to `0.85rem`. +Your `.small-text` selector should have a `font-size` property set to `0.85rem`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.sm-text')?.fontSize === '0.85rem'); +assert(new __helpers.CSSHelp(document).getStyle('.small-text')?.fontSize === '0.85rem'); ``` # --seed-- @@ -32,26 +32,30 @@ assert(new __helpers.CSSHelp(document).getStyle('.sm-text')?.fontSize === '0.85r ```html - - - Nutrition Label - - - - -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Amount per serving

                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Amount per serving

                                                                                                                                  - +
                                                                                                                                  + ``` @@ -83,6 +87,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -94,15 +100,11 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5486b8fd4b71633f69b0.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5486b8fd4b71633f69b0.md index 17a0c4e20f7..78579fdb8b3 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5486b8fd4b71633f69b0.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5486b8fd4b71633f69b0.md @@ -1,51 +1,50 @@ --- id: 615f5486b8fd4b71633f69b0 -title: Step 32 +title: Step 33 challengeType: 0 -dashedName: step-32 +dashedName: step-33 --- # --description-- -Below your `.sm-text` element, create a new `h1` element with the text `Calories 230`. Wrap the `230` portion of the text in a `span` element with the `class` set to `right`. +Below your `.small-text` element, create a new `p` element with the text `Calories`. Also below the `.left-container` element, create a new `span` element with the text `230`. # --hints-- -You should have a new `h1` element within your `.calories-info` element. +You should have a new `p` element within your `.calories-info` element. ```js -assert(document.querySelector('.calories-info')?.querySelector('h1')) +assert(document.querySelector('.calories-info')?.querySelector('p')) ``` -Your `h1` element should come after your `.sm-text` element. +You should have a new `span` element within your `.calories-info` element. ```js -assert(document.querySelector('.sm-text')?.nextElementSibling?.localName === 'h1'); +assert(document.querySelector('.calories-info')?.querySelector('span')) ``` -Your `h1` element should have the text `Calories 230`. +Your `p` element should come after your `.small-text` element. ```js -// the float: right property does weird things to the inner text. -assert(document.querySelector('.calories-info')?.lastElementChild?.innerText.match(/Calories[\s|\n]*230/)); +assert(document.querySelector('.small-text')?.nextElementSibling?.localName === 'p'); ``` -You should create a `span` element within your new `h1` element. +Your `p` element should have the text `Calories`. ```js -assert(document.querySelector('.calories-info')?.lastElementChild?.querySelector('span')); +assert(document.querySelector('.left-container')?.lastElementChild?.innerText === 'Calories'); ``` -Your `span` element should have the `class` set to `right`. +Your `span` element should come after your `.left-container` element. ```js -assert(document.querySelector('.calories-info')?.lastElementChild?.querySelector('span')?.classList?.contains('right')); +assert(document.querySelector('.left-container')?.nextElementSibling?.localName ==='span'); ``` Your `span` element should have the text `230`. ```js -assert(document.querySelector('.calories-info')?.lastElementChild?.querySelector('span')?.innerText === '230'); +assert(document.querySelector('.calories-info')?.lastElementChild?.innerText === '230'); ``` # --seed-- @@ -55,28 +54,32 @@ assert(document.querySelector('.calories-info')?.lastElementChild?.querySelector ```html - - - Nutrition Label - - - - -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

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

                                                                                                                                  Amount per serving

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Amount per serving

                                                                                                                                  ---fcc-editable-region--
                                                                                                                                  - +--fcc-editable-region-- +
                                                                                                                                  + ``` @@ -108,6 +111,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -119,20 +124,20 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } + +.calories-info h2 { + margin: 0; +} ``` diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f575b50b91e72af079480.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f575b50b91e72af079480.md index d4458ee3f7e..14f20ffb784 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f575b50b91e72af079480.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f575b50b91e72af079480.md @@ -1,29 +1,41 @@ --- id: 615f575b50b91e72af079480 -title: Step 33 +title: Step 35 challengeType: 0 -dashedName: step-33 +dashedName: step-35 --- # --description-- -Create a new `.calories-info h1` selector setting the top and bottom margin to `-5px`, and the left and right margin to `-2px`. +Create a new `.left-container p` selector setting the top and bottom margin to `-5px`, and the left and right margin to `-2px`. Also set the `font-size` to `2em` and `font-weight` to `700`. # --hints-- -You should have a new `.calories-info h1` selector. +You should have a new `.left-container p` selector. ```js -assert(new __helpers.CSSHelp(document).getStyle('.calories-info h1')); +assert(new __helpers.CSSHelp(document).getStyle('.left-container p')); ``` -Your new `.calories-info h1` selector should have a `margin` property set to `-5px -2px`. +Your new `.left-container p` selector should have a `margin` property set to `-5px -2px`. ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marginTop, '-5px'); -assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marginBottom, '-5px'); -assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marginLeft, '-2px'); -assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marginRight, '-2px'); +assert.equal(new __helpers.CSSHelp(document).getStyle('.left-container p')?.marginTop, '-5px'); +assert.equal(new __helpers.CSSHelp(document).getStyle('.left-container p')?.marginBottom, '-5px'); +assert.equal(new __helpers.CSSHelp(document).getStyle('.left-container p')?.marginLeft, '-2px'); +assert.equal(new __helpers.CSSHelp(document).getStyle('.left-container p')?.marginRight, '-2px'); +``` + +Your new `.left-container p` selector should have a `font-size` property set to `2em`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.left-container p')?.fontSize === '2em'); +``` + +Your new `.left-container p` selector should have a `font-weight` property set to `700`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.left-container p')?.fontWeight === '700'); ``` # --seed-- @@ -33,27 +45,32 @@ assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marg ```html - - - Nutrition Label - - - - -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Amount per serving

                                                                                                                                  -

                                                                                                                                  Calories 230

                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Amount per serving

                                                                                                                                  +

                                                                                                                                  Calories

                                                                                                                                  + 230
                                                                                                                                  - +
                                                                                                                                  + ``` @@ -85,6 +102,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -96,23 +115,29 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + --fcc-editable-region-- --fcc-editable-region-- diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5af373a68e744a3c5a76.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5af373a68e744a3c5a76.md index f53ef470cf7..b833b5f471e 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5af373a68e744a3c5a76.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5af373a68e744a3c5a76.md @@ -1,13 +1,13 @@ --- id: 615f5af373a68e744a3c5a76 -title: Step 34 +title: Step 36 challengeType: 0 -dashedName: step-34 +dashedName: step-36 --- # --description-- -Create a `.calories-info span` selector and set the `font-size` to `1.2em`. +Create a `.calories-info span` selector, set its `font-size` to `2.4em` and `font-weight` to `700`. # --hints-- @@ -17,10 +17,16 @@ You should create a `.calories-info span` selector. assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')); ``` -Your `.calories-info span` selector should have a `font-size` property set to `1.2em`. +Your `.calories-info span` selector should have a `font-size` property set to `2.4em`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.fontSize === '1.2em'); +assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.fontSize === '2.4em'); +``` + +Your `.calories-info span` selector should have a `font-weight` property set to `700`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.fontWeight === '700'); ``` # --seed-- @@ -30,27 +36,32 @@ assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.fontSize ```html - - - Nutrition Label - - - - -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Amount per serving

                                                                                                                                  -

                                                                                                                                  Calories 230

                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Amount per serving

                                                                                                                                  +

                                                                                                                                  Calories

                                                                                                                                  + 230
                                                                                                                                  - +
                                                                                                                                  + ``` @@ -82,6 +93,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -93,25 +106,33 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; + font-size: 2em; + font-weight: 700; } --fcc-editable-region-- diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5c1cb7575c7551ed8a40.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5c1cb7575c7551ed8a40.md deleted file mode 100644 index cfd6cc33c9e..00000000000 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5c1cb7575c7551ed8a40.md +++ /dev/null @@ -1,116 +0,0 @@ ---- -id: 615f5c1cb7575c7551ed8a40 -title: Step 35 -challengeType: 0 -dashedName: step-35 ---- - -# --description-- - -The larger font size of the number `230` is causing it to overflow. Give the `.calories-info h1` an `overflow` property set to `hidden` to avoid this. - -# --hints-- - -Your `.calories-info h1` selector should have an `overflow` property set to `hidden`. - -```js -assert(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.overflow === 'hidden'); -``` - -# --seed-- - -## --seed-contents-- - -```html - - - - - Nutrition Label - - - - -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Amount per serving

                                                                                                                                  -

                                                                                                                                  Calories 230

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  - - -``` - -```css -* { - box-sizing: border-box; -} - -html { - font-size: 16px; -} - -body { - font-family: 'Open Sans', sans-serif; -} - -.label { - border: 2px solid black; - width: 270px; - margin: 20px auto; - padding: 0 7px; -} - -header h1 { - text-align: center; - margin: -4px 0; - letter-spacing: 0.15px -} - -p { - margin: 0; -} - -.divider { - border-bottom: 1px solid #888989; - margin: 2px 0; -} - -.bold { - font-weight: 800; -} - -.right { - float: right; -} - -.lg { - height: 10px; -} - -.lg, .md { - background-color: black; - border: 0; -} - -.sm-text { - font-size: 0.85rem; -} - ---fcc-editable-region-- -.calories-info h1 { - margin: -5px -2px; -} ---fcc-editable-region-- - -.calories-info span { - font-size: 1.2em; -} -``` diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5fd85d0062761f288364.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5fd85d0062761f288364.md index 9d68b8354d1..84d0ba9d985 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5fd85d0062761f288364.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5fd85d0062761f288364.md @@ -1,22 +1,22 @@ --- id: 615f5fd85d0062761f288364 -title: Step 36 +title: Step 37 challengeType: 0 -dashedName: step-36 +dashedName: step-37 --- # --description-- Typography is often more art than science. You may have to tweak things like alignment until it looks correct. -Give your `.calories-info span` selector a `margin-top` set to `-7px`. This will shift your `230` text into place. +Give your `.calories-info span` selector a `margin` set to `-7px -2px`. This will shift your `230` text into place. # --hints-- -Your `.calories-info span` selector should have a `margin-top` set to `-7px`. +Your `.calories-info span` selector should have a `margin` set to `-7px -2px`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.marginTop === '-7px'); +assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.margin === '-7px -2px'); ``` # --seed-- @@ -26,27 +26,32 @@ assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.marginTo ```html - - - Nutrition Label - - - - -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Amount per serving

                                                                                                                                  -

                                                                                                                                  Calories 230

                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Amount per serving

                                                                                                                                  +

                                                                                                                                  Calories

                                                                                                                                  + 230
                                                                                                                                  - +
                                                                                                                                  + ``` @@ -78,6 +83,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -89,31 +96,39 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } --fcc-editable-region-- .calories-info span { - font-size: 1.2em; + font-size: 2.4em; + font-weight: 700; } --fcc-editable-region-- ``` diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f61338c8ca176d6445574.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f61338c8ca176d6445574.md index b9b50a67f0b..31f049fa2d5 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f61338c8ca176d6445574.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f61338c8ca176d6445574.md @@ -1,13 +1,13 @@ --- id: 615f61338c8ca176d6445574 -title: Step 37 +title: Step 38 challengeType: 0 -dashedName: step-37 +dashedName: step-38 --- # --description-- -Below your `.calories-info` element, add a `div` with the `class` attribute set to `divider md`. +Below your `.calories-info` element, add a `div` with the `class` attribute set to `divider medium`. # --hints-- @@ -17,11 +17,11 @@ You should create a new `div` within your `.label` element. assert(document.querySelectorAll('.label > div')?.length === 3) ``` -Your new `div` should have the `class` attribute set to `divider md`. This div should be the last element in your `.label` element. +Your new `div` should have the `class` attribute set to `divider medium`. This div should be the last element in your `.label` element. ```js const div = document.querySelector('.label')?.lastElementChild; -assert(div?.classList?.contains('divider') && div?.classList?.contains('md')); +assert(div?.classList?.contains('divider') && div?.classList?.contains('medium')); ``` # --seed-- @@ -31,30 +31,35 @@ assert(div?.classList?.contains('divider') && div?.classList?.contains('md')); ```html - - - Nutrition Label - - - - -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Amount per serving

                                                                                                                                  -

                                                                                                                                  Calories 230

                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Amount per serving

                                                                                                                                  +

                                                                                                                                  Calories

                                                                                                                                  + 230 +
                                                                                                                                  --fcc-editable-region-- --fcc-editable-region-- -
                                                                                                                                  - +
                                                                                                                                  + ``` @@ -86,6 +91,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -97,30 +104,38 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; } ``` diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f666ac5edea782feb7e75.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f666ac5edea782feb7e75.md index 235c6490c3a..f074a2cf764 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f666ac5edea782feb7e75.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f666ac5edea782feb7e75.md @@ -1,26 +1,26 @@ --- id: 615f666ac5edea782feb7e75 -title: Step 38 +title: Step 39 challengeType: 0 -dashedName: step-38 +dashedName: step-39 --- # --description-- -Create an `.md` selector and give it a `height` property of `5px`. +Create an `.medium` selector and give it a `height` property of `5px`. # --hints-- -You should create an `.md` selector. +You should create an `.medium` selector. ```js -assert(new __helpers.CSSHelp(document).getStyle('.md')); +assert(new __helpers.CSSHelp(document).getStyle('.medium')); ``` -Your `.md` selector should have a `height` property set to `5px`. +Your `.medium` selector should have a `height` property set to `5px`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.md')?.height === '5px'); +assert(new __helpers.CSSHelp(document).getStyle('.medium')?.height === '5px'); ``` # --seed-- @@ -30,28 +30,33 @@ assert(new __helpers.CSSHelp(document).getStyle('.md')?.height === '5px'); ```html - - - Nutrition Label - - - - -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Amount per serving

                                                                                                                                  -

                                                                                                                                  Calories 230

                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Amount per serving

                                                                                                                                  +

                                                                                                                                  Calories

                                                                                                                                  -
                                                                                                                                  + 230
                                                                                                                                  - +
                                                                                                                                  +
                                                                                                                                  + ``` @@ -83,6 +88,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -94,15 +101,11 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } @@ -111,17 +114,29 @@ p { --fcc-editable-region-- -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; } ``` diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f671b6d1919792745aa5d.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f671b6d1919792745aa5d.md index 62fb6ca61de..0c0aa784249 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f671b6d1919792745aa5d.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f671b6d1919792745aa5d.md @@ -1,29 +1,29 @@ --- id: 615f671b6d1919792745aa5d -title: Step 39 +title: Step 40 challengeType: 0 -dashedName: step-39 +dashedName: step-40 --- # --description-- -Create a new `div` element below your `.md` element. Give it a `class` attribute set to `daily-value sm-text`. Within this new `div`, add a `p` element with the text `% Daily Value *`, and set the `class` attribute to `right bold`. +Create a new `div` element below your `.medium` element. Give it a `class` attribute set to `daily-value small-text`. Within this new `div`, add a `p` element with the text `% Daily Value *`, and set the `class` attribute to `bold right`. # --hints-- -You should create a new `div` element after your `.md` element. +You should create a new `div` element after your `.medium` element. ```js assert(document.querySelector('.label')?.lastElementChild?.localName === 'div'); assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('divider')); -assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('md')); +assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('medium')); ``` -Your new `div` should have a `class` attribute set to `daily-value sm-text`. +Your new `div` should have a `class` attribute set to `daily-value small-text`. ```js assert(document.querySelector('.label')?.lastElementChild?.classList?.contains('daily-value')); -assert(document.querySelector('.label')?.lastElementChild?.classList?.contains('sm-text')); +assert(document.querySelector('.label')?.lastElementChild?.classList?.contains('small-text')); ``` Your new `div` element should have a `p` element. @@ -38,11 +38,11 @@ Your new `p` element should have the text `% Daily Value *`. assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.textContent === '% Daily Value *'); ``` -Your new `p` element should have a `class` attribute set to `right bold`. +Your new `p` element should have a `class` attribute set to `bold right`. ```js -assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.classList?.contains('right')); assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.classList?.contains('right')); ``` # --seed-- @@ -52,32 +52,36 @@ assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.cl ```html - - - Nutrition Label - - - - -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Amount per serving

                                                                                                                                  -

                                                                                                                                  Calories 230

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  ---fcc-editable-region-- ---fcc-editable-region-- + + + Nutrition Label + + + + + +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Amount per serving

                                                                                                                                  +

                                                                                                                                  Calories

                                                                                                                                  + 230
                                                                                                                                  - + --fcc-editable-region-- +
                                                                                                                                  + + --fcc-editable-region-- +
                                                                                                                                  + ``` @@ -109,6 +113,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -120,34 +126,42 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; } ``` diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6823d0815b7a991f2a75.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6823d0815b7a991f2a75.md index 80707dcd715..3873e85fbf3 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6823d0815b7a991f2a75.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6823d0815b7a991f2a75.md @@ -1,32 +1,32 @@ --- id: 615f6823d0815b7a991f2a75 -title: Step 40 +title: Step 42 challengeType: 0 -dashedName: step-40 +dashedName: step-42 --- # --description-- -The `float` styling is causing the new `p` element to be outside of the label's border. Use your existing `.divider` element as an example to add a new divider after the `p` element. +Use your existing `.divider` element as an example to add a new divider after the `p` element. # --hints-- -You should create a new `div` within your `.daily-value.sm-text` element. +You should create a new `div` within your `.daily-value` element. ```js -assert(document.querySelectorAll('.daily-value.sm-text > div')?.length === 1) +assert(document.querySelectorAll('.daily-value.small-text > div')?.length === 1) ``` Your new `div` should have the `class` attribute set to `divider`. ```js -assert(document.querySelector('.daily-value.sm-text > div')?.classList?.contains('divider')) +assert(document.querySelector('.daily-value.small-text > div')?.classList?.contains('divider')) ``` Your new `div` should come after your `p` element. ```js -assert(document.querySelector('.daily-value.sm-text > div')?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text > div')?.previousElementSibling?.localName === 'p'); ``` # --seed-- @@ -36,34 +36,38 @@ assert(document.querySelector('.daily-value.sm-text > div')?.previousElementSibl ```html - - - Nutrition Label - - - - -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Amount per serving

                                                                                                                                  -

                                                                                                                                  Calories 230

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

                                                                                                                                  % Daily Value *

                                                                                                                                  + + + Nutrition Label + + + + + +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Amount per serving

                                                                                                                                  +

                                                                                                                                  Calories

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

                                                                                                                                  % Daily Value *

                                                                                                                                  +
                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                  + ``` @@ -95,6 +99,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -106,34 +112,46 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } ``` diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6a7d4ba8037bc086c2c7.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6a7d4ba8037bc086c2c7.md deleted file mode 100644 index 655b881bfe7..00000000000 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6a7d4ba8037bc086c2c7.md +++ /dev/null @@ -1,127 +0,0 @@ ---- -id: 615f6a7d4ba8037bc086c2c7 -title: Step 41 -challengeType: 0 -dashedName: step-41 ---- - -# --description-- - -Give the `.divider` selector a `clear` property set to `right`. This will clear the `float` property, pushing the divider and any following content down below the `float` text. - -# --hints-- - -Your `.divider` selector should have a `clear` property set to `right`. - -```js -assert(new __helpers.CSSHelp(document).getStyle('.divider')?.clear === 'right'); -``` - -# --seed-- - -## --seed-contents-- - -```html - - - - - Nutrition Label - - - - -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Amount per serving

                                                                                                                                  -

                                                                                                                                  Calories 230

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  % Daily Value *

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  - - -``` - -```css -* { - box-sizing: border-box; -} - -html { - font-size: 16px; -} - -body { - font-family: 'Open Sans', sans-serif; -} - -.label { - border: 2px solid black; - width: 270px; - margin: 20px auto; - padding: 0 7px; -} - -header h1 { - text-align: center; - margin: -4px 0; - letter-spacing: 0.15px -} - -p { - margin: 0; -} - ---fcc-editable-region-- -.divider { - border-bottom: 1px solid #888989; - margin: 2px 0; -} ---fcc-editable-region-- - -.bold { - font-weight: 800; -} - -.right { - float: right; -} - -.lg { - height: 10px; -} - -.lg, .md { - background-color: black; - border: 0; -} - -.md { - height: 5px; -} - -.sm-text { - font-size: 0.85rem; -} - -.calories-info h1 { - margin: -5px -2px; - overflow: hidden; -} - -.calories-info span { - font-size: 1.2em; - margin-top: -7px; -} -``` diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6b2d164f81809efd9bdc.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6b2d164f81809efd9bdc.md index 7cb965c2767..52570a43289 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6b2d164f81809efd9bdc.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6b2d164f81809efd9bdc.md @@ -1,56 +1,62 @@ --- id: 615f6b2d164f81809efd9bdc -title: Step 42 +title: Step 43 challengeType: 0 -dashedName: step-42 +dashedName: step-43 --- # --description-- -After your last `.divider` element, create a `p` element and give it the text `Total Fat 8g 10%`. Wrap `Total Fat` in a `span` element with the `class` set to `bold`. Wrap `10%` in another `span` element with the `class` set to `bold right`. +After your last `.divider` element, create a `p` element and give it the text `Total Fat 8g 10%`. Wrap `Total Fat` in a `span` element with the `class` set to `bold`. Wrap `10%` in another `span` element with the `class` set to `bold`. Also wrap the words `Total Fat 8g` in an additional `span` element for alignment. # --hints-- You should create a new `p` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` Your new `p` element should have the text `Total Fat 8g 10%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Total Fat 8g[\s|\n]+10%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Total Fat[\s|\n]+8g[\s|\n]+10%/)); ``` -Your `p` element should have two `span` elements. +Your `p` element should have three `span` elements. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 2); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 3); ``` -Your first `span` element should wrap the text `Total Fat`. +One `span` element should wrap the text `Total Fat`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.innerText === 'Total Fat'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span > span')?.innerText === 'Total Fat'); ``` -Your first `span` element should have the `class` set to `bold`. +The `span` element around `Total Fat` should have the `class` set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.className === 'bold'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span > span')?.className === 'bold'); ``` -Your second `span` element should wrap the text `10%`. +A `span` element should wrap the text `10%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.[1]?.innerText === '10%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span + span')?.innerText === '10%'); ``` -Your second `span` element should have the `class` set to `bold right`. +The `span` element around `10%` should have the `class` set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.[1]?.className === 'bold right'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.[1]?.className === 'bold'); +``` + +A `span` element should have the text `Total Fat 8g`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Total Fat[\s|\n]+8g/)); ``` # --seed-- @@ -60,35 +66,39 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySe ```html - - - Nutrition Label - - - - -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Amount per serving

                                                                                                                                  -

                                                                                                                                  Calories 230

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  % Daily Value *

                                                                                                                                  -
                                                                                                                                  ---fcc-editable-region-- ---fcc-editable-region-- + + + Nutrition Label + + + + + +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Amount per serving

                                                                                                                                  +

                                                                                                                                  Calories

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

                                                                                                                                  % Daily Value *

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                  + ``` @@ -120,46 +130,59 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } ``` diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6cc778f7698258467596.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6cc778f7698258467596.md index 054289a7759..07e12417a55 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6cc778f7698258467596.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6cc778f7698258467596.md @@ -1,46 +1,45 @@ --- id: 615f6cc778f7698258467596 -title: Step 43 +title: Step 44 challengeType: 0 -dashedName: step-43 +dashedName: step-44 --- # --description-- -Below your element with the `Total Fat` text, create a new `p` element with the text `Saturated Fat 1g 5%`. Wrap the `5%` in a `span` with the `class` attribute set to `bold right`. +Below your element with the `Total Fat` text, create a new `p` element with the text `Saturated Fat 1g 5%`. Wrap the `5%` in a `span` with the `class` attribute set to `bold`. In this case this is enough to align the percentage to `5%`. # --hints-- You should create a new `p` element below your element with the `Total Fat` text. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.innerText.match(/Total Fat 8g\s*10%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.innerText.match(/Total Fat 8g\s*10%/)); ``` Your new `p` element should have the text `Saturated Fat 1g 5%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText.match(/Saturated Fat 1g\s*5%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText.match(/Saturated Fat 1g\s*5%/)); ``` Your new `p` element should have a `span` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.localName === 'span'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.localName === 'span'); ``` -Your `span` element should have the `class` attribute set to `bold right`. +Your `span` element should have the `class` attribute set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); ``` Your `span` element should wrap the `5%` text. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.innerText === "5%"); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === "5%"); ``` # --seed-- @@ -50,36 +49,40 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastEle ```html - - - Nutrition Label - - - - -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Amount per serving

                                                                                                                                  -

                                                                                                                                  Calories 230

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  % Daily Value *

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Total Fat 8g10%

                                                                                                                                  ---fcc-editable-region-- ---fcc-editable-region-- + + + Nutrition Label + + + + + +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Amount per serving

                                                                                                                                  +

                                                                                                                                  Calories

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

                                                                                                                                  % Daily Value *

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Total Fat 8g 10%

                                                                                                                                  +
                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                  + ``` @@ -111,46 +114,59 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } ``` diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6fddaac1e083502d3e6a.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6fddaac1e083502d3e6a.md index 569f99e7715..adf5aa23be3 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6fddaac1e083502d3e6a.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6fddaac1e083502d3e6a.md @@ -1,8 +1,8 @@ --- id: 615f6fddaac1e083502d3e6a -title: Step 44 +title: Step 45 challengeType: 0 -dashedName: step-44 +dashedName: step-45 --- # --description-- @@ -14,7 +14,7 @@ This new `p` element will need to be indented. Give it a `class` set to `indent` Your `p` element with the text `Saturated Fat 1g 5%` should have a `class` attribute set to `indent`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('indent')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('indent')); ``` # --seed-- @@ -24,36 +24,41 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Amount per serving

                                                                                                                                  -

                                                                                                                                  Calories 230

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  % Daily Value *

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Total Fat 8g10%

                                                                                                                                  ---fcc-editable-region-- -

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Amount per serving

                                                                                                                                  +

                                                                                                                                  Calories

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

                                                                                                                                  % Daily Value *

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Total Fat 8g 10%

                                                                                                                                  +

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  +
                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                  + ``` @@ -85,46 +90,59 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } ``` diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f70077a4ff98424236c1e.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f70077a4ff98424236c1e.md index 592f9c3bd85..5877e7de8b9 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f70077a4ff98424236c1e.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f70077a4ff98424236c1e.md @@ -1,8 +1,8 @@ --- id: 615f70077a4ff98424236c1e -title: Step 45 +title: Step 46 challengeType: 0 -dashedName: step-45 +dashedName: step-46 --- # --description-- @@ -30,34 +30,39 @@ assert(new __helpers.CSSHelp(document).getStyle('.indent')?.marginLeft === '1em' ```html - - - Nutrition Label - - - - -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Amount per serving

                                                                                                                                  -

                                                                                                                                  Calories 230

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  % Daily Value *

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Total Fat 8g10%

                                                                                                                                  -

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Amount per serving

                                                                                                                                  +

                                                                                                                                  Calories

                                                                                                                                  + 230
                                                                                                                                  - +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  % Daily Value *

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Total Fat 8g 10%

                                                                                                                                  +

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  + ``` @@ -89,47 +94,60 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } --fcc-editable-region-- diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f72a872354a850d4f533e.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f72a872354a850d4f533e.md index 1f363003d93..9efb21af257 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f72a872354a850d4f533e.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f72a872354a850d4f533e.md @@ -1,8 +1,8 @@ --- id: 615f72a872354a850d4f533e -title: Step 46 +title: Step 47 challengeType: 0 -dashedName: step-46 +dashedName: step-47 --- # --description-- @@ -30,34 +30,39 @@ assert(new __helpers.CSSHelp(document).getStyle('.daily-value p')?.borderBottom ```html - - - Nutrition Label - - - - -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Amount per serving

                                                                                                                                  -

                                                                                                                                  Calories 230

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  % Daily Value *

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Total Fat 8g10%

                                                                                                                                  -

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Amount per serving

                                                                                                                                  +

                                                                                                                                  Calories

                                                                                                                                  + 230
                                                                                                                                  - +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  % Daily Value *

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Total Fat 8g 10%

                                                                                                                                  +

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  + ``` @@ -89,47 +94,60 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f74a71f1e498619e38ee8.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f74a71f1e498619e38ee8.md index 8adb2317608..ff3c272798d 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f74a71f1e498619e38ee8.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f74a71f1e498619e38ee8.md @@ -1,8 +1,8 @@ --- id: 615f74a71f1e498619e38ee8 -title: Step 47 +title: Step 48 challengeType: 0 -dashedName: step-47 +dashedName: step-48 --- # --description-- @@ -14,16 +14,15 @@ The bottom borders under your `% Daily Value *` and `Saturated Fat 1g 5%` elemen Your `p` element with the text `% Daily Value *` should have `no-divider` added to the `class` attribute. Do not remove the existing classes. ```js -const p = document.querySelector('.daily-value.sm-text')?.firstElementChild; +const p = document.querySelector('.daily-value.small-text')?.firstElementChild; assert(p?.classList?.contains('no-divider')); assert(p?.classList?.contains('bold')); -assert(p?.classList?.contains('right')); ``` Your `p` element with the text `Saturated Fat 1g 5%` should have `no-divider` added to the `class` attribute. Do not remove the existing classes. ```js -const p = document.querySelector('.daily-value.sm-text')?.lastElementChild; +const p = document.querySelector('.daily-value.small-text')?.lastElementChild; assert(p?.classList?.contains('no-divider')); assert(p?.classList?.contains('indent')); ``` @@ -35,36 +34,41 @@ assert(p?.classList?.contains('indent')); ```html - - - Nutrition Label - - - - -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Amount per serving

                                                                                                                                  -

                                                                                                                                  Calories 230

                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Amount per serving

                                                                                                                                  +

                                                                                                                                  Calories

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

                                                                                                                                  % Daily Value *

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Total Fat 8g10%

                                                                                                                                  -

                                                                                                                                  Saturated Fat 1g 5%

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

                                                                                                                                  % Daily Value *

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Total Fat 8g 10%

                                                                                                                                  +

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  +
                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                  + ``` @@ -96,47 +100,60 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ad94380408d971d14f6.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ad94380408d971d14f6.md index 008b34a3751..4172622316e 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ad94380408d971d14f6.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ad94380408d971d14f6.md @@ -1,8 +1,8 @@ --- id: 615f7ad94380408d971d14f6 -title: Step 48 +title: Step 49 challengeType: 0 -dashedName: step-48 +dashedName: step-49 --- # --description-- @@ -44,37 +44,43 @@ assert(style?.borderBottom === '1px solid rgb(136, 137, 137)'); ## --seed-contents-- + ```html - - - Nutrition Label - - - - -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Amount per serving

                                                                                                                                  -

                                                                                                                                  Calories 230

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  % Daily Value *

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Total Fat 8g10%

                                                                                                                                  -

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Amount per serving

                                                                                                                                  +

                                                                                                                                  Calories

                                                                                                                                  + 230
                                                                                                                                  - +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  % Daily Value *

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Total Fat 8g 10%

                                                                                                                                  +

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  + ``` @@ -106,47 +112,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7bc680f7168ea01ebf99.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7bc680f7168ea01ebf99.md index 048f474b01d..552d8d73f9b 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7bc680f7168ea01ebf99.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7bc680f7168ea01ebf99.md @@ -1,8 +1,8 @@ --- id: 615f7bc680f7168ea01ebf99 -title: Step 49 +title: Step 50 challengeType: 0 -dashedName: step-49 +dashedName: step-50 --- # --description-- @@ -13,16 +13,16 @@ Your first `.no-divider` element has a `.divider` after it. Create another `.div # --hints-- -You should create a new `div` at the end of your `.daily-value.sm-text` element. +You should create a new `div` at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` Your new `div` should have the `class` attribute set to `divider`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -32,36 +32,41 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Amount per serving

                                                                                                                                  -

                                                                                                                                  Calories 230

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

                                                                                                                                  % Daily Value *

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Total Fat 8g10%

                                                                                                                                  -

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Amount per serving

                                                                                                                                  +

                                                                                                                                  Calories

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

                                                                                                                                  % Daily Value *

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Total Fat 8g 10%

                                                                                                                                  +

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  +
                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                  + ``` @@ -93,47 +98,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7c71eab8218f846e4503.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7c71eab8218f846e4503.md index c1b73b41197..dcdcd75bb31 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7c71eab8218f846e4503.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7c71eab8218f846e4503.md @@ -1,32 +1,32 @@ --- id: 615f7c71eab8218f846e4503 -title: Step 50 +title: Step 51 challengeType: 0 -dashedName: step-50 +dashedName: step-51 --- # --description-- -After your last `.divider`, create another `p` element with the text `Trans Fat 0g`. Italicize the word `Trans` by wrapping it in an `i` element. Give the new `p` element the `class` attribute set to `indent no-divider`. +After your last `.divider`, create another `p` element with the text `Trans Fat 0g`. Italicize the word `Trans` by wrapping it in an `i` element. Give the new `p` element the `class` attribute set to `indent no-divider`. Wrap `Trans Fat 0g` in a `span` element for alignment. # --hints-- -You should create a new `p` element at the end of your `.daily-value.sm-text` element. +You should create a new `p` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` Your new `p` element should have the text `Trans Fat 0g`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText === 'Trans Fat 0g'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText === 'Trans Fat 0g'); ``` Your new `p` element should have the `class` attribute set to `indent no-divider`. ```js -const p = document.querySelector('.daily-value.sm-text')?.lastElementChild; +const p = document.querySelector('.daily-value.small-text')?.lastElementChild; assert(p?.classList?.contains('indent')); assert(p?.classList?.contains('no-divider')); ``` @@ -34,13 +34,25 @@ assert(p?.classList?.contains('no-divider')); Your new `p` element should have an `i` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.localName === 'i'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('i')); ``` Your `i` element should wrap the text `Trans`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.innerText === 'Trans'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('i')?.innerText === 'Trans'); +``` + +Your new `p` element should have a `span` element. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span')); +``` + +Your `span` element should wrap the text `Trans Fat 0g`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span')?.innerText?.match(/Trans[\s|\n]+Fat 0g/)); ``` # --seed-- @@ -50,37 +62,42 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstEl ```html - - - Nutrition Label - - - - -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Amount per serving

                                                                                                                                  -

                                                                                                                                  Calories 230

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

                                                                                                                                  % Daily Value *

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Total Fat 8g10%

                                                                                                                                  -

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  -
                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Amount per serving

                                                                                                                                  +

                                                                                                                                  Calories

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

                                                                                                                                  % Daily Value *

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Total Fat 8g 10%

                                                                                                                                  +

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                  + ``` @@ -112,47 +129,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7d489a581590d1350288.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7d489a581590d1350288.md index 8540c74155e..29fed221251 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7d489a581590d1350288.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7d489a581590d1350288.md @@ -1,8 +1,8 @@ --- id: 615f7d489a581590d1350288 -title: Step 51 +title: Step 52 challengeType: 0 -dashedName: step-51 +dashedName: step-52 --- # --description-- @@ -11,16 +11,16 @@ Create another `.divider` after your last `p` element. # --hints-- -You should create a new `div` element at the end of your `.daily-value.sm-text` element. +You should create a new `div` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` Your new `div` element should have the `class` attribute set to `divider`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -30,38 +30,43 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Amount per serving

                                                                                                                                  -

                                                                                                                                  Calories 230

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

                                                                                                                                  % Daily Value *

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Total Fat 8g10%

                                                                                                                                  -

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Trans Fat 0g

                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Amount per serving

                                                                                                                                  +

                                                                                                                                  Calories

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

                                                                                                                                  % Daily Value *

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Total Fat 8g 10%

                                                                                                                                  +

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Trans Fat 0g

                                                                                                                                  +
                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                  + ``` @@ -93,47 +98,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7de4487b64919bb4aa5e.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7de4487b64919bb4aa5e.md index 405e0647f87..7eb730507a2 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7de4487b64919bb4aa5e.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7de4487b64919bb4aa5e.md @@ -1,57 +1,62 @@ --- id: 615f7de4487b64919bb4aa5e -title: Step 52 +title: Step 53 challengeType: 0 -dashedName: step-52 +dashedName: step-53 --- # --description-- -After your last `.divider`, create a new `p` element with the text `Cholesterol 0mg 0%`. Wrap the text `Cholesterol` in a `span` element, and give that `span` element the `class` attribute set to `bold`. Wrap the text `0%` in another `span` element, with the `class` set to `bold right`. +After your last `.divider`, create a new `p` element with the text `Cholesterol 0mg 0%`. Wrap the text `Cholesterol` in a `span` element, and give that `span` element the `class` attribute set to `bold`. Wrap the text `0%` in another `span` element, with the `class` set to `bold`. Also wrap `Cholesterol 0mg` in an additional `span` element for the alignment. # --hints-- -You should create a new `p` element at the end of your `.daily-value.sm-text` element. +You should create a new `p` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` Your new `p` element should have the text `Cholesterol 0mg 0%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Cholesterol 0mg[\s|\n]+0%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Cholesterol[\s|\n]+0mg[\s|\n]+0%/)); ``` -Your new `p` element should have two `span` elements. +Your new `p` element should have three `span` elements. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 2); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 3); ``` -Your first `span` element should have the `class` attribute set to `bold`. +Your first `span` `Cholesterol` element should have the `class` attribute set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.classList?.contains('bold')); +``` + +Your first `span` element should wrap the text `Cholesterol 0mg`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.innerText?.match(/Cholesterol[\s|\n]+0mg/)); ``` Your first `span` element should wrap the text `Cholesterol`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.innerText === 'Cholesterol'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.innerText === 'Cholesterol'); ``` -Your second `span` element should have the `class` attribute set to `bold right`. +Your second `span` element should have the `class` attribute set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); ``` Your second `span` element should wrap the text `0%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.innerText === '0%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === '0%'); ``` # --seed-- @@ -61,39 +66,44 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastEle ```html - - - Nutrition Label - - - - -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Amount per serving

                                                                                                                                  -

                                                                                                                                  Calories 230

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

                                                                                                                                  % Daily Value *

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Total Fat 8g10%

                                                                                                                                  -

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Trans Fat 0g

                                                                                                                                  -
                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Amount per serving

                                                                                                                                  +

                                                                                                                                  Calories

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

                                                                                                                                  % Daily Value *

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Total Fat 8g 10%

                                                                                                                                  +

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Trans Fat 0g

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                  + ``` @@ -125,47 +135,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7e7281626a92bbd62da8.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7e7281626a92bbd62da8.md index 432939d693b..fa574f3fca5 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7e7281626a92bbd62da8.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7e7281626a92bbd62da8.md @@ -1,57 +1,62 @@ --- id: 615f7e7281626a92bbd62da8 -title: Step 53 +title: Step 54 challengeType: 0 -dashedName: step-53 +dashedName: step-54 --- # --description-- -Below your last `p` element, create another `p` element with the text `Sodium 160mg 7%`. Wrap the text `Sodium` in a `span` element with a `class` attribute set to `bold`. Wrap the `7%` text in another `span` element with the `class` set to `bold right`. +Below your last `p` element, create another `p` element with the text `Sodium 160mg 7%`. Wrap the text `Sodium` in a `span` element with a `class` attribute set to `bold`. Wrap the `7%` text in another `span` element with the `class` set to `bold`. Also add an additional `span` element around `Sodium 160mg` for aligning it correctly. # --hints-- -You should create a new `p` element at the end of your `.daily-value.sm-text` element. +You should create a new `p` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` Your new `p` element should have the text `Sodium 160mg 7%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Sodium 160mg[\s|\n]+7%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Sodium[\s|\n]160mg[\s|\n]+7%/)); ``` -Your new `p` element should have two `span` elements. +Your new `p` element should have three `span` elements. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 2); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 3); ``` -Your first `span` element should have the `class` attribute set to `bold`. +A `span` element should wrap the text `Sodium 360mg`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.innerText?.match(/Sodium[\s|\n]160mg/)); ``` -Your first `span` element should wrap the text `Sodium`. +A `span` element should wrap the text `Sodium`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.innerText === 'Sodium'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.innerText === "Sodium"); ``` -Your second `span` element should have the `class` attribute set to `bold right`. +The `span` around `Sodium` should have the `class` attribute set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.classList?.contains('bold')); ``` -Your second `span` element should wrap the text `7%`. +A `span` element should wrap the text `7%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.innerText === '7%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === '7%'); +``` + +The `span` element around `7%` should have the `class` attribute set to `bold`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); ``` # --seed-- @@ -61,40 +66,45 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastEle ```html - - - Nutrition Label - - - - -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Amount per serving

                                                                                                                                  -

                                                                                                                                  Calories 230

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

                                                                                                                                  % Daily Value *

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Total Fat 8g10%

                                                                                                                                  -

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Trans Fat 0g

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Amount per serving

                                                                                                                                  +

                                                                                                                                  Calories

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

                                                                                                                                  % Daily Value *

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Total Fat 8g 10%

                                                                                                                                  +

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Trans Fat 0g

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                  +
                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                  + ``` @@ -126,47 +136,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ecb09de9a938ef94756.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ecb09de9a938ef94756.md index 815359307b7..abbc9ee6caf 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ecb09de9a938ef94756.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ecb09de9a938ef94756.md @@ -1,57 +1,68 @@ --- id: 615f7ecb09de9a938ef94756 -title: Step 54 +title: Step 55 challengeType: 0 -dashedName: step-54 +dashedName: step-55 --- # --description-- -Add another `p` element with the text `Total Carbohydrate 37g 13%`. Like before, use `span` elements to make the text `Total Carbohydrate` bold, and the text `13%` bold and right aligned. +Add another `p` element with the text `Total Carbohydrate 37g 13%`. Like before, use `span` elements to make the text `Total Carbohydrate` and `13%` bold. Also add an additional `span` element to wrap the `Total Carbohydrate 37g` text in a span element so to have it aligned to the left, and `13%` to the right. # --hints-- -You should create a new `p` element at the end of your `.daily-value.sm-text` element. +You should create a new `p` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` Your new `p` element should have the text `Total Carbohydrate 37g 13%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Total Carbohydrate 37g[\s|\n]+13%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Total Carbohydrate[\s|\n]+37g[\s|\n]+13%/)); ``` -Your new `p` element should have two `span` elements. +Your new `p` element should have three `span` elements. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 2); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 3); ``` -Your first `span` element should have the `class` attribute set to `bold`. +One `span` element should wrap the text `Total Carbohydrate 37g`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.innerText?.match(/Total Carbohydrate[\s|\n]+37g/)); ``` -Your first `span` element should wrap the text `Total Carbohydrate`. +One `span` element should wrap the text `Total Carbohydrate`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.innerText === 'Total Carbohydrate'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.innerText === 'Total Carbohydrate'); ``` -Your second `span` element should have the `class` attribute set to `bold right`. +The `span` element around `Total Carbohydrate` should have the `class` attribute set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.classList?.contains('bold')); +``` + +A `span` element should wrap the text `13%`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === '13%'); +``` + +The `span` element around `13%` should have the `class` attribute set to `bold`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); ``` Your second `span` element should wrap the text `13%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.innerText === '13%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === '13%'); ``` # --seed-- @@ -61,41 +72,46 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastEle ```html - - - Nutrition Label - - - - -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Amount per serving

                                                                                                                                  -

                                                                                                                                  Calories 230

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

                                                                                                                                  % Daily Value *

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Total Fat 8g10%

                                                                                                                                  -

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Trans Fat 0g

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                  -

                                                                                                                                  Sodium 160mg 7%

                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Amount per serving

                                                                                                                                  +

                                                                                                                                  Calories

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

                                                                                                                                  % Daily Value *

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Total Fat 8g 10%

                                                                                                                                  +

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Trans Fat 0g

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                  +

                                                                                                                                  Sodium 160mg 7%

                                                                                                                                  +
                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                  + ``` @@ -127,47 +143,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7fa959ab75948f96a0d6.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7fa959ab75948f96a0d6.md index e4b6b8e2f57..a7b99d026c4 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7fa959ab75948f96a0d6.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7fa959ab75948f96a0d6.md @@ -1,8 +1,8 @@ --- id: 615f7fa959ab75948f96a0d6 -title: Step 55 +title: Step 56 challengeType: 0 -dashedName: step-55 +dashedName: step-56 --- # --description-- @@ -11,30 +11,30 @@ Below your last `p` element, add another `p` element with the text `Dietary Fibe # --hints-- -You should create a new `p` and `div` element at the end of your `.daily-value.sm-text` element. +You should create a new `p` and `div` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` Your new `p` element should have the text `Dietary Fiber 4g`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.innerText.match(/Dietary Fiber[\s|\n]+4g/)); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.innerText.match(/Dietary Fiber[\s|\n]+4g/)); ``` Your new `p` element should have the `class` attribute set to `indent no-divider`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('indent')); -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('indent')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('no-divider')); ``` Your new `div` should have the `class` attribute set to `divider`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -44,42 +44,47 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Amount per serving

                                                                                                                                  -

                                                                                                                                  Calories 230

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

                                                                                                                                  % Daily Value *

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Total Fat 8g10%

                                                                                                                                  -

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Trans Fat 0g

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                  -

                                                                                                                                  Sodium 160mg 7%

                                                                                                                                  -

                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Amount per serving

                                                                                                                                  +

                                                                                                                                  Calories

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

                                                                                                                                  % Daily Value *

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Total Fat 8g 10%

                                                                                                                                  +

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Trans Fat 0g

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                  +

                                                                                                                                  Sodium 160mg 7%

                                                                                                                                  +

                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                  +
                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                  + ``` @@ -111,47 +116,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f808d85793195b0f53be9.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f808d85793195b0f53be9.md index 1bcd018908d..ed558199175 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f808d85793195b0f53be9.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f808d85793195b0f53be9.md @@ -1,8 +1,8 @@ --- id: 615f808d85793195b0f53be9 -title: Step 56 +title: Step 57 challengeType: 0 -dashedName: step-56 +dashedName: step-57 --- # --description-- @@ -11,30 +11,30 @@ Create another `p` element after your last `.divider`, and give it the text `Tot # --hints-- -You should create a new `p` and `div` element at the end of your `.daily-value.sm-text` element. +You should create a new `p` and `div` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` Your new `p` element should have the text `Total Sugars 12g`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.innerText.match(/Total Sugars[\s|\n]+12g/)); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.innerText.match(/Total Sugars[\s|\n]+12g/)); ``` Your new `p` element should have the `class` attribute set to `indent no-divider`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('indent')); -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('indent')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('no-divider')); ``` Your new `div` should have the `class` attribute set to `divider`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -44,44 +44,49 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Amount per serving

                                                                                                                                  -

                                                                                                                                  Calories 230

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

                                                                                                                                  % Daily Value *

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Total Fat 8g10%

                                                                                                                                  -

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Trans Fat 0g

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                  -

                                                                                                                                  Sodium 160mg 7%

                                                                                                                                  -

                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                  -

                                                                                                                                  Dietary Fiber 4g

                                                                                                                                  -
                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Amount per serving

                                                                                                                                  +

                                                                                                                                  Calories

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

                                                                                                                                  % Daily Value *

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Total Fat 8g 10%

                                                                                                                                  +

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Trans Fat 0g

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                  +

                                                                                                                                  Sodium 160mg 7%

                                                                                                                                  +

                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                  +

                                                                                                                                  Dietary Fiber 4g

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                  + ``` @@ -113,47 +118,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f829d07b18f96f6f6684b.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f829d07b18f96f6f6684b.md index 4b68bdd6b66..e4baa0707cb 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f829d07b18f96f6f6684b.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f829d07b18f96f6f6684b.md @@ -1,21 +1,21 @@ --- id: 615f829d07b18f96f6f6684b -title: Step 57 +title: Step 58 challengeType: 0 -dashedName: step-57 +dashedName: step-58 --- # --description-- -The advantage to creating these dividers is that you can apply specific classes to style them individually. Add `dbl-indent` to the `class` for your last `.divider`. +The advantage to creating these dividers is that you can apply specific classes to style them individually. Add `double-indent` to the `class` for your last `.divider`. # --hints-- -Your last `.divider` element should have `dbl-indent` added to the `class`. Do not remove the existing value. +Your last `.divider` element should have `double-indent` added to the `class`. Do not remove the existing value. ```js -const last = document.querySelector('.daily-value.sm-text')?.lastElementChild; -assert(last?.classList?.contains('dbl-indent')); +const last = document.querySelector('.daily-value.small-text')?.lastElementChild; +assert(last?.classList?.contains('double-indent')); assert(last?.classList?.contains('divider')); ``` @@ -26,46 +26,51 @@ assert(last?.classList?.contains('divider')); ```html - - - Nutrition Label - - - - -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Amount per serving

                                                                                                                                  -

                                                                                                                                  Calories 230

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

                                                                                                                                  % Daily Value *

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Total Fat 8g10%

                                                                                                                                  -

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Trans Fat 0g

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                  -

                                                                                                                                  Sodium 160mg 7%

                                                                                                                                  -

                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                  -

                                                                                                                                  Dietary Fiber 4g

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Total Sugars 12g

                                                                                                                                  -
                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Amount per serving

                                                                                                                                  +

                                                                                                                                  Calories

                                                                                                                                  + 230
                                                                                                                                  - +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  % Daily Value *

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Total Fat 8g 10%

                                                                                                                                  +

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Trans Fat 0g

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                  +

                                                                                                                                  Sodium 160mg 7%

                                                                                                                                  +

                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                  +

                                                                                                                                  Dietary Fiber 4g

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Total Sugars 12g

                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                  +
                                                                                                                                  + ``` @@ -97,47 +102,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f83ef928ec9982b785b6a.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f83ef928ec9982b785b6a.md index f120cb64b2f..370fd147adf 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f83ef928ec9982b785b6a.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f83ef928ec9982b785b6a.md @@ -1,26 +1,26 @@ --- id: 615f83ef928ec9982b785b6a -title: Step 58 +title: Step 59 challengeType: 0 -dashedName: step-58 +dashedName: step-59 --- # --description-- -Create a `.dbl-indent` selector and give it a left margin of `2em`. +Create a `.double-indent` selector and give it a left margin of `2em`. # --hints-- -You should have a new `.dbl-indent` selector. +You should have a new `.double-indent` selector. ```js -assert(new __helpers.CSSHelp(document).getStyle('.dbl-indent')); +assert(new __helpers.CSSHelp(document).getStyle('.double-indent')); ``` -Your `.dbl-indent` selector should have a `margin-left` property set to `2em`. +Your `.double-indent` selector should have a `margin-left` property set to `2em`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.dbl-indent')?.marginLeft === '2em'); +assert(new __helpers.CSSHelp(document).getStyle('.double-indent')?.marginLeft === '2em'); ``` # --seed-- @@ -30,44 +30,49 @@ assert(new __helpers.CSSHelp(document).getStyle('.dbl-indent')?.marginLeft === ' ```html - - - Nutrition Label - - - - -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Amount per serving

                                                                                                                                  -

                                                                                                                                  Calories 230

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  % Daily Value *

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Total Fat 8g10%

                                                                                                                                  -

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Trans Fat 0g

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                  -

                                                                                                                                  Sodium 160mg 7%

                                                                                                                                  -

                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                  -

                                                                                                                                  Dietary Fiber 4g

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Total Sugars 12g

                                                                                                                                  -
                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Amount per serving

                                                                                                                                  +

                                                                                                                                  Calories

                                                                                                                                  + 230
                                                                                                                                  - +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  % Daily Value *

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Total Fat 8g 10%

                                                                                                                                  +

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Trans Fat 0g

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                  +

                                                                                                                                  Sodium 160mg 7%

                                                                                                                                  +

                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                  +

                                                                                                                                  Dietary Fiber 4g

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Total Sugars 12g

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  + ``` @@ -99,56 +104,70 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } ---fcc-editable-region-- +--fcc-editable-region-- ---fcc-editable-region-- +--fcc-editable-region-- .daily-value p:not(.no-divider) { border-bottom: 1px solid #888989; diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f84f246e8ba98e3cd97be.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f84f246e8ba98e3cd97be.md index 64d06a660a5..aaf2ace3289 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f84f246e8ba98e3cd97be.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f84f246e8ba98e3cd97be.md @@ -1,61 +1,60 @@ --- id: 615f84f246e8ba98e3cd97be -title: Step 59 +title: Step 60 challengeType: 0 -dashedName: step-59 +dashedName: step-60 --- # --description-- -Below your `.dbl-indent` element, add a new `p` element with the text `Includes 10g Added Sugars 20%`. Your new `p` element should also be double indented, and have no bottom border. Use a `span` to make the `20%` bold and right aligned. +Below your `.double-indent` element, add a new `p` element with the text `Includes 10g Added Sugars 20%`. Your new `p` element should also be double indented, and have no bottom border. Use a `span` to make the `20%` bold and right aligned. Then create another divider after that `p` element. # --hints-- -You should create a new `p` and `div` element at the end of your `.daily-value.sm-text` element. +You should create a new `p` and `div` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` Your new `p` element should have the text `Includes 10g Added Sugars 20%`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.innerText.match(/Includes 10g Added Sugars[\s|\n]+20%/)); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.innerText.match(/Includes 10g Added Sugars[\s|\n]+20%/)); ``` -Your new `p` element should have the `class` attribute set to `dbl-indent no-divider`. +Your new `p` element should have the `class` attribute set to `double-indent no-divider`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('dbl-indent')); -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('double-indent')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('no-divider')); ``` Your new `p` element should have a `span` element. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.firstElementChild?.localName === 'span'); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.firstElementChild?.localName === 'span'); ``` -Your `span` element should have the `class` attribute set to `bold right`. +Your `span` element should have the `class` attribute set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.firstElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.firstElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.firstElementChild?.classList?.contains('bold')); ``` Your `span` element should wrap the text `20%`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type span')?.innerText === '20%'); +assert(document.querySelector('.daily-value.small-text p:last-of-type span')?.innerText === '20%'); ``` Your new `div` should have the `class` attribute set to `divider`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -65,46 +64,51 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Amount per serving

                                                                                                                                  -

                                                                                                                                  Calories 230

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

                                                                                                                                  % Daily Value *

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Total Fat 8g10%

                                                                                                                                  -

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Trans Fat 0g

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                  -

                                                                                                                                  Sodium 160mg 7%

                                                                                                                                  -

                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                  -

                                                                                                                                  Dietary Fiber 4g

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Total Sugars 12g

                                                                                                                                  -
                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Amount per serving

                                                                                                                                  +

                                                                                                                                  Calories

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

                                                                                                                                  % Daily Value *

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Total Fat 8g 10%

                                                                                                                                  +

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Trans Fat 0g

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                  +

                                                                                                                                  Sodium 160mg 7%

                                                                                                                                  +

                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                  +

                                                                                                                                  Dietary Fiber 4g

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Total Sugars 12g

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                  + ``` @@ -136,54 +140,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f887466db4ba14b5342cc.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f887466db4ba14b5342cc.md index cd8f2458700..0eebf4f72ec 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f887466db4ba14b5342cc.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f887466db4ba14b5342cc.md @@ -1,8 +1,8 @@ --- id: 615f887466db4ba14b5342cc -title: Step 60 +title: Step 61 challengeType: 0 -dashedName: step-60 +dashedName: step-61 --- # --description-- @@ -13,30 +13,30 @@ Following this element, create a large divider. # --hints-- -You should create a new `p` and `div` element at the end of your `.daily-value.sm-text` element. +You should create a new `p` and `div` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` Your new `p` element should have the text `Protein 3g`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.innerText.match(/Protein[\s|\n]+3g/)); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.innerText.match(/Protein[\s|\n]+3g/)); ``` Your new `p` element should have the `class` attribute set to `no-divider`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('no-divider')); ``` -Your new `div` should have the `class` attribute set to `divider lg`. +Your new `div` should have the `class` attribute set to `divider large`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('lg')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('large')); ``` # --seed-- @@ -46,48 +46,53 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Amount per serving

                                                                                                                                  -

                                                                                                                                  Calories 230

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

                                                                                                                                  % Daily Value *

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Total Fat 8g10%

                                                                                                                                  -

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Trans Fat 0g

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                  -

                                                                                                                                  Sodium 160mg 7%

                                                                                                                                  -

                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                  -

                                                                                                                                  Dietary Fiber 4g

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Total Sugars 12g

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Amount per serving

                                                                                                                                  +

                                                                                                                                  Calories

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

                                                                                                                                  % Daily Value *

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Total Fat 8g 10%

                                                                                                                                  +

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Trans Fat 0g

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                  +

                                                                                                                                  Sodium 160mg 7%

                                                                                                                                  +

                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                  +

                                                                                                                                  Dietary Fiber 4g

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Total Sugars 12g

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                  +
                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                  + ``` @@ -119,54 +124,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f89e055040ba294719d2f.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f89e055040ba294719d2f.md index a2328b173c3..afd3461cfce 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f89e055040ba294719d2f.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f89e055040ba294719d2f.md @@ -1,39 +1,40 @@ --- id: 615f89e055040ba294719d2f -title: Step 61 +title: Step 62 challengeType: 0 -dashedName: step-61 +dashedName: step-62 --- # --description-- -Create another `p` element below your large divider. Give the `p` element the text `Vitamin D 2mcg 10%`. Use a `span` to make the `10%` align to the right, but do not make it bold. +Create another `p` element below your large divider. Give the `p` element the text `Vitamin D 2mcg 10%`. + +The `p` element contains only text, you can wrap the percentage in a `span` element so that it is considered a separate entity from the rest of the text, and it's moved to the right. # --hints-- -You should create a new `p` element at the end of your `.daily-value.sm-text` element. +You should create a new `p` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` Your new `p` element should have the text `Vitamin D 2mcg 10%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Vitamin D 2mcg[\s|\n]+10%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Vitamin D 2mcg[\s|\n]+10%/)); ``` Your new `p` element should have a `span` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 1); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 1); ``` -Your `span` element should have the `class` set to `right`. Remember you should not make it bold. +Your `span` element should not be bold. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.classList?.contains('right')); -assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.classList?.contains('bold')); +assert(!document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span')?.classList?.contains('bold')); ``` # --seed-- @@ -43,50 +44,55 @@ assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.queryS ```html - - - Nutrition Label - - - - -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Amount per serving

                                                                                                                                  -

                                                                                                                                  Calories 230

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

                                                                                                                                  % Daily Value *

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Total Fat 8g10%

                                                                                                                                  -

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Trans Fat 0g

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                  -

                                                                                                                                  Sodium 160mg 7%

                                                                                                                                  -

                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                  -

                                                                                                                                  Dietary Fiber 4g

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Total Sugars 12g

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                  -

                                                                                                                                  Protein 3g

                                                                                                                                  -
                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Amount per serving

                                                                                                                                  +

                                                                                                                                  Calories

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

                                                                                                                                  % Daily Value *

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Total Fat 8g 10%

                                                                                                                                  +

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Trans Fat 0g

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                  +

                                                                                                                                  Sodium 160mg 7%

                                                                                                                                  +

                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                  +

                                                                                                                                  Dietary Fiber 4g

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Total Sugars 12g

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                  +

                                                                                                                                  Protein 3g

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                  + ``` @@ -118,54 +124,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8bfe0f30a1a3c340356b.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8bfe0f30a1a3c340356b.md index 82801b25679..68a0d9093d8 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8bfe0f30a1a3c340356b.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8bfe0f30a1a3c340356b.md @@ -1,8 +1,8 @@ --- id: 615f8bfe0f30a1a3c340356b -title: Step 62 +title: Step 63 challengeType: 0 -dashedName: step-62 +dashedName: step-63 --- # --description-- @@ -11,55 +11,53 @@ Create another `p` element, give it the text `Calcium 260mg 20%`. Align `20%` to # --hints-- -You should create two new `p` elements at the end of your `.daily-value.sm-text` element. +You should create two new `p` elements at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); ``` Your first new `p` element should have the text `Calcium 260mg 20%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.innerText?.match(/Calcium 260mg[\s|\n]+20%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.innerText?.match(/Calcium 260mg[\s|\n]+20%/)); ``` Your first new `p` element should have a `span` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.localName === 'span'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.localName === 'span'); ``` -Your first `span` element should have the `class` attribute set to `right`. Remember, do not make it bold. +Your first `span` element should not be bold. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.classList?.contains('right')); -assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.classList?.contains('bold')); +assert(!document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.classList?.contains('bold')); ``` Your first `span` element should wrap the text `20%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.innerText === '20%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.innerText === '20%'); ``` Your second new `p` element should have the text `Iron 8mg 45%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Iron 8mg[\s|\n]+45%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Iron 8mg[\s|\n]+45%/)); ``` Your second new `p` element should have a `span` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.localName === 'span'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.localName === 'span'); ``` -Your second `span` element should have the `class` attribute set to `right`. Remember, do not make it bold. +Your second `span` element should not be bold. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('right')); -assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(!document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); ``` # --seed-- @@ -69,51 +67,56 @@ assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstE ```html - - - Nutrition Label - - - - -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Amount per serving

                                                                                                                                  -

                                                                                                                                  Calories 230

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

                                                                                                                                  % Daily Value *

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Total Fat 8g10%

                                                                                                                                  -

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Trans Fat 0g

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                  -

                                                                                                                                  Sodium 160mg 7%

                                                                                                                                  -

                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                  -

                                                                                                                                  Dietary Fiber 4g

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Total Sugars 12g

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                  -

                                                                                                                                  Protein 3g

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Amount per serving

                                                                                                                                  +

                                                                                                                                  Calories

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

                                                                                                                                  % Daily Value *

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Total Fat 8g 10%

                                                                                                                                  +

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Trans Fat 0g

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                  +

                                                                                                                                  Sodium 160mg 7%

                                                                                                                                  +

                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                  +

                                                                                                                                  Dietary Fiber 4g

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Total Sugars 12g

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                  +

                                                                                                                                  Protein 3g

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                  +
                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                  + ``` @@ -145,54 +148,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8f1223601fa546e93f31.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8f1223601fa546e93f31.md index d9873550e4d..50f6553331f 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8f1223601fa546e93f31.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8f1223601fa546e93f31.md @@ -1,8 +1,8 @@ --- id: 615f8f1223601fa546e93f31 -title: Step 63 +title: Step 64 challengeType: 0 -dashedName: step-63 +dashedName: step-64 --- # --description-- @@ -11,35 +11,34 @@ Create the final `p` element for your `.daily-value` section. Give it the text ` # --hints-- -You should create a new `p` element at the end of your `.daily-value.sm-text` element. +You should create a new `p` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` Your new `p` element should have the `class` attribute set to `no-divider`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('no-divider')); ``` Your new `p` element should have the text `Potassium 235mg 6%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Potassium 235mg[\s|\n]+6%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Potassium 235mg[\s|\n]+6%/)); ``` Your new `p` element should have a `span` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 1); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 1); ``` -Your `span` element should have the `class` set to `right`. Remember you should not make it bold. +Your `span` element should not be bold. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.classList?.contains('right')); -assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.classList?.contains('bold')); +assert(!document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span')?.classList?.contains('bold')); ``` # --seed-- @@ -49,53 +48,58 @@ assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.queryS ```html - - - Nutrition Label - - - - -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Amount per serving

                                                                                                                                  -

                                                                                                                                  Calories 230

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

                                                                                                                                  % Daily Value *

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Total Fat 8g10%

                                                                                                                                  -

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Trans Fat 0g

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                  -

                                                                                                                                  Sodium 160mg 7%

                                                                                                                                  -

                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                  -

                                                                                                                                  Dietary Fiber 4g

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Total Sugars 12g

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                  -

                                                                                                                                  Protein 3g

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                  -

                                                                                                                                  Calcium 260mg 20%

                                                                                                                                  -

                                                                                                                                  Iron 8mg 45%

                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Amount per serving

                                                                                                                                  +

                                                                                                                                  Calories

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

                                                                                                                                  % Daily Value *

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Total Fat 8g 10%

                                                                                                                                  +

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Trans Fat 0g

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                  +

                                                                                                                                  Sodium 160mg 7%

                                                                                                                                  +

                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                  +

                                                                                                                                  Dietary Fiber 4g

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Total Sugars 12g

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                  +

                                                                                                                                  Protein 3g

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                  +

                                                                                                                                  Calcium 260mg 20%

                                                                                                                                  +

                                                                                                                                  Iron 8mg 45%

                                                                                                                                  +
                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                  + ``` @@ -127,54 +131,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f905fbd1017a65ca224eb.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f905fbd1017a65ca224eb.md index 540ab15d1a3..4762abe77a4 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f905fbd1017a65ca224eb.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f905fbd1017a65ca224eb.md @@ -1,8 +1,8 @@ --- id: 615f905fbd1017a65ca224eb -title: Step 64 +title: Step 65 challengeType: 0 -dashedName: step-64 +dashedName: step-65 --- # --description-- @@ -23,11 +23,11 @@ You should create a new `div` after your `.daily-value` element. assert(document.querySelector('.daily-value').nextElementSibling?.localName === 'div'); ``` -Your new `div` should have the `class` set to `divider md`. +Your new `div` should have the `class` set to `divider medium`. ```js assert(document.querySelector('.daily-value')?.nextElementSibling?.classList?.contains('divider')); -assert(document.querySelector('.daily-value')?.nextElementSibling?.classList?.contains('md')); +assert(document.querySelector('.daily-value')?.nextElementSibling?.classList?.contains('medium')); ``` You should create a `p` element after your new `div` element. @@ -55,55 +55,60 @@ assert.equal(document.querySelector('.label')?.lastElementChild?.innerText, '* T ```html - - - Nutrition Label - - - - -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Amount per serving

                                                                                                                                  -

                                                                                                                                  Calories 230

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  % Daily Value *

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Total Fat 8g10%

                                                                                                                                  -

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Trans Fat 0g

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                  -

                                                                                                                                  Sodium 160mg 7%

                                                                                                                                  -

                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                  -

                                                                                                                                  Dietary Fiber 4g

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Total Sugars 12g

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                  -

                                                                                                                                  Protein 3g

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                  -

                                                                                                                                  Calcium 260mg 20%

                                                                                                                                  -

                                                                                                                                  Iron 8mg 45%

                                                                                                                                  -

                                                                                                                                  Potassium 235mg 6%

                                                                                                                                  -
                                                                                                                                  ---fcc-editable-region-- ---fcc-editable-region-- + + + Nutrition Label + + + + + +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Amount per serving

                                                                                                                                  +

                                                                                                                                  Calories

                                                                                                                                  +
                                                                                                                                  + 230
                                                                                                                                  - +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  % Daily Value *

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Total Fat 8g 10%

                                                                                                                                  +

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Trans Fat 0g

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                  +

                                                                                                                                  Sodium 160mg 7%

                                                                                                                                  +

                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                  +

                                                                                                                                  Dietary Fiber 4g

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Total Sugars 12g

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                  +

                                                                                                                                  Protein 3g

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                  +

                                                                                                                                  Calcium 260mg 20%

                                                                                                                                  +

                                                                                                                                  Iron 8mg 45%

                                                                                                                                  +

                                                                                                                                  Potassium 235mg 6%

                                                                                                                                  +
                                                                                                                                  + --fcc-editable-region-- + + --fcc-editable-region-- +
                                                                                                                                  + ``` @@ -135,54 +140,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f94786869e1a7fec54375.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f94786869e1a7fec54375.md index 7f44865429f..9fe4a4b4eac 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f94786869e1a7fec54375.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f94786869e1a7fec54375.md @@ -1,8 +1,8 @@ --- id: 615f94786869e1a7fec54375 -title: Step 65 +title: Step 66 challengeType: 0 -dashedName: step-65 +dashedName: step-66 --- # --description-- @@ -36,54 +36,60 @@ assert(new __helpers.CSSHelp(document).getStyle('.note')?.margin === '5px 0px'); ```html - - - Nutrition Label - - - - -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Amount per serving

                                                                                                                                  -

                                                                                                                                  Calories 230

                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Amount per serving

                                                                                                                                  +

                                                                                                                                  Calories

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  % Daily Value *

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Total Fat 8g 10%

                                                                                                                                  -

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Trans Fat 0g

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                  -

                                                                                                                                  Sodium 160mg 7%

                                                                                                                                  -

                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                  -

                                                                                                                                  Dietary Fiber 4g

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Total Sugars 12g

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                  -

                                                                                                                                  Protein 3g

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                  -

                                                                                                                                  Calcium 260mg 20%

                                                                                                                                  -

                                                                                                                                  Iron 8mg 45%

                                                                                                                                  -

                                                                                                                                  Potassium 235mg 6%

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                                                  + 230
                                                                                                                                  - +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  % Daily Value *

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Total Fat 8g 10%

                                                                                                                                  +

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Trans Fat 0g

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                  +

                                                                                                                                  Sodium 160mg 7%

                                                                                                                                  +

                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                  +

                                                                                                                                  Dietary Fiber 4g

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Total Sugars 12g

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                  +

                                                                                                                                  Protein 3g

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                  +

                                                                                                                                  Calcium 260mg 20%

                                                                                                                                  +

                                                                                                                                  Iron 8mg 45%

                                                                                                                                  +

                                                                                                                                  Potassium 235mg 6%

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily + diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                                                  +
                                                                                                                                  + ``` @@ -115,54 +121,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f951dff9317a900ef683f.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f951dff9317a900ef683f.md index cecb81aeeb4..b8f6ec4b62a 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f951dff9317a900ef683f.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f951dff9317a900ef683f.md @@ -1,8 +1,8 @@ --- id: 615f951dff9317a900ef683f -title: Step 66 +title: Step 67 challengeType: 0 -dashedName: step-66 +dashedName: step-67 --- # --description-- @@ -35,54 +35,60 @@ assert(new __helpers.CSSHelp(document).getStyle('.note')?.textIndent === '-8px') ```html - - - Nutrition Label - - - - -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Amount per serving

                                                                                                                                  -

                                                                                                                                  Calories 230

                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Amount per serving

                                                                                                                                  +

                                                                                                                                  Calories

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  % Daily Value *

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Total Fat 8g 10%

                                                                                                                                  -

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Trans Fat 0g

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                  -

                                                                                                                                  Sodium 160mg 7%

                                                                                                                                  -

                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                  -

                                                                                                                                  Dietary Fiber 4g

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Total Sugars 12g

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                  -

                                                                                                                                  Protein 3g

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                  -

                                                                                                                                  Calcium 260mg 20%

                                                                                                                                  -

                                                                                                                                  Iron 8mg 45%

                                                                                                                                  -

                                                                                                                                  Potassium 235mg 6%

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                                                  + 230
                                                                                                                                  - +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  % Daily Value *

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Total Fat 8g 10%

                                                                                                                                  +

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Trans Fat 0g

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                  +

                                                                                                                                  Sodium 160mg 7%

                                                                                                                                  +

                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                  +

                                                                                                                                  Dietary Fiber 4g

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Total Sugars 12g

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                  +

                                                                                                                                  Protein 3g

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                  +

                                                                                                                                  Calcium 260mg 20%

                                                                                                                                  +

                                                                                                                                  Iron 8mg 45%

                                                                                                                                  +

                                                                                                                                  Potassium 235mg 6%

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily + diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                                                  +
                                                                                                                                  + ``` @@ -114,54 +120,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } @@ -182,54 +202,60 @@ p { ```html - - - Nutrition Label - - - - -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Nutrition Facts

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  8 servings per container

                                                                                                                                  -

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Amount per serving

                                                                                                                                  -

                                                                                                                                  Calories 230

                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Amount per serving

                                                                                                                                  +

                                                                                                                                  Calories

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  % Daily Value *

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Total Fat 8g 10%

                                                                                                                                  -

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Trans Fat 0g

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                  -

                                                                                                                                  Sodium 160mg 7%

                                                                                                                                  -

                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                  -

                                                                                                                                  Dietary Fiber 4g

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Total Sugars 12g

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                  -

                                                                                                                                  Protein 3g

                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                  -

                                                                                                                                  Calcium 260mg 20%

                                                                                                                                  -

                                                                                                                                  Iron 8mg 45%

                                                                                                                                  -

                                                                                                                                  Potassium 235mg 6%

                                                                                                                                  -
                                                                                                                                  -
                                                                                                                                  -

                                                                                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                                                  + 230
                                                                                                                                  - +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  % Daily Value *

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Total Fat 8g 10%

                                                                                                                                  +

                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Trans Fat 0g

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                  +

                                                                                                                                  Sodium 160mg 7%

                                                                                                                                  +

                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                  +

                                                                                                                                  Dietary Fiber 4g

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Total Sugars 12g

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                  +

                                                                                                                                  Protein 3g

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                  +

                                                                                                                                  Calcium 260mg 20%

                                                                                                                                  +

                                                                                                                                  Iron 8mg 45%

                                                                                                                                  +

                                                                                                                                  Potassium 235mg 6%

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily + diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                                                  +
                                                                                                                                  + ``` @@ -261,54 +287,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/635bde33c91c80540eae239b.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/635bde33c91c80540eae239b.md new file mode 100644 index 00000000000..d9073bf18ba --- /dev/null +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/635bde33c91c80540eae239b.md @@ -0,0 +1,153 @@ +--- +id: 635bde33c91c80540eae239b +title: Step 41 +challengeType: 0 +dashedName: step-41 +--- + +# --description-- + +The text `* Daily Value %` should be aligned to the right. Create a `.right` selector and use the `justify-content` property to do it. + +# --hints-- + +You should have a `.right` selector. + +```js +const hasRight = new __helpers.CSSHelp(document).getStyle('.right'); +assert(hasRight); + +``` + +The `.right` selector should have the `justify-content` property set to `flex-end`. + +```js +const rightJustifyContent = new __helpers.CSSHelp(document).getStyle('.right')?.getPropertyValue('justify-content'); +assert(rightJustifyContent === 'flex-end'); + +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Nutrition Label + + + + + +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Amount per serving

                                                                                                                                  +

                                                                                                                                  Calories

                                                                                                                                  +
                                                                                                                                  + 230 +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  % Daily Value *

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  + + +``` + +```css +* { + box-sizing: border-box; +} + +html { + font-size: 16px; +} + +body { + font-family: 'Open Sans', sans-serif; +} + +.label { + border: 2px solid black; + width: 270px; + margin: 20px auto; + padding: 0 7px; +} + +header h1 { + text-align: center; + margin: -4px 0; + letter-spacing: 0.15px +} + +p { + margin: 0; + display: flex; + justify-content: space-between; +} + +.divider { + border-bottom: 1px solid #888989; + margin: 2px 0; +} + +.bold { + font-weight: 800; +} + +.large { + height: 10px; +} + +.large, .medium { + background-color: black; + border: 0; +} + +.medium { + height: 5px; +} + +.small-text { + font-size: 0.85rem; +} + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { + margin: -5px -2px; + font-size: 2em; + font-weight: 700; +} + +.calories-info span { + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +--fcc-editable-region-- + +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6395d33ab5d91bf317107c48.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6395d33ab5d91bf317107c48.md new file mode 100644 index 00000000000..e6f009b7e04 --- /dev/null +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6395d33ab5d91bf317107c48.md @@ -0,0 +1,117 @@ +--- +id: 6395d33ab5d91bf317107c48 +title: Step 32 +challengeType: 0 +dashedName: step-32 +--- + +# --description-- + +Create a `.calories-info h2` selector and remove all margins. + +# --hints-- + +Create a `.calories-info h2` selector. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info h2')); +``` + +Your `.calories-info h2` selector should have a `margin` set to `0`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info h2')?.margin === '0px'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Nutrition Label + + + + + +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Amount per serving

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  + + +``` + +```css +* { + box-sizing: border-box; +} + +html { + font-size: 16px; +} + +body { + font-family: 'Open Sans', sans-serif; +} + +.label { + border: 2px solid black; + width: 270px; + margin: 20px auto; + padding: 0 7px; +} + +header h1 { + text-align: center; + margin: -4px 0; + letter-spacing: 0.15px +} + +p { + margin: 0; + display: flex; + justify-content: space-between; +} + +.divider { + border-bottom: 1px solid #888989; + margin: 2px 0; +} + +.bold { + font-weight: 800; +} + +.large { + height: 10px; +} + +.large, .medium { + background-color: black; + border: 0; +} + +.small-text { + font-size: 0.85rem; +} + +--fcc-editable-region-- + +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6396e33fe478dd264ebbf278.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6396e33fe478dd264ebbf278.md new file mode 100644 index 00000000000..6a2dbb37aa9 --- /dev/null +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6396e33fe478dd264ebbf278.md @@ -0,0 +1,135 @@ +--- +id: 6396e33fe478dd264ebbf278 +title: Step 34 +challengeType: 0 +dashedName: step-34 +--- + +# --description-- + +Create a new `.calories-info` selector and give it a `display` property set to `flex`. Also give it a `justify-content` property set to `space-between` and `align-items` property set to `flex-end`. + +# --hints-- + +You should create a `.calories-info` selector. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info')); +``` + +Your `.calories-info` selector should have a `display` property set to `flex`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info')?.display === 'flex'); +``` + +Your `.calories-info` selector should have a `justify-content` property set to `space-between`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info')?.justifyContent === 'space-between'); +``` + +Your `.calories-info` selector should have a `align-items` property set to `flex-end`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info')?.alignItems === 'flex-end'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Nutrition Label + + + + + +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Nutrition Facts

                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  8 servings per container

                                                                                                                                  +

                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +
                                                                                                                                  +

                                                                                                                                  Amount per serving

                                                                                                                                  +

                                                                                                                                  Calories

                                                                                                                                  +
                                                                                                                                  + 230 +
                                                                                                                                  +
                                                                                                                                  + + +``` + +```css +* { + box-sizing: border-box; +} + +html { + font-size: 16px; +} + +body { + font-family: 'Open Sans', sans-serif; +} + +.label { + border: 2px solid black; + width: 270px; + margin: 20px auto; + padding: 0 7px; +} + +header h1 { + text-align: center; + margin: -4px 0; + letter-spacing: 0.15px +} + +p { + margin: 0; + display: flex; + justify-content: space-between; +} + +.divider { + border-bottom: 1px solid #888989; + margin: 2px 0; +} + +.bold { + font-weight: 800; +} + +.large { + height: 10px; +} + +.large, .medium { + background-color: black; + border: 0; +} + +.small-text { + font-size: 0.85rem; +} + +--fcc-editable-region-- + +--fcc-editable-region-- + +.calories-info h2 { + margin: 0; +} +``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c8bf3980c14c438d2aed.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c8bf3980c14c438d2aed.md index 7bec654ec15..ae7f2b797d2 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c8bf3980c14c438d2aed.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c8bf3980c14c438d2aed.md @@ -7,7 +7,7 @@ dashedName: step-39 # --description-- -For now, make your `goStore` function output the message `Going to store.` to the console. For example, here is a function that outputs the message "Hello World". +For now, make your `goStore` function output the message `Going to store.` to the console. For example, here is a function that outputs the message `Hello World`. ```js function functionName() { diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md index a8bef26a706..294662a5750 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md @@ -7,7 +7,7 @@ dashedName: step-62 # --description-- -The `locations` array contains two locations: the town square and the store. Currently you are passing that entire array into the update functions. Pass in only the first element of the `locations` array by adding `[0]` at the end of the variable. For example: `myFunction(arg[0]);`. +The `locations` array contains two locations: the `town square` and the `store`. Currently you are passing that entire array into the `update` function. Pass in only the first element of the `locations` array by adding `[0]` at the end of the variable. For example: `myFunction(arg[0]);`. This is called bracket notation. Values in an array are accessed by index. Indices are numerical values and start at 0 - this is called zero-based indexing. `arg[0]` would be the first element in the `arg` array. diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md index ca8a532ec15..1506701e4ab 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md @@ -7,7 +7,7 @@ dashedName: step-67 # --description-- -Finally, update the `text.innerText` assignment to equal the `text` from the location object. However, instead of using bracket notation, use dot notation. Here is an example of accessing the `name` property of an object called `obj`: `obj.name`. +Finally, update the `text.innerText` assignment to equal the `text` from the `location` object. However, instead of using bracket notation, use dot notation. Here is an example of accessing the `name` property of an object called `obj`: `obj.name`. # --hints-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c89e4272512d44fc1c66.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c89e4272512d44fc1c66.md index cded49b4395..dab6fabe2b3 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c89e4272512d44fc1c66.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c89e4272512d44fc1c66.md @@ -7,7 +7,7 @@ dashedName: step-83 # --description-- -Similar to your `buyHealth` function, set `gold` equal to 30 less than its current value. Make sure this is inside your `if` statement. +Similar to your `buyHealth` function, set `gold` equal to `30` less than its current value. Make sure this is inside your `if` statement. # --hints-- diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/subtract-one-number-from-another-with-javascript.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/subtract-one-number-from-another-with-javascript.md index ee20d1e41b2..b3bb67205c9 100644 --- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/subtract-one-number-from-another-with-javascript.md +++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/subtract-one-number-from-another-with-javascript.md @@ -26,13 +26,13 @@ Cambia el `0` para que la diferencia sea `12`. # --hints-- -La variable `difference` debe ser igual a 12. +The variable `difference` should be equal to `12`. ```js assert(difference === 12); ``` -Sólo debes restar un número de 45. +You should only subtract one number from `45`. ```js assert(/difference=45-33;?/.test(__helpers.removeWhiteSpace(code))); diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-with-the-rest-parameter-to-reassign-array-elements.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-with-the-rest-parameter-to-reassign-array-elements.md index 823f1dc1f90..48f7b73c01a 100644 --- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-with-the-rest-parameter-to-reassign-array-elements.md +++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/es6/use-destructuring-assignment-with-the-rest-parameter-to-reassign-array-elements.md @@ -1,7 +1,7 @@ --- id: 587d7b8a367417b2b2512b4c title: >- - Destructuring via rest elements + Desestructuración vía elementos rest challengeType: 1 forumTopicId: 301218 dashedName: >- @@ -22,11 +22,11 @@ console.log(arr); La consola mostrará los valores `1, 2` y `[3, 4, 5, 7]`. -Las variables `a` y `b` toman el primer y segundo valor del arreglo. After that, because of the rest syntax presence, `arr` gets the rest of the values in the form of an array. El elemento rest sólo funciona correctamente como la última variable en la lista. As in, you cannot use the rest syntax to catch a subarray that leaves out the last element of the original array. +Las variables `a` y `b` toman el primer y segundo valor del arreglo. Luego de esto, debido a la presencia de sintaxis rest `arr` obtiene el rest de los valores en forma de un arreglo. El elemento rest sólo funciona correctamente como la última variable en la lista. Es decir, no se puede utilizar la sintaxis rest para capturar un sub arreglo que deje fuera el último elemento del arreglo original. # --instructions-- -Use a destructuring assignment with the rest syntax to emulate the behavior of `Array.prototype.slice()`. `removeFirstTwo()` debe devolver un sub-arreglo del arreglo original `list` sin los dos primeros elementos. +Utiliza una asignación de desestructuración con la sintaxis rest para emular el comportamiento de `Array.prototype.slice()`. `removeFirstTwo()` debe devolver un sub arreglo del arreglo original `list` con los dos primeros elementos omitidos. # --hints-- diff --git a/curriculum/challenges/espanol/05-back-end-development-and-apis/back-end-development-and-apis-projects/exercise-tracker.md b/curriculum/challenges/espanol/05-back-end-development-and-apis/back-end-development-and-apis-projects/exercise-tracker.md index b876b7d1fff..0a8df7e47d5 100644 --- a/curriculum/challenges/espanol/05-back-end-development-and-apis/back-end-development-and-apis-projects/exercise-tracker.md +++ b/curriculum/challenges/espanol/05-back-end-development-and-apis/back-end-development-and-apis-projects/exercise-tracker.md @@ -20,7 +20,7 @@ Si usas Replit, sigue los siguientes pasos para configurar el proyecto: - Después, verás una ventana `.replit`. - Selecciona `Use run command` y haz clic en el botón `Done`. -Cuando hayas terminado, asegúrate que un demo funcional de tu proyecto esté alojado en algún sitio público. Luego, envía la URL en el campo `Solution Link`. Opcionalmente, también envía un enlace al código fuente de tu proyecto en el campo `GitHub Link`. +Cuando hayas terminado, asegúrate que un demo funcional de tu proyecto esté alojado en algún sitio público. A continuación, introduce la URL en el campo enlace a la solución. Si lo deseas, también puedes enviar un enlace al código fuente de tu proyecto en el campo enlace GitHub. # --instructions-- @@ -411,7 +411,7 @@ La propiedad `description` de cualquier objeto en el arreglo `log` que es devuel ```js async(getUserInput) => { const url = getUserInput('url'); - const res = await fetch(url + '/api/users/', { + const res = await fetch(url + '/api/users', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', @@ -458,7 +458,7 @@ La propiedad `duration` de cualquier objeto en el arreglo `log` que es devuelto ```js async(getUserInput) => { const url = getUserInput('url'); - const res = await fetch(url + '/api/users/', { + const res = await fetch(url + '/api/users', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', @@ -505,7 +505,7 @@ La propiedad `date` de cualquier objeto en el arreglo `log` que es devuelto desd ```js async(getUserInput) => { const url = getUserInput('url'); - const res = await fetch(url + '/api/users/', { + const res = await fetch(url + '/api/users', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', diff --git a/curriculum/challenges/espanol/05-back-end-development-and-apis/back-end-development-and-apis-projects/file-metadata-microservice.md b/curriculum/challenges/espanol/05-back-end-development-and-apis/back-end-development-and-apis-projects/file-metadata-microservice.md index bc6d0bd8964..5ac8496b686 100644 --- a/curriculum/challenges/espanol/05-back-end-development-and-apis/back-end-development-and-apis-projects/file-metadata-microservice.md +++ b/curriculum/challenges/espanol/05-back-end-development-and-apis/back-end-development-and-apis-projects/file-metadata-microservice.md @@ -20,7 +20,7 @@ Si usas Replit, sigue estos pasos para configurar el proyecto: - Siguiente, verás una ventana `.replit`. - Selecciona `Use run command` y haz clic en el botón `Done`. -Cuando hayas acabado, asegúrate de que un demo funcional de tu proyecto, este alojado en algún sitio público. Luego envía la URL a la misma en el campo `Solution Link`. Opcionalmente, también envía un enlace para el código fuente de tu proyecto en el campo `GitHub Link`. +Cuando hayas acabado, asegúrate de que un demo funcional de tu proyecto, este alojado en algún sitio público. A continuación, introduce la URL en el campo enlace a la solución. Si lo deseas, también puedes enviar un enlace al código fuente de tu proyecto en el campo enlace GitHub. # --instructions-- diff --git a/curriculum/challenges/espanol/05-back-end-development-and-apis/back-end-development-and-apis-projects/request-header-parser-microservice.md b/curriculum/challenges/espanol/05-back-end-development-and-apis/back-end-development-and-apis-projects/request-header-parser-microservice.md index efacee6143b..1721c89da20 100644 --- a/curriculum/challenges/espanol/05-back-end-development-and-apis/back-end-development-and-apis-projects/request-header-parser-microservice.md +++ b/curriculum/challenges/espanol/05-back-end-development-and-apis/back-end-development-and-apis-projects/request-header-parser-microservice.md @@ -20,7 +20,7 @@ Si usas Replit, sigue estos pasos para configurar el proyecto: - A continuación, verás una ventana `.replit`. - Selecciona `Use run command` y has clic el botón `Done`. -Una vez que hayas acabado, asegúrate de que un demo funcional del proyecto esté alojado en algún sitio público. Por último, envía la URL mediante el campo `Solution Link`. Opcionalmente, también envía un enlace para el código fuente de tu proyecto en el campo `GitHub Link`. +Una vez que hayas acabado, asegúrate de que un demo funcional del proyecto esté alojado en algún sitio público. A continuación, introduce la URL en el campo enlace a la solución. Si lo deseas, también puedes enviar un enlace al código fuente de tu proyecto en el campo enlace GitHub. # --hints-- diff --git a/curriculum/challenges/espanol/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md b/curriculum/challenges/espanol/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md index da8da6aba7c..192e043d88e 100644 --- a/curriculum/challenges/espanol/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md +++ b/curriculum/challenges/espanol/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md @@ -20,7 +20,7 @@ Si usas Replit, sigue estos pasos para configurar el proyecto: - A continuación, verás una ventana de `.replit`. - Selecciona `Use run command` y has clic el botón `Done`. -Una vez que hayas acabado, asegúrate de que un demo funcional del proyecto esté alojado en algún sitio público. Por último, envía la URL mediante el campo `Solution Link`. Opcionalmente, también envía un enlace para el código fuente de tu proyecto en el campo `GitHub Link`. +Una vez que hayas acabado, asegúrate de que un demo funcional del proyecto esté alojado en algún sitio público. A continuación, introduce la URL en el campo enlace a la solución. Si lo deseas, también puedes enviar un enlace al código fuente de tu proyecto en el campo enlace GitHub. **Nota:** La conversión de zonas horarias no es el propósito de este proyecto, por lo que asumimos que todas las fechas válidas enviadas serán analizadas con `new Date()` como fechas GMT. @@ -106,7 +106,7 @@ Tu proyecto puede manejar fechas que pueden ser analizadas con éxito por `new D ); ``` -Si la fecha de entrada es inválida, la api devuelve un objeto con la estructura `{ error : "Invalid Date" }` +If the input date string is invalid, the API returns an object having the structure `{ error : "Invalid Date" }` ```js (getUserInput) => diff --git a/curriculum/challenges/espanol/05-back-end-development-and-apis/back-end-development-and-apis-projects/url-shortener-microservice.md b/curriculum/challenges/espanol/05-back-end-development-and-apis/back-end-development-and-apis-projects/url-shortener-microservice.md index baabc0f3812..cfbe8e44c3b 100644 --- a/curriculum/challenges/espanol/05-back-end-development-and-apis/back-end-development-and-apis-projects/url-shortener-microservice.md +++ b/curriculum/challenges/espanol/05-back-end-development-and-apis/back-end-development-and-apis-projects/url-shortener-microservice.md @@ -20,7 +20,7 @@ Si usas Replit, sigue estos pasos para configurar el proyecto: - A continuación, verás una ventana de `.replit`. - Selecciona `Use run command` y has clic el botón `Done`. -Una vez que hayas acabado, asegúrate de que un demo funcional del proyecto esté alojado en algún sitio público. Por último, envía la URL mediante el campo `Solution Link`. Opcionalmente, también envía un enlace para el código fuente de tu proyecto en el campo `GitHub Link`. +Una vez que hayas acabado, asegúrate de que un demo funcional del proyecto esté alojado en algún sitio público. A continuación, introduce la URL en el campo enlace a la solución. Si lo deseas, también puedes enviar un enlace al código fuente de tu proyecto en el campo enlace GitHub. # --instructions-- diff --git a/curriculum/challenges/espanol/05-back-end-development-and-apis/basic-node-and-express/meet-the-node-console.md b/curriculum/challenges/espanol/05-back-end-development-and-apis/basic-node-and-express/meet-the-node-console.md index 2e7b2ce10a5..67130b94ad7 100644 --- a/curriculum/challenges/espanol/05-back-end-development-and-apis/basic-node-and-express/meet-the-node-console.md +++ b/curriculum/challenges/espanol/05-back-end-development-and-apis/basic-node-and-express/meet-the-node-console.md @@ -20,7 +20,7 @@ Si usas Replit, sigue los siguientes pasos para configurar el proyecto: - Después, verás una ventana `.replit`. - Selecciona `Use run command` y haz clic en el botón `Done`. -Cuando hayas acabado, asegúrate de que un demo funcional del proyecto, este alojado en algún sitio público. Envía esa URL mediante el campo `Solution Link`. +Cuando hayas acabado, asegúrate de que un demo funcional del proyecto, este alojado en algún sitio público. A continuación, introduce la URL en el campo enlace a la solución. Durante el proceso de desarrollo, es importante poder comprobar lo que ocurre en el código. diff --git a/curriculum/challenges/espanol/05-back-end-development-and-apis/basic-node-and-express/serve-json-on-a-specific-route.md b/curriculum/challenges/espanol/05-back-end-development-and-apis/basic-node-and-express/serve-json-on-a-specific-route.md index d8b1bbe8c83..8efed3dc057 100644 --- a/curriculum/challenges/espanol/05-back-end-development-and-apis/basic-node-and-express/serve-json-on-a-specific-route.md +++ b/curriculum/challenges/espanol/05-back-end-development-and-apis/basic-node-and-express/serve-json-on-a-specific-route.md @@ -18,7 +18,7 @@ Sirve el objeto `{"message": "Hello json"}` como respuesta, en formato JSON, a l # --hints-- -El endpoint `/json` debe servir el objeto json `{"message": "Hello json"}` +The endpoint `/json` should serve the JSON object `{"message": "Hello json"}` ```js (getUserInput) => diff --git a/curriculum/challenges/espanol/05-back-end-development-and-apis/basic-node-and-express/use-the-.env-file.md b/curriculum/challenges/espanol/05-back-end-development-and-apis/basic-node-and-express/use-the-.env-file.md index e69fa0e0c26..7fc6102b3a9 100644 --- a/curriculum/challenges/espanol/05-back-end-development-and-apis/basic-node-and-express/use-the-.env-file.md +++ b/curriculum/challenges/espanol/05-back-end-development-and-apis/basic-node-and-express/use-the-.env-file.md @@ -18,11 +18,11 @@ Añadamos una variable de entorno como opción de configuración. Crea un archivo `.env` en la raíz del directorio de tu proyecto y almacena la variable `MESSAGE_STYLE=uppercase` en él. -Luego, en el manejador `/json` GET route que creaste en el último ejercicio accede a `process.env.MESSAGE_STYLE` y transformar el `message` del objeto de respuesta a mayúsculas si la variable es igual a `uppercase`. El objeto de respuesta debe ser `{"message": "Hello json"}` o `{"message": "HELLO JSON"}`, dependiendo del valor `MESSAGE_STYLE`. Note that you must read the value of `process.env.MESSAGE_STYLE` **inside** the route handler, not outside of it, due to the way our tests run. +Luego, en el manejador `/json` GET route que creaste en el último ejercicio accede a `process.env.MESSAGE_STYLE` y transformar el `message` del objeto de respuesta a mayúsculas si la variable es igual a `uppercase`. El objeto de respuesta debe ser `{"message": "Hello json"}` o `{"message": "HELLO JSON"}`, dependiendo del valor `MESSAGE_STYLE`. Ten en cuenta que debes leer el valor de `process.env.MESSAGE_STYLE` **dentro de** el manejador de rutas, no fuera de él, debido a la forma en que se ejecutan nuestras pruebas. **Nota:** Si estás usando Replit, no puedes crear un archivo `.env`. En su lugar, utiliza la pestaña integrada SECRETS para añadir la variable. -Si estás trabajando localmente, necesitarás el paquete `dotenv`. Carga variables de entorno desde tu archivo `.env` en `process.env`. El paquete `dotenv` se a instalado, y se aguardado en tu archivo `package.json` dentro del proyecto. At the top of your `myApp.js` file, add `require('dotenv').config()` to load the environment variables. +Si estás trabajando localmente, necesitarás el paquete `dotenv`. Carga variables de entorno desde tu archivo `.env` en `process.env`. El paquete `dotenv` se a instalado, y se aguardado en tu archivo `package.json` dentro del proyecto. En la parte superior de tu archivo `myApp.js`, agrega `require('dotenv').config()` para cargar las variables de entorno. # --hints-- diff --git a/curriculum/challenges/espanol/05-back-end-development-and-apis/managing-packages-with-npm/how-to-use-package.json-the-core-of-any-node.js-project-or-npm-package.md b/curriculum/challenges/espanol/05-back-end-development-and-apis/managing-packages-with-npm/how-to-use-package.json-the-core-of-any-node.js-project-or-npm-package.md index 5495c796353..6491399e7ab 100644 --- a/curriculum/challenges/espanol/05-back-end-development-and-apis/managing-packages-with-npm/how-to-use-package.json-the-core-of-any-node.js-project-or-npm-package.md +++ b/curriculum/challenges/espanol/05-back-end-development-and-apis/managing-packages-with-npm/how-to-use-package.json-the-core-of-any-node.js-project-or-npm-package.md @@ -14,19 +14,19 @@ Trabajar en estos desafíos implica escribir tu código usando uno de los siguie - Usa nuestro proyecto de inicio Replit para completar estos desafíos. - Utiliza un constructor de sitios de tu elección para completar el proyecto. Asegúrate de incorporar todos los archivos de nuestro repositorio de GitHub. -If you use Replit, follow these steps to set up the project: +Si usas Replit, sigue los siguientes pasos para configurar el proyecto: -- Start by importing the project on Replit. -- Next, you will see a `.replit` window. -- Select `Use run command` and click the `Done` button. +- Comienza importando el proyecto en Replit. +- A continuación, verás una ventana `.replit` +- Selecciona `Use run command` y haz click en el botón `Done`. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. +Una vez que hayas acabado, asegúrate de que un demo funcional del proyecto esté alojado en algún sitio público. A continuación, introduce la URL en el campo enlace a la solución. -The `package.json` file is the center of any Node.js project or npm package. It stores information about your project, similar to how the <head> section of an HTML document describes the content of a webpage. It consists of a single JSON object where information is stored in key-value pairs. There are only two required fields; "name" and "version", but it’s good practice to provide additional information about your project that could be useful to future users or maintainers. +El archivo `package.json` es el centro de cualquier proyecto Node.js o paquete npm. Almacena información sobre tu proyecto, similar a cómo la sección <head> de un documento HTML describe el contenido de una página web. Está formado por un único objeto JSON donde se guarda la información en pares clave-valor. Sólo hay dos campos obligatorios; "name" y "version", pero es una buena práctica proporcionar información adicional sobre tu proyecto que podría ser útil para futuros usuarios o mantenedores. -If you look at the file tree of your project, you will find the package.json file on the top level of the tree. This is the file that you will be improving in the next couple of challenges. +Si echas un vistazo el árbol de archivos de tu proyecto, encontrarás el archivo package.json en el nivel superior del árbol. Este es el archivo que mejorarás en el próximo par de desafíos. -One of the most common pieces of information in this file is the `author` field. It specifies who created the project, and can consist of a string or an object with contact or other details. An object is recommended for bigger projects, but a simple string like the following example will do for this project. +Uno de los datos más comunes de este archivo es el campo `author`. Específica quién creó el proyecto, y puede consistir en una cadena o un objeto con datos de contacto u otros detalles. Un objeto es recomendable para proyectos de cierta importancia; para nuestro proyecto de prueba, servirá con una simple cadena como la siguiente. ```json "author": "Jane Doe", @@ -34,13 +34,13 @@ One of the most common pieces of information in this file is the `author` field. # --instructions-- -Add your name as the `author` of the project in the package.json file. +Añade tu nombre como `author` del proyecto en el archivo package.json. -**Note:** Remember that you’re writing JSON, so all field names must use double-quotes (") and be separated with a comma (,). +**Nota:** Recuerda que estás escribiendo JSON, de manera que todos los nombres de campos deben ir entre comillas dobles (") y separados por una coma (,). # --hints-- -package.json should have a valid "author" key +package.json debe tener una clave "author" válida ```js (getUserInput) => diff --git a/curriculum/challenges/espanol/05-back-end-development-and-apis/mongodb-and-mongoose/install-and-set-up-mongoose.md b/curriculum/challenges/espanol/05-back-end-development-and-apis/mongodb-and-mongoose/install-and-set-up-mongoose.md index 11fb8ea8376..4440b7a1dea 100644 --- a/curriculum/challenges/espanol/05-back-end-development-and-apis/mongodb-and-mongoose/install-and-set-up-mongoose.md +++ b/curriculum/challenges/espanol/05-back-end-development-and-apis/mongodb-and-mongoose/install-and-set-up-mongoose.md @@ -20,7 +20,7 @@ Si usas Replit, sigue estos pasos para configurar el proyecto: - A continuación, verás una ventana de `.replit`. - Selecciona `Use run command` y has clic el botón `Done`. -Una vez que hayas acabado, asegúrate de que un demo funcional del proyecto esté alojado en algún sitio público. Por último, envía la URL mediante el campo `Solution Link`. +Una vez que hayas acabado, asegúrate de que un demo funcional del proyecto esté alojado en algún sitio público. A continuación, introduce la URL en el campo enlace a la solución. En este desafío, configurarás una base de datos de MongoDB Atlas e importarás los paquetes necesarios para conectarse a él. diff --git a/curriculum/challenges/espanol/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md b/curriculum/challenges/espanol/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md index ff54c547bac..c87894deddb 100644 --- a/curriculum/challenges/espanol/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md +++ b/curriculum/challenges/espanol/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. A template engine enables you to use static template files (such as those written in *Pug*) in your app. At runtime, the template engine replaces variables in a template file with actual values which can be supplied by your server. Then it transforms the template into a static HTML file that is sent to the client. This approach makes it easier to design an HTML page and allows for displaying variables on the page without needing to make an API call from the client. diff --git a/curriculum/challenges/espanol/06-quality-assurance/quality-assurance-and-testing-with-chai/learn-how-javascript-assertions-work.md b/curriculum/challenges/espanol/06-quality-assurance/quality-assurance-and-testing-with-chai/learn-how-javascript-assertions-work.md index 903609df095..ce6096e32ae 100644 --- a/curriculum/challenges/espanol/06-quality-assurance/quality-assurance-and-testing-with-chai/learn-how-javascript-assertions-work.md +++ b/curriculum/challenges/espanol/06-quality-assurance/quality-assurance-and-testing-with-chai/learn-how-javascript-assertions-work.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. # --instructions-- diff --git a/curriculum/challenges/espanol/06-quality-assurance/quality-assurance-projects/american-british-translator.md b/curriculum/challenges/espanol/06-quality-assurance/quality-assurance-projects/american-british-translator.md index 2eec62e9d7b..75f0c064296 100644 --- a/curriculum/challenges/espanol/06-quality-assurance/quality-assurance-projects/american-british-translator.md +++ b/curriculum/challenges/espanol/06-quality-assurance/quality-assurance-projects/american-british-translator.md @@ -20,7 +20,7 @@ Si usas Replit, sigue estos pasos para configurar el proyecto: - Siguiente, verás una ventana `.replit`. - Selecciona `Use run command` y click en el botón `Done`. -Cuando este hecho, asegurate que una demo de trabajo de tu proyecto este hospedad en algún sitio público. Luego envía la URL para esto en el campo `Solution Link`. Opcionalmente, también envía un enlace para el código fuente de tu proyecto en el campo `GitHub Link`. +Cuando este hecho, asegurate que una demo de trabajo de tu proyecto este hospedad en algún sitio público. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --instructions-- diff --git a/curriculum/challenges/espanol/06-quality-assurance/quality-assurance-projects/issue-tracker.md b/curriculum/challenges/espanol/06-quality-assurance/quality-assurance-projects/issue-tracker.md index 6283845e992..c22c87f7d63 100644 --- a/curriculum/challenges/espanol/06-quality-assurance/quality-assurance-projects/issue-tracker.md +++ b/curriculum/challenges/espanol/06-quality-assurance/quality-assurance-projects/issue-tracker.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --instructions-- diff --git a/curriculum/challenges/espanol/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md b/curriculum/challenges/espanol/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md index 259a187a489..566fae52551 100644 --- a/curriculum/challenges/espanol/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md +++ b/curriculum/challenges/espanol/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --instructions-- diff --git a/curriculum/challenges/espanol/06-quality-assurance/quality-assurance-projects/personal-library.md b/curriculum/challenges/espanol/06-quality-assurance/quality-assurance-projects/personal-library.md index b5722f5aec8..fa698d75932 100644 --- a/curriculum/challenges/espanol/06-quality-assurance/quality-assurance-projects/personal-library.md +++ b/curriculum/challenges/espanol/06-quality-assurance/quality-assurance-projects/personal-library.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --instructions-- diff --git a/curriculum/challenges/espanol/06-quality-assurance/quality-assurance-projects/sudoku-solver.md b/curriculum/challenges/espanol/06-quality-assurance/quality-assurance-projects/sudoku-solver.md index 113a15607b7..253d32e2620 100644 --- a/curriculum/challenges/espanol/06-quality-assurance/quality-assurance-projects/sudoku-solver.md +++ b/curriculum/challenges/espanol/06-quality-assurance/quality-assurance-projects/sudoku-solver.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --instructions-- diff --git a/curriculum/challenges/espanol/08-data-analysis-with-python/data-analysis-with-python-projects/sea-level-predictor.md b/curriculum/challenges/espanol/08-data-analysis-with-python/data-analysis-with-python-projects/sea-level-predictor.md index d421e3cf789..e4a715c31e6 100644 --- a/curriculum/challenges/espanol/08-data-analysis-with-python/data-analysis-with-python-projects/sea-level-predictor.md +++ b/curriculum/challenges/espanol/08-data-analysis-with-python/data-analysis-with-python-projects/sea-level-predictor.md @@ -28,7 +28,7 @@ Analizará un conjunto de datos sobre el cambio del nivel medio del mar a nivel Utiliza los datos para completar las siguientes tareas: - Use Pandas to import the data from `epa-sea-level.csv`. -- Use matplotlib to create a scatter plot using the `Year` column as the x-axis and the `CSIRO Adjusted Sea Level` column as the y-axix. +- Use matplotlib to create a scatter plot using the `Year` column as the x-axis and the `CSIRO Adjusted Sea Level` column as the y-axis. - Use the `linregress` function from `scipy.stats` to get the slope and y-intercept of the line of best fit. Plot the line of best fit over the top of the scatter plot. Make the line go through the year 2050 to predict the sea level rise in 2050. - Plot a new line of best fit just using the data from year 2000 through the most recent year in the dataset. Make the line also go through the year 2050 to predict the sea level rise in 2050 if the rate of rise continues as it has since the year 2000. - The x label should be `Year`, the y label should be `Sea Level (inches)`, and the title should be `Rise in Sea Level`. diff --git a/curriculum/challenges/espanol/09-information-security/information-security-projects/anonymous-message-board.md b/curriculum/challenges/espanol/09-information-security/information-security-projects/anonymous-message-board.md index a0988310731..04c98e12279 100644 --- a/curriculum/challenges/espanol/09-information-security/information-security-projects/anonymous-message-board.md +++ b/curriculum/challenges/espanol/09-information-security/information-security-projects/anonymous-message-board.md @@ -22,7 +22,7 @@ Si usas Replit, sigue estos pasos para configurar el proyecto: - Siguiente, verás una ventana`.replit`. - Selecciona `Use run command` y da click en el botón `Done`. -Cuando lo hayas hecho, asegurate que haya una demo de trabajo de tu proyecto hospedada en un sitio público. Luego envía la URL para esta en el campo `Solution Link`. Opcionalmente, además envía un enlace del código fuente de tu proyecto en el campo`GitHub Link`. +Cuando lo hayas hecho, asegurate que haya una demo de trabajo de tu proyecto hospedada en un sitio público. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --instructions-- diff --git a/curriculum/challenges/espanol/09-information-security/information-security-projects/secure-real-time-multiplayer-game.md b/curriculum/challenges/espanol/09-information-security/information-security-projects/secure-real-time-multiplayer-game.md index 5f26b87006f..71cfa0f03b1 100644 --- a/curriculum/challenges/espanol/09-information-security/information-security-projects/secure-real-time-multiplayer-game.md +++ b/curriculum/challenges/espanol/09-information-security/information-security-projects/secure-real-time-multiplayer-game.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --instructions-- diff --git a/curriculum/challenges/espanol/09-information-security/information-security-projects/stock-price-checker.md b/curriculum/challenges/espanol/09-information-security/information-security-projects/stock-price-checker.md index cec06532735..4b8b50f5501 100644 --- a/curriculum/challenges/espanol/09-information-security/information-security-projects/stock-price-checker.md +++ b/curriculum/challenges/espanol/09-information-security/information-security-projects/stock-price-checker.md @@ -24,7 +24,7 @@ Si usas Replit, sigue estos pasos para configurar el proyecto: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --instructions-- diff --git a/curriculum/challenges/espanol/09-information-security/information-security-with-helmetjs/install-and-require-helmet.md b/curriculum/challenges/espanol/09-information-security/information-security-with-helmetjs/install-and-require-helmet.md index 2b8ba1978e7..a3716d673e8 100644 --- a/curriculum/challenges/espanol/09-information-security/information-security-with-helmetjs/install-and-require-helmet.md +++ b/curriculum/challenges/espanol/09-information-security/information-security-with-helmetjs/install-and-require-helmet.md @@ -20,7 +20,7 @@ Si usas Replit, sigue estos pasos para configurar el proyecto: - Siguiente, tu verás una ventana `.replit`. - Selecciona `Use run command`y cliquea el botón `Done`. -Cuando esté hecho, asegurate que una demo de tu trabajo este hospedado en un sitio público. Luego envía la URL para ello en el campo `Solution Link`. +Cuando esté hecho, asegurate que una demo de tu trabajo este hospedado en un sitio público. Then submit the URL to it in the Solution Link field. Helmet ayuda asegurar tus aplicaciones Express apps configurando varios encabezados HTTP. diff --git a/curriculum/challenges/espanol/10-coding-interview-prep/algorithms/implement-binary-search.md b/curriculum/challenges/espanol/10-coding-interview-prep/algorithms/implement-binary-search.md index f06375cd688..0f6403ca4ff 100644 --- a/curriculum/challenges/espanol/10-coding-interview-prep/algorithms/implement-binary-search.md +++ b/curriculum/challenges/espanol/10-coding-interview-prep/algorithms/implement-binary-search.md @@ -10,9 +10,10 @@ dashedName: implement-binary-search La búsqueda binaria es un algoritmo de eficiencia **O(log(n))** para la busqueda de elementos en un arreglo ordenado. Funciona de la siguiente manera: -1. Encuentra el valor (`value`) intermedio de un arreglo ordenado. Si este valor es igual al valor que estamos buscando (`value == target`) return (¡Lo encontramos!). +1. Encuentra el valor (`value`) intermedio de un arreglo ordenado. If `value == target` return `true` (The value has been found and the search is complete). 1. Si el valor intermedio es menor del valor que estamos buscando (`value < target`), repetiremos el paso uno en la mitad más chica de nuestro arreglo. 1. Si el valor intermedio es menor del valor que estamos buscando (`value > target`), repetiremos el paso uno en la mitad más chica de nuestro arreglo. +1. If after searching the whole array the value is not present, return `false` (The array has been searched and the value is not in the array). Como lo habrás notado, estamos dividiendo al mitad a un arreglo sucesivamente, por lo que tendremos una eficiencia de log(n). Para este desafío, queremos que muestres tu trabajo: cómo llegaste al valor objetivo... ¡el camino que tomaste! @@ -20,7 +21,7 @@ Como lo habrás notado, estamos dividiendo al mitad a un arreglo sucesivamente, Escribe la función `binarySearch` (búsqueda binaria) que implemente el algoritmo de búsqueda binaria en un arreglo, devolviendo el camino tomado (cada valor intermedio comparado) para encontrar el valor en un arreglo. -La función recibe como parametros un arreglo de números enteros y el número que queremos buscar. Devuleve un arreglo (ordenado) que contiene todos los valores intermedios del arreglo original descartados antes de encontrar el valor deseado. El valor que estamos buscando deberá ser el ultima elemento de nuestro arreglo retornado. Si no encontramos el valor estabamos buscando, devolvemos la cadena `Value Not Found` (Valor no encontrado). +La función recibe como parametros un arreglo de números enteros y el número que queremos buscar. Devuleve un arreglo (ordenado) que contiene todos los valores intermedios del arreglo original descartados antes de encontrar el valor deseado. El valor que estamos buscando deberá ser el ultima elemento de nuestro arreglo retornado. If the value is not found, return the string `Value Not Found`. Por ejemplo `binarySearch([1,2,3,4,5,6,7], 5)` deberá retornar `[4,6,5]`. diff --git a/curriculum/challenges/espanol/10-coding-interview-prep/take-home-projects/build-a-nightlife-coordination-app.md b/curriculum/challenges/espanol/10-coding-interview-prep/take-home-projects/build-a-nightlife-coordination-app.md index f92fee18244..e32413b828b 100644 --- a/curriculum/challenges/espanol/10-coding-interview-prep/take-home-projects/build-a-nightlife-coordination-app.md +++ b/curriculum/challenges/espanol/10-coding-interview-prep/take-home-projects/build-a-nightlife-coordination-app.md @@ -22,7 +22,7 @@ A continuación se encuentran las historias de usuario específicas que debes im **Hint:** Try using the Yelp API to find venues in the cities your users search for. If you use Yelp's API, be sure to mention so in your app. -Cuando hayas terminado, asegúrate que un demo funcional de tu proyecto esté alojado en algún sitio público. Luego, envía la URL en el campo `Solution Link`. Opcionalmente, también envía un enlace al código fuente de tu proyecto en el campo `GitHub Link`. +Cuando hayas terminado, asegúrate que un demo funcional de tu proyecto esté alojado en algún sitio público. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --solutions-- diff --git a/curriculum/challenges/espanol/10-coding-interview-prep/take-home-projects/build-a-voting-app.md b/curriculum/challenges/espanol/10-coding-interview-prep/take-home-projects/build-a-voting-app.md index b80746bd3b1..e0280ce9538 100644 --- a/curriculum/challenges/espanol/10-coding-interview-prep/take-home-projects/build-a-voting-app.md +++ b/curriculum/challenges/espanol/10-coding-interview-prep/take-home-projects/build-a-voting-app.md @@ -28,7 +28,7 @@ Estas son las historias de usuario específicas que debes implementar para este **User Story:** As an authenticated user, if you don't like the options on a poll, you can create a new option. -Cuando hayas terminado, asegúrate de que un demo funcional de tu proyecto esté alojado en algún lugar público. Luego, envía la URL en el campo `Solution Link`. Opcionalmente, también envía un enlace al código fuente de tu proyecto en el campo `GitHub Link`. +Cuando hayas terminado, asegúrate de que un demo funcional de tu proyecto esté alojado en algún lugar público. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --solutions-- diff --git a/curriculum/challenges/espanol/10-coding-interview-prep/take-home-projects/build-an-image-search-abstraction-layer.md b/curriculum/challenges/espanol/10-coding-interview-prep/take-home-projects/build-an-image-search-abstraction-layer.md index 0d6ff4f90e0..23f54b70e60 100644 --- a/curriculum/challenges/espanol/10-coding-interview-prep/take-home-projects/build-an-image-search-abstraction-layer.md +++ b/curriculum/challenges/espanol/10-coding-interview-prep/take-home-projects/build-an-image-search-abstraction-layer.md @@ -18,7 +18,7 @@ Estas son las historias de usuario específicas que debes implementar para este **User Story:** You can get a list of the most recently submitted search strings. -Cuando hayas terminado, asegúrate de que un demo funcional de tu proyecto esté alojado en algún lugar público. Luego, envía la URL en el campo `Solution Link`. Opcionalmente, también envía un enlace al código fuente de tu proyecto en el campo `GitHub Link`. +Cuando hayas terminado, asegúrate de que un demo funcional de tu proyecto esté alojado en algún lugar público. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --solutions-- diff --git a/curriculum/challenges/espanol/10-coding-interview-prep/take-home-projects/chart-the-stock-market.md b/curriculum/challenges/espanol/10-coding-interview-prep/take-home-projects/chart-the-stock-market.md index 0371192a2fc..650954b6ec0 100644 --- a/curriculum/challenges/espanol/10-coding-interview-prep/take-home-projects/chart-the-stock-market.md +++ b/curriculum/challenges/espanol/10-coding-interview-prep/take-home-projects/chart-the-stock-market.md @@ -20,7 +20,7 @@ Estas son las historias de usuario específicas que debes implementar para este **User Story:** You can see changes in real-time when any other user adds or removes a stock. For this you will need to use Web Sockets. -Cuando hayas terminado, asegúrate de que un demo funcional de tu proyecto esté alojado en algún lugar público. Luego, envía la URL en el campo `Solution Link`. Opcionalmente, también envía un enlace al código fuente de tu proyecto en el campo `GitHub Link`. +Cuando hayas terminado, asegúrate de que un demo funcional de tu proyecto esté alojado en algún lugar público. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --solutions-- diff --git a/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/elements-and-tags-question-a.md b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/elements-and-tags-question-a.md new file mode 100644 index 00000000000..f4b05b12871 --- /dev/null +++ b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/elements-and-tags-question-a.md @@ -0,0 +1,54 @@ +--- +id: 637f4e0e72c65bc8e73dfe1e +videoId: LGQuIIv2RVA +title: Elements and Tags Question A +challengeType: 15 +dashedName: elements-and-tags-question-a +--- + +# --description-- + +Almost all elements on an HTML page are just pieces of content wrapped in opening and closing HTML tags. + +Opening tags tell the browser this is the start of an HTML element. They are comprised of a keyword enclosed in angle brackets `<>`. For example, an opening paragraph tag looks like this: `

                                                                                                                                  `. + +Closing tags tell the browser where an element ends. They are almost the same as opening tags; the only difference is that they have a forward slash before the keyword. For example, a closing paragraph tag looks like this: `

                                                                                                                                  `. + +A full paragraph element looks like this: + +element diagram + +You can think of elements as containers for content. The opening and closing tags tell the browser what content the element contains. The browser can then use that information to determine how it should interpret and format the content. + +There are some HTML elements that do not have a closing tag. These elements often look like this: `
                                                                                                                                  ` or ``, but some can also be used without the closing forward slash such as `
                                                                                                                                  ` or ``. These are known as self-closing tags or empty elements because they don’t wrap any content. You will encounter a few of these in later lessons, but for the most part, elements will have both opening and closing tags. + +HTML has a vast list of predefined tags that you can use to create all kinds of different elements. It is important to use the correct tags for content. Using the correct tags can have a big impact on two aspects of your sites: how they are ranked in search engines; and how accessible they are to users who rely on assistive technologies, like screen readers, to use the internet. + +Using the correct elements for content is called semantic HTML. You will explore this in much more depth later on in the curriculum. + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s [Introduction to HTML video](https://www.youtube.com/watch?v=LGQuIIv2RVA&list=PL4-IK0AVhVjM0xE0K2uZRvsM7LkIhsPT-) + +## --text-- + +What are HTML tags? + +## --answers-- + +HTML tags tell the browser what content an element contains. + +--- + +HTML tags tell the browser when to load its content. + +--- + +HTML tags tell the browser what content the next element contains. + + +## --video-solution-- + +1 diff --git a/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/elements-and-tags-question-b.md b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/elements-and-tags-question-b.md new file mode 100644 index 00000000000..9e8720616fb --- /dev/null +++ b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/elements-and-tags-question-b.md @@ -0,0 +1,50 @@ +--- +id: 637f4e1672c65bc8e73dfe1f +videoId: LGQuIIv2RVA +title: Elements and Tags Question B +challengeType: 15 +dashedName: elements-and-tags-question-b +--- + +# --description-- + +Almost all elements on an HTML page are just pieces of content wrapped in opening and closing HTML tags. + +Opening tags tell the browser this is the start of an HTML element. They are comprised of a keyword enclosed in angle brackets <>. For example, an opening paragraph tag looks like this: `

                                                                                                                                  `. + +Closing tags tell the browser where an element ends. They are almost the same as opening tags; the only difference is that they have a forward slash before the keyword. For example, a closing paragraph tag looks like this: `

                                                                                                                                  `. + +A full paragraph element looks like this: + +element diagram + +You can think of elements as containers for content. The opening and closing tags tell the browser what content the element contains. The browser can then use that information to determine how it should interpret and format the content. + +There are some HTML elements that do not have a closing tag. These elements often look like this: `
                                                                                                                                  ` or ``, but some can also be used without the closing forward slash such as `
                                                                                                                                  ` or ``. These are known as self-closing tags or empty elements because they don’t wrap any content. You will encounter a few of these in later lessons, but for the most part, elements will have both opening and closing tags. + +HTML has a vast list of predefined tags that you can use to create all kinds of different elements. It is important to use the correct tags for content. Using the correct tags can have a big impact on two aspects of your sites: how they are ranked in search engines; and how accessible they are to users who rely on assistive technologies, like screen readers, to use the internet. + +Using the correct elements for content is called semantic HTML. You will explore this in much more depth later on in the curriculum. + +# --question-- + +## --text-- + +What are the three parts of most HTML elements? + +## --answers-- + +An opening tag, self closing tag, and content. + +--- + +An opening tag, closing tag, and content. + +--- + +An opening tag, closing tag, and attribute. + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/html-boilerplate-question-a.md b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/html-boilerplate-question-a.md new file mode 100644 index 00000000000..d563ebf0ac3 --- /dev/null +++ b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/html-boilerplate-question-a.md @@ -0,0 +1,55 @@ +--- +id: 637f4e1c72c65bc8e73dfe20 +videoId: V8UAEoOvqFg +title: HTML Boilerplate Question A +challengeType: 15 +dashedName: html-boilerplate-question-a +--- + +# --description-- + +To demonstrate an HTML boilerplate, you first need an HTML file to work with. + +Create a new folder on your computer and name it `html-boilerplate`. Within that folder create a new file and name it `index.html`. + +You’re probably already familiar with a lot of different types of files, for example doc, pdf, and image files. + +To let the computer know you want to create an HTML file, you need to append the filename with the `.html` extension as you have done when creating the `index.html` file. + +It is worth noting that you named your HTML file index. You should always name the HTML file that will contain the homepage of your websites `index.html`. This is because web servers will by default look for an index.html page when users land on your websites - and not having one will cause big problems. + +## The DOCTYPE + +Every HTML page starts with a doctype declaration. The doctype’s purpose is to tell the browser what version of HTML it should use to render the document. The latest version of HTML is HTML5, and the doctype for that version is simply ``. + +The doctypes for older versions of HTML were a bit more complicated. For example, this is the doctype declaration for HTML4: + +```html + +``` + +However, you probably won’t ever want to be using an older version of HTML, and so you’ll always use ``. + +Open the `index.html` file created earlier in your text editor and add `` to the very first line. + +# --question-- +## --text-- + +What is the purpose of the `DOCTYPE` declaration? + +## --answers-- + +It tells the browser which version of HTML to use to render the document. + +--- + +It tells the browser that this document uses JavaScript. + +--- + +It tells the browser the title of the document. + + +## --video-solution-- + +1 diff --git a/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/html-boilerplate-question-b.md b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/html-boilerplate-question-b.md new file mode 100644 index 00000000000..7a528432239 --- /dev/null +++ b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/html-boilerplate-question-b.md @@ -0,0 +1,47 @@ +--- +id: 637f4e2872c65bc8e73dfe21 +videoId: V8UAEoOvqFg +title: HTML Boilerplate Question B +challengeType: 15 +dashedName: html-boilerplate-question-b +--- + +# --description-- + +After you declare the doctype, you need to provide an `` element. This is what’s known as the root element of the document, meaning that every other element in the document will be a descendant of it. + +This becomes more important later on when you learn about manipulating HTML with JavaScript. For now, just know that the `html` element should be included on every HTML document. + +Back in the `index.html` file, let’s add the `` element by typing out its opening and closing tags, like so: + +```html + + + +``` + +## What is the lang attribute? +`lang` specifies the language of the text content in that element. This attribute is primarily used for improving accessibility of the webpage. It allows assistive technologies, for example screen readers, to adapt according to the language and invoke correct pronunciation. + +# --question-- + +## --text-- + +What is the `html` element? + +## --answers-- + +It is the root element in the document and tells the browser which version of HTML it should use. + +--- + +It is the root element in the document and all other elements should descend from it. + +--- + +It is the root element in the document and all other elements should come after it. + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/html-boilerplate-question-c.md b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/html-boilerplate-question-c.md new file mode 100644 index 00000000000..76ceb2841e5 --- /dev/null +++ b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/html-boilerplate-question-c.md @@ -0,0 +1,66 @@ +--- +id: 637f4e2f72c65bc8e73dfe22 +videoId: LGQuIIv2RVA +title: HTML Boilerplate Question C +challengeType: 15 +dashedName: html-boilerplate-question-c +--- + +# --description-- + +The `` element is where you put important meta-information about your webpages, and stuff required for your webpages to render correctly in the browser. Inside the ``, you should not use any element that displays content on the webpage. + +## The Charset Meta Element +You should always have the `meta` tag for the charset encoding of the webpage in the head element: ``. + +Setting the encoding is very important because it ensures that the webpage will display special symbols and characters from different languages correctly in the browser. + +## Title Element +Another element you should always include in the head of an HTML document is the `title` element: + +```html +My First Webpage +``` + +The `title` element is used to give webpages a human-readable title which is displayed in your webpage’s browser tab. + +If you didn’t include a `title` element, the webpage’s title would default to its file name. In your case that would be `index.html`, which isn’t very meaningful for users; this would make it very difficult to find your webpage if the user has many browser tabs open. + +There are many more elements that can go within the `head` of an HTML document. However, for now it’s only crucial to know about the two elements you have covered here. You will introduce more elements that go into the `head` throughout the rest of the curriculum. + +Back in `index.html` file, let’s add a `head` element with a `charset` `meta` element and a `title` within it. The head element goes within the HTML element and should always be the first element under the opening `` tag: + + +```html + + + + + + My First Webpage + + +``` + +# --question-- + +## --text-- + +What is the purpose of the `head` element? + +## --answers-- + +The `head` element is used to display all elements that are displayed on the webpage. + +--- + +The `head` element is used to display important information about your webpage and is used to render web pages correctly with `meta` elements. + +--- + +The `head` element is used to display the header content on top of the webpage. + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/html-boilerplate-question-d.md b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/html-boilerplate-question-d.md new file mode 100644 index 00000000000..302b6a95d44 --- /dev/null +++ b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/html-boilerplate-question-d.md @@ -0,0 +1,48 @@ +--- +id: 637f4e3672c65bc8e73dfe23 +videoId: V8UAEoOvqFg +title: HTML Boilerplate Question D +challengeType: 15 +dashedName: html-boilerplate-question-d +--- + +# --description-- + +The final element needed to complete the HTML boilerplate is the `` element. This is where all the content that will be displayed to users will go - the text, images, lists, links, and so on. + +To complete the boilerplate, add a `body` element to the `index.html` file. The `body` element also goes within the `html` element and is always below the `head` element, like so: + +# --question-- + +## --assignment-- + +Watch and follow along to Kevin Powell’s brilliant Building your first web page video above. + +--- + +Build some muscle memory by deleting the contents of the `index.html` file and trying to write out all the boilerplate again from memory. Don’t worry if you have to peek at the lesson content the first few times if you get stuck. Just keep going until you can do it a couple of times from memory. + +--- + +Run your boilerplate through this [HTML validator](https://www.freeformatter.com/html-validator.html). Validators ensure your markup is correct and are an excellent learning tool, as they provide feedback on syntax errors you may be making often and aren’t aware of, such as missing closing tags and extra spaces in your HTML. + +## --text-- + +What is the purpose of the `body` element? + +## --answers-- + +This is where all important information about the webpage is displayed such as the `title` and `meta` tags. + +--- + +This is where you tell the browser how to render the webpage correctly. + +--- + +This is where all content will be displayed on the page such images, text, and links. + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-a.md b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-a.md new file mode 100644 index 00000000000..aa20f137e89 --- /dev/null +++ b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-a.md @@ -0,0 +1,42 @@ +--- +id: 6374f208de18c50e48ba767b +videoId: LGQuIIv2RVA +title: Introduction To HTML and CSS Question A +challengeType: 15 +dashedName: introduction-to-html-and-css-question-a +--- + +# --description-- + +HTML and CSS are two languages that work together to create everything that you see when you look at something on the internet. HTML is the raw data that a webpage is built out of. All the text, links, cards, lists, and buttons are created in HTML. CSS is what adds style to those plain elements. HTML puts information on a webpage, and CSS positions that information, gives it color, changes the font, and makes it look great! + +Many helpful resources out there keep referring to HTML and CSS as programming languages, but if you want to get technical, labeling them as such is not quite accurate. This is because they are only concerned with presenting information. They are not used to program logic. JavaScript, which you will learn in the next section, is a programming language because it’s used to make webpages do things. Yet, there is quite a lot you can do with just HTML and CSS, and you will definitely need them both. Throughout our curriculum, the following lessons focus on giving you the tools you need to succeed once you reach JavaScript content. + +# --question-- + +## --assignment-- + +Read the HTML vs CSS vs JavaScript article. It is a quick overview of the relationships between HTML, CSS, and JavaScript. + +## --text-- + +Which of the following statements is true? + +## --answers-- + +CSS is used to create the basic structure of a webpage, and HTML is used to add style. + +--- + +HTML is used to create the basic structure of a webpage, and CSS is used to add style. + +--- + +HTML and CSS are used to add style to a webpage, and JavaScript is used to create the basic structure. + + +## --video-solution-- + +2 + + diff --git a/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-b.md b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-b.md new file mode 100644 index 00000000000..cd9cf900330 --- /dev/null +++ b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-b.md @@ -0,0 +1,37 @@ +--- +id: 6376327e2724a688c04636e3 +videoId: LGQuIIv2RVA +title: Introduction To HTML and CSS Question B +challengeType: 15 +dashedName: introduction-to-html-and-css-question-b +--- + +# --description-- + + +HTML and CSS are two languages that work together to create everything that you see when you look at something on the internet. HTML is the raw data that a webpage is built out of. All the text, links, cards, lists, and buttons are created in HTML. CSS is what adds style to those plain elements. HTML puts information on a webpage, and CSS positions that information, gives it color, changes the font, and makes it look great! + +Many helpful resources out there keep referring to HTML and CSS as programming languages, but if you want to get technical, labeling them as such is not quite accurate. This is because they are only concerned with presenting information. They are not used to program logic. JavaScript, which you will learn in the next section, is a programming language because it’s used to make webpages do things. Yet, there is quite a lot you can do with just HTML and CSS, and you will definitely need them both. Throughout our curriculum, the following lessons focus on giving you the tools you need to succeed once you reach JavaScript content. + +# --question-- + +## --text-- + +Between HTML and CSS, which should you use to add paragraphs of text on a webpage? + +## --answers-- + +CSS + +--- + +JavaScript + +--- + +HTML + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-c.md b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-c.md new file mode 100644 index 00000000000..eb759394680 --- /dev/null +++ b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-c.md @@ -0,0 +1,34 @@ +--- +id: 637633162724a688c04636e4 +videoId: LGQuIIv2RVA +title: Introduction To HTML and CSS Question C +challengeType: 15 +dashedName: introduction-to-html-and-css-question-c +--- + +# --description-- + +HTML and CSS are two languages that work together to create everything that you see when you look at something on the internet. HTML is the raw data that a webpage is built out of. All the text, links, cards, lists, and buttons are created in HTML. CSS is what adds style to those plain elements. HTML puts information on a webpage, and CSS positions that information, gives it color, changes the font, and makes it look great! + +Many helpful resources out there keep referring to HTML and CSS as programming languages, but if you want to get technical, labeling them as such is not quite accurate. This is because they are only concerned with presenting information. They are not used to program logic. JavaScript, which you will learn in the next section, is a programming language because it’s used to make webpages do things. Yet, there is quite a lot you can do with just HTML and CSS, and you will definitely need them both. Throughout our curriculum, the following lessons focus on giving you the tools you need to succeed once you reach JavaScript content. +# --question-- + +## --text-- + +Between HTML and CSS, which should you use to change the font and background color of a button? + +## --answers-- + +You should use CSS to change the background color and font of a button. + +--- + +You should use JavaScript to change the background color and font of a button. + +--- + +You should use HTML to change the background color and font of a button. + +## --video-solution-- + +1 diff --git a/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-d.md b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-d.md new file mode 100644 index 00000000000..9e9ee049b75 --- /dev/null +++ b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-d.md @@ -0,0 +1,35 @@ +--- +id: 637633672724a688c04636e5 +videoId: LGQuIIv2RVA +title: Introduction To HTML and CSS Question D +challengeType: 15 +dashedName: introduction-to-html-and-css-question-d +--- + +# --description-- + +HTML and CSS are two languages that work together to create everything that you see when you look at something on the internet. HTML is the raw data that a webpage is built out of. All the text, links, cards, lists, and buttons are created in HTML. CSS is what adds style to those plain elements. HTML puts information on a webpage, and CSS positions that information, gives it color, changes the font, and makes it look great! + +Many helpful resources out there keep referring to HTML and CSS as programming languages, but if you want to get technical, labeling them as such is not quite accurate. This is because they are only concerned with presenting information. They are not used to program logic. JavaScript, which you will learn in the next section, is a programming language because it’s used to make webpages do things. Yet, there is quite a lot you can do with just HTML and CSS, and you will definitely need them both. Throughout our curriculum, the following lessons focus on giving you the tools you need to succeed once you reach JavaScript content. + +# --question-- + +## --text-- + +What is the difference between HTML, CSS, and JavaScript? + +## --answers-- + +HTML is for creating interactive elements, CSS is for the look and feel, and JavaScript is for creating the structure of a webpage. + +--- + +CSS is for the look and feel, JavaScript is for creating interactive elements, and HTML is for creating the structure of a webpage. + +--- + +JavaScript is for the look and feel, CSS is for creating the structure, and HTML is for creating interactive elements of a webpage. + +## --video-solution-- + +2 diff --git a/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/links-and-images-question-a.md b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/links-and-images-question-a.md new file mode 100644 index 00000000000..b4d237448f3 --- /dev/null +++ b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/links-and-images-question-a.md @@ -0,0 +1,66 @@ +--- +id: 637f704072c65bc8e73dfe36 +videoId: tsEQgGjSmkM +title: Links and Images Question A +challengeType: 15 +dashedName: links-and-images-question-a +--- + +# --description-- + +To get some practice using links and images throughout this lesson you need an HTML project to work with. + +- Create a new directory named `odin-links-and-images`. + +- Within that directory, create a new file named `index.html`. + +- Fill in the usual HTML boilerplate. + +- Finally, add the following `h1` to the `body`: `

                                                                                                                                  Homepage

                                                                                                                                  ` + +## Anchor Elements +To create a link in HTML, you use the anchor element. An anchor element is defined by wrapping the text or another HTML element you want to be a link with an `` tag. Add the following to the `body` of the `index.html` page you created and open it in the browser: + +```html +click me +``` + +You may have noticed that clicking this link doesn’t do anything. This is because an anchor tag on its own won’t know where you want to link to. You have to tell it a destination to go to. You do this by using an HTML attribute. + +An HTML attribute gives additional information to an HTML element and always goes in the element’s opening tag. An attribute is usually made up of two parts: a name, and a value; however, not all attributes require a value. In your case, you need to add a `href` (hyperlink reference) attribute to the opening anchor tag. The value of the `href` attribute is the destination you want your link to go to. + +Add the following `href` attribute to the anchor element you created previously and try clicking it again, don’t forget to refresh the browser so the new changes can be applied. + +```html +click me +``` + +By default, any text wrapped with an anchor tag without a `href` attribute will look like plain text. If the `href` attribute is present, the browser will give the text a blue color and underline it to signify it is a link. + +It’s worth noting you can use anchor tags to link to any kind of resource on the internet, not just other HTML documents. You can link to videos, pdf files, images, and so on, but for the most part, you will be linking to other HTML documents. + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s HTML Links video above. + +## --text-- + +What HTML tag is used to create a link? + +## --answers-- + +`` + +--- + +`

                                                                                                                                  ` + +--- + +`

                                                                                                                                    ` + +## --video-solution-- + +1 diff --git a/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/links-and-images-question-b.md b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/links-and-images-question-b.md new file mode 100644 index 00000000000..164fb01214f --- /dev/null +++ b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/links-and-images-question-b.md @@ -0,0 +1,55 @@ +--- +id: 637f703572c65bc8e73dfe35 +videoId: tsEQgGjSmkM +title: Links and Images Question B +challengeType: 15 +dashedName: links-and-images-question-b +--- + +# --description-- + +To get some practice using links and images throughout this lesson you need an HTML project to work with. + +- Create a new directory named odin-links-and-images. + +- Within that directory, create a new file named index.html. + +- Fill in the usual HTML boilerplate. + +- finally, add the following h1 to the body: `

                                                                                                                                    Homepage

                                                                                                                                    ` + +## Anchor Elements +To create a link in HTML, you use the anchor element. An anchor element is defined by wrapping the text or another HTML element you want to be a link with an `
                                                                                                                                    ` tag. Add the following to the body of the index.html page you created and open it in the browser: + +```html +click me +``` + +You may have noticed that clicking this link doesn’t do anything. This is because an anchor tag on its own won’t know where you want to link to. You have to tell it a destination to go to. You do this by using an HTML attribute. An HTML attribute gives additional information to an HTML element and always goes in the element’s opening tag. An attribute is usually made up of two parts: a name, and a value; however, not all attributes require a value. In your case, you need to add a href (hyperlink reference) attribute to the opening anchor tag. The value of the href attribute is the destination you want your link to go to. Add the following href attribute to the anchor element you created previously and try clicking it again, don’t forget to refresh the browser so the new changes can be applied. + +```html +click me +``` + +By default, any text wrapped with an anchor tag without a `href` attribute will look like plain text. If the `href` attribute is present, the browser will give the text a blue color and underline it to signify it is a link. It’s worth noting you can use anchor tags to link to any kind of resource on the internet, not just other HTML documents. You can link to videos, pdf files, images, and so on, but for the most part, you will be linking to other HTML documents. + +# --question-- +## --text-- + +What is an attribute? +## --answers-- + +An HTML attribute gives additional information to an HTML element and always goes in the element’s closing tag. + +--- + +An HTML attribute is used to tell the browser what the element contains. + +--- + +An HTML attribute gives additional information to an HTML element and always goes in the element’s opening tag. + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/links-and-images-question-c.md b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/links-and-images-question-c.md new file mode 100644 index 00000000000..c8a3913d77e --- /dev/null +++ b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/links-and-images-question-c.md @@ -0,0 +1,56 @@ +--- +id: 637f703072c65bc8e73dfe34 +videoId: tsEQgGjSmkM +title: Links and Images Question C +challengeType: 15 +dashedName: links-and-images-question-c +--- + +# --description-- + +To get some practice using links and images throughout this lesson you need an HTML project to work with. + +- Create a new directory named odin-links-and-images. + +- Within that directory, create a new file named index.html. + +- Fill in the usual HTML boilerplate. + +- finally, add the following h1 to the body: `

                                                                                                                                    Homepage

                                                                                                                                    ` + +## Anchor Elements +To create a link in HTML, you use the anchor element. An anchor element is defined by wrapping the text or another HTML element you want to be a link with an `` tag. Add the following to the body of the index.html page you created and open it in the browser: + +```html +click me +``` + +You may have noticed that clicking this link doesn’t do anything. This is because an anchor tag on its own won’t know where you want to link to. You have to tell it a destination to go to. You do this by using an HTML attribute. An HTML attribute gives additional information to an HTML element and always goes in the element’s opening tag. An attribute is usually made up of two parts: a name, and a value; however, not all attributes require a value. In your case, you need to add a href (hyperlink reference) attribute to the opening anchor tag. The value of the href attribute is the destination you want your link to go to. Add the following href attribute to the anchor element you created previously and try clicking it again, don’t forget to refresh the browser so the new changes can be applied. + +```html +click me +``` + +By default, any text wrapped with an anchor tag without a `href` attribute will look like plain text. If the `href` attribute is present, the browser will give the text a blue color and underline it to signify it is a link. It’s worth noting you can use anchor tags to link to any kind of resource on the internet, not just other HTML documents. You can link to videos, pdf files, images, and so on, but for the most part, you will be linking to other HTML documents. + +# --question-- + +## --text-- + +What attribute tells links where to go to? + +## --answers-- + +`src` + +--- + +`href` + +--- + +`link` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/links-and-images-question-d.md b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/links-and-images-question-d.md new file mode 100644 index 00000000000..2b6a665eb87 --- /dev/null +++ b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/links-and-images-question-d.md @@ -0,0 +1,112 @@ +--- +id: 637f702872c65bc8e73dfe33 +videoId: ta3Oxx7Yqbo +title: Links and Images Question D +challengeType: 15 +dashedName: links-and-images-question-d +--- + +# --description-- + + +Generally, there are two kinds of links you will create: + +- Links to pages on other websites on the internet + +- Links to pages located on your own websites + + +## Absolute Links +Links to pages on other websites on the internet are called absolute links. A typical absolute link will be made up of the following parts: `protocol://domain/path`. An absolute link will always contain the protocol and domain of the destination. + +You’ve already seen an absolute link in action. The link you created to The Odin Project’s About page earlier was an absolute link as it contains the protocol and domain. + +`https://www.theodinproject.com/about` + +## Relative Links +Links to other pages within your own website are called relative links. Relative links do not include the domain name, since it is another page on the same site, it assumes the domain name will be the same as the page you created the link on. + +Relative links only include the file path to the other page, relative to the page you are creating the link on. This is quite abstract, let’s see this in action using an example. + +Within the `odin-links-and-images` directory, create another HTML file named `about.html` and paste the following code into it: + +```html + + + + + Odin Links and Images + + + +

                                                                                                                                    About Page

                                                                                                                                    + + +``` + +Back in the index page, add the following anchor element to create a link to the about page: + +```html + +

                                                                                                                                    Homepage

                                                                                                                                    + click me + + About + +``` + +Open the index file in a browser and click on the about link to make sure it is all wired together correctly. Clicking the link should go to the about page you just created. + +This works because the index and about page are in the same directory. That means you can simply use its name (`about.html`) as the link’s href value. + +But you will usually want to organize your website directories a little better. Normally you would only have the `index.html` at the root directory and all other HTML files in their own directory. + +Create a directory named `pages` within the `odin-links-and-images` directory and move the `about.html` file into this new directory. + +Refresh the index page in the browser and then click on the about link. It will now be broken. This is because the location of the about page file has changed. + +To fix this, you just need to update the about link `href` value to include the `pages/` directory since that is the new location of the about file relative to the index file. + +```html + +

                                                                                                                                    Homepage

                                                                                                                                    + About + +``` + +Refresh the index page in the browser and try clicking the about link again, it should now be back in working order. + +In many cases, this will work just fine; however, you can still run into unexpected issues with this approach. Prepending `./` before the link will in most cases prevent such issues. By adding `./` you are specifying to your code that it should start looking for the file/directory relative to the **current** directory. + +```html + +

                                                                                                                                    Homepage

                                                                                                                                    + About + +``` + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s HTML File Structure video above. + +## --text-- + +What is the difference between an absolute and a relative link? + +## --answers-- + +An absolute link is a link to another page on the current website. A relative link is a link to another website. + +--- + +An absolute link is a link to another website. A relative link is a link another page on the current website. + +--- + +There is no difference between absolute and relative links. + +## --video-solution-- + +2 diff --git a/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/links-and-images-question-e.md b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/links-and-images-question-e.md new file mode 100644 index 00000000000..a935ae3262a --- /dev/null +++ b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/links-and-images-question-e.md @@ -0,0 +1,98 @@ +--- +id: 637f702372c65bc8e73dfe32 +videoId: 0xoztJCHpbQ +title: Links and Images Question E +challengeType: 15 +dashedName: links-and-images-question-e +--- + +# --description-- + +Websites would be fairly boring if they could only display text. Luckily HTML provides a wide variety of elements for displaying all sorts of different media. The most widely used of these is the image element. + +To display an image in HTML you use the `` element. Unlike the other elements you have encountered, the `` element is self-closing. Empty, self-closing HTML elements do not need a closing tag. + +Instead of wrapping content with an opening and closing tag, it embeds an image into the page using a `src` attribute which tells the browser where the image file is located. The `src` attribute works much like the `href` attribute for anchor tags. It can embed an image using both absolute and relative paths. + +For example, using an absolute path you can display an image located on The Odin Project site: + + + +To use images that you have on your own websites, you can use a relative path. + +- Create a new directory named `images` within the `odin-links-and-images` project. + +- Next, download [this image](https://unsplash.com/photos/Mv9hjnEUHR4/download?force=true&w=640) and move it into the `images` directory you just created. + +- Rename the image to `dog.jpg`. + +Finally add the image to the `index.html` file: + +```html + +

                                                                                                                                    Homepage

                                                                                                                                    + click me + + About + + + +``` + +Save the `index.html` file and open it in a browser to view Charles in all his glory. + + +## Parent Directories + +What if you want to use the dog image in the about page? You would first have to go up one level out of the pages directory into its parent directory so you could then access the images directory. + +To go to the parent directory you need to use two dots in the relative filepath like this: `../.` Let’s see this in action, within the body of the `about.html` file, add the following image below the heading you added earlier: + +```html + +``` + +To break this down: + +- First, you are going to the parent directory of the pages directory which is `odin-links-and-images`. + +- Then, from the parent directory, you can go into the `images` directory. + +- Finally, you can access the `dog.jpg` file. + +Using the metaphor we used earlier, using `../` in a filepath is kind of like stepping out from the room you are currently in to the main hallway so you can go to another room. + +## `Alt` attribute + +Besides the `src` attribute, every image element should also have an `alt` (alternative text) attribute. + +The `alt` attribute is used to describe an image. It will be used in place of the image if it cannot be loaded. It is also used with screen readers to describe what the image is to visually impaired users. + +This is how the The Odin Project logo example you used earlier looks with an `alt` attribute included: + + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s HTML Images Video above. + +## --text-- + +Which tag is used to display an image? + +## --answers-- + +`` + +--- + +`` + +--- + +`` + +## --video-solution-- + +3 diff --git a/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/links-and-images-question-f.md b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/links-and-images-question-f.md new file mode 100644 index 00000000000..ba4eb809e5d --- /dev/null +++ b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/links-and-images-question-f.md @@ -0,0 +1,94 @@ +--- +id: 637f701c72c65bc8e73dfe31 +videoId: 0xoztJCHpbQ +title: Links and Images Question F +challengeType: 15 +dashedName: links-and-images-question-f +--- + +# --description-- + +Websites would be fairly boring if they could only display text. Luckily HTML provides a wide variety of elements for displaying all sorts of different media. The most widely used of these is the image element. + +To display an image in HTML you use the `` element. Unlike the other elements you have encountered, the `` element is self-closing. Empty, self-closing HTML elements do not need a closing tag. + +Instead of wrapping content with an opening and closing tag, it embeds an image into the page using a src attribute which tells the browser where the image file is located. The src attribute works much like the href attribute for anchor tags. It can embed an image using both absolute and relative paths. + +For example, using an absolute path you can display an image located on The Odin Project site: + + + +To use images that you have on your own websites, you can use a relative path. + +- Create a new directory named `images` within the `odin-links-and-images` project. + +- Next, download [this image](https://unsplash.com/photos/Mv9hjnEUHR4/download?force=true&w=640) and move it into the images directory you just created. + +- Rename the image to `dog.jpg`. + +Finally add the image to the `index.html` file: + +```html + +

                                                                                                                                    Homepage

                                                                                                                                    +
                                                                                                                                    click me + + About + + + +``` + +Save the `index.html` file and open it in a browser to view Charles in all his glory. + + +## Parent Directories + +What if you want to use the dog image in the about page? You would first have to go up one level out of the pages directory into its parent directory so you could then access the images directory. + +To go to the parent directory you need to use two dots in the relative filepath like this: `../.` Let’s see this in action, within the body of the `about.html` file, add the following image below the heading you added earlier: + +```html + +``` + +To break this down: + +- First, you are going to the parent directory of the pages directory which is `odin-links-and-images`. + +- Then, from the parent directory, you can go into the `images` directory. + +- Finally, you can access the `dog.jpg` file. + +Using the metaphor we used earlier, using `../` in a filepath is kind of like stepping out from the room you are currently in to the main hallway so you can go to another room. + +## Alt attribute + +Besides the src attribute, every image element should also have an alt (alternative text) attribute. + +The alt attribute is used to describe an image. It will be used in place of the image if it cannot be loaded. It is also used with screen readers to describe what the image is to visually impaired users. + +This is how the The Odin Project logo example you used earlier looks with an alt attribute included: + + +# --question-- + +## --text-- + +What two attributes do images always need to have? + +## --answers-- + +`href` and `alt` + +--- + +`name` and `href` + +--- + +`alt` and `src` + +## --video-solution-- + +3 diff --git a/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/links-and-images-question-g.md b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/links-and-images-question-g.md new file mode 100644 index 00000000000..d1a6fcd4406 --- /dev/null +++ b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/links-and-images-question-g.md @@ -0,0 +1,94 @@ +--- +id: 637f701572c65bc8e73dfe30 +videoId: 0xoztJCHpbQ +title: Links and Images Question G +challengeType: 15 +dashedName: links-and-images-question-g +--- + +# --description-- + +Websites would be fairly boring if they could only display text. Luckily HTML provides a wide variety of elements for displaying all sorts of different media. The most widely used of these is the image element. + +To display an image in HTML you use the `` element. Unlike the other elements you have encountered, the `` element is self-closing. Empty, self-closing HTML elements do not need a closing tag. + +Instead of wrapping content with an opening and closing tag, it embeds an image into the page using a src attribute which tells the browser where the image file is located. The src attribute works much like the href attribute for anchor tags. It can embed an image using both absolute and relative paths. + +For example, using an absolute path you can display an image located on The Odin Project site: + + + +To use images that you have on your own websites, you can use a relative path. + +- Create a new directory named `images` within the `odin-links-and-images` project. + +- Next, download [this image](https://unsplash.com/photos/Mv9hjnEUHR4/download?force=true&w=640) and move it into the images directory you just created. + +- Rename the image to `dog.jpg`. + +Finally add the image to the `index.html` file: + +```html + +

                                                                                                                                    Homepage

                                                                                                                                    + click me + + About + + + +``` + +Save the `index.html` file and open it in a browser to view Charles in all his glory. + + +## Parent Directories + +What if you want to use the dog image in the about page? You would first have to go up one level out of the pages directory into its parent directory so you could then access the images directory. + +To go to the parent directory you need to use two dots in the relative filepath like this: `../.` Let’s see this in action, within the body of the `about.html` file, add the following image below the heading you added earlier: + +```html + +``` + +To break this down: + +- First, you are going to the parent directory of the pages directory which is `odin-links-and-images`. + +- Then, from the parent directory, you can go into the `images` directory. + +- Finally, you can access the `dog.jpg` file. + +Using the metaphor we used earlier, using `../` in a filepath is kind of like stepping out from the room you are currently in to the main hallway so you can go to another room. + +## Alt attribute + +Besides the src attribute, every image element should also have an alt (alternative text) attribute. + +The alt attribute is used to describe an image. It will be used in place of the image if it cannot be loaded. It is also used with screen readers to describe what the image is to visually impaired users. + +This is how the The Odin Project logo example you used earlier looks with an alt attribute included: + + +# --question-- + +## --text-- + +How do you access a parent directory in a filepath? + +## --answers-- + +`../` + +--- + +`./` + +--- + +`.../` + +## --video-solution-- + +1 diff --git a/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/links-and-images-question-h.md b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/links-and-images-question-h.md new file mode 100644 index 00000000000..cfd73fcfbc1 --- /dev/null +++ b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/links-and-images-question-h.md @@ -0,0 +1,98 @@ +--- +id: 637f700b72c65bc8e73dfe2f +videoId: 0xoztJCHpbQ +title: Links and Images Question H +challengeType: 15 +dashedName: links-and-images-question-h +--- + +# --description-- + +Websites would be fairly boring if they could only display text. Luckily HTML provides a wide variety of elements for displaying all sorts of different media. The most widely used of these is the image element. + +To display an image in HTML you use the `` element. Unlike the other elements you have encountered, the `` element is self-closing. Empty, self-closing HTML elements do not need a closing tag. + +Instead of wrapping content with an opening and closing tag, it embeds an image into the page using a src attribute which tells the browser where the image file is located. The src attribute works much like the href attribute for anchor tags. It can embed an image using both absolute and relative paths. + +For example, using an absolute path you can display an image located on The Odin Project site: + + + +To use images that you have on your own websites, you can use a relative path. + +- Create a new directory named `images` within the `odin-links-and-images` project. + +- Next, download [this image](https://unsplash.com/photos/Mv9hjnEUHR4/download?force=true&w=640) and move it into the images directory you just created. + +- Rename the image to `dog.jpg`. + +Finally add the image to the `index.html` file: + +```html + +

                                                                                                                                    Homepage

                                                                                                                                    + click me + + About + + + +``` + +Save the `index.html` file and open it in a browser to view Charles in all his glory. + + +## Parent Directories + +What if you want to use the dog image in the about page? You would first have to go up one level out of the pages directory into its parent directory so you could then access the images directory. + +To go to the parent directory you need to use two dots in the relative filepath like this: `../.` Let’s see this in action, within the body of the `about.html` file, add the following image below the heading you added earlier: + +```html + +``` + +To break this down: + +- First, you are going to the parent directory of the pages directory which is `odin-links-and-images`. + +- Then, from the parent directory, you can go into the `images` directory. + +- Finally, you can access the `dog.jpg` file. + +Using the metaphor we used earlier, using `../` in a filepath is kind of like stepping out from the room you are currently in to the main hallway so you can go to another room. + +## Alt attribute + +Besides the src attribute, every image element should also have an alt (alternative text) attribute. + +The alt attribute is used to describe an image. It will be used in place of the image if it cannot be loaded. It is also used with screen readers to describe what the image is to visually impaired users. + +This is how the The Odin Project logo example you used earlier looks with an alt attribute included: + + +# --question-- + +## --assignment-- + +Read about the four main image formats that can be used on the web. + +## --text-- + +What are the four main image formats that you can use for images on the web? + +## --answers-- + +TIFF, GIF, PNG, and SVG. + +--- + +JPG, PNG, GIF, and SVG. + +--- + +JPG, PDF, SVG, and GIF. + +## --video-solution-- + +2 diff --git a/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/project-create-a-recipe-page.md b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/project-create-a-recipe-page.md new file mode 100644 index 00000000000..657a3f6e32d --- /dev/null +++ b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/project-create-a-recipe-page.md @@ -0,0 +1,204 @@ +--- +id: 6391d1a4f7ac71efd0621380 +title: Build a Recipe Page Project +challengeType: 14 +dashedName: project-create-a-recipe-page +--- + +# --description-- + +The website will consist of a main index page which will have links to a few recipes. The website won’t look very pretty by the time you’ve finished. + +**User Stories:** + +1. Your recipe page should contain a `DOCTYPE` tag. +1. Your recipe page should include an `html` element with a `head` and `body` element as children. +1. You should have a `title` element within the `head` element with the text `The Odin Recipes`. +1. You should see an `h1` element that has the text `Creamy Chocolate Fudge`. +1. You should see an image with the url `*placeholder-fcc-cdn*` with a fitting `alt` text. +1. There should be an `h2` element with the text `Description` under the image. +1. You should see a couple of paragraphs under `Description` that describe the recipe. +1. There should be an `h2` element with the text `Ingredients` +1. Under the `Ingredients` heading there should be an unordered list with the ingredients needed for the recipe. +1. Under the list of ingredients add another heading called `Steps`. +1. You should see an ordered list with a couple of steps needed to complete the recipe. +1. Under the steps there should be an `h2` element with the text `More Recipes` +1. You should see a couple of links to other recipes inside an unordered list which has a couple of list items with anchor elements within. +1. These anchor elements should have `href` attribute with the value set to `#` + +# --hints-- + +You should have a `DOCTYPE` tag. + +```js +assert(code.match(//gi)); +``` + +You should have a `html` element with `head` and `body` element. + +```js +const html = document.querySelectorAll('html')[0]; +const head = document.querySelectorAll('html > head')[0]; +const body = document.querySelectorAll('html > body')[0]; + +assert(html && head && body); +``` + +You should have a `title` element within the `head` element that contains the text `The Odin Recipes`. + +```js +assert(document.querySelectorAll('HEAD > TITLE')[0].innerText == 'The Odin Recipes'); +``` + +You should have a `h1` element within your `body` element that contains the text `Creamy Chocolate Fudge`. + +```js +assert(document.querySelectorAll('BODY > H1')[0].innerText == 'Creamy Chocolate Fudge'); +``` + +You should have an image with the url `*placeholder-fcc-cdn*` with an `alt` attribute that has a fitting text. + +```js +const img = document.querySelectorAll('IMG')[0]; + +assert(img && img.alt !='' && img.src === 'https://i.imgur.com/p0J5baJ.jpg') +``` + +You should have an `h2` element with the text `Description`. + +```js +const h2 = document.querySelectorAll('H2')[0]; + +assert(h2.innerText == 'Description'); +``` + +You should have at least two `p` elements describing the recipe. + +```js +const paragraphs = document.querySelectorAll('P'); + +assert(paragraphs.length > 1); +``` + +You should have an `h2` element with the text `Ingredients`. + +```js +const h2 = document.querySelectorAll('H2')[1]; + +assert(h2.innerText == 'Ingredients'); +``` + +You should have an unordered list `
                                                                                                                                      ` with some ingredients as the list items `
                                                                                                                                    • `. + +```js +const unorderedList = document.querySelectorAll('UL')[0]; +const listItems = document.querySelectorAll('UL > LI'); + +assert(unorderedList && listItems && listItems.length > 1); +``` + +You should have an `h2` element with the text `Steps`. + +```js +const h2 = document.querySelectorAll('H2')[2]; + +assert(h2.innerText == 'Steps'); +``` + +You should have a `
                                                                                                                                        ` with the the steps as the list items `
                                                                                                                                      1. `. + +```js +const orderedList = document.querySelectorAll('OL')[0]; +const listItems = document.querySelectorAll('OL > LI'); + +assert(orderedList && listItems && listItems.length > 1); +``` + +You should have an `h2` element with the text `More Recipes`. + +```js +const h2 = document.querySelectorAll('H2')[3]; + +assert(h2.innerText == 'More Recipes'); +``` + +You should have an unordered list `
                                                                                                                                          ` element with list items `
                                                                                                                                        • ` that contain `` tags which lead to other recipes. + +```js +const unorderedList = document.querySelectorAll('UL')[1]; +const listItems = unorderedList.querySelectorAll('LI'); + +const allAreListItems = unorderedList.children.length == listItems.length; + +const containsAnchors = [...listItems].every(function(listItem) { + return listItem.querySelector("a") !== null; +}); + +assert(unorderedList && allAreListItems && containsAnchors && listItems.length > 1); +``` + +Your anchor tags linking to the recipes should have a `href` attribute with the value set to `#` + +```js +const anchorTags = document.querySelectorAll("a"); + +const allAnchorsHaveHrefHash = [...anchorTags].every(function(anchorTag) { + return anchorTag.hasAttribute("href") && anchorTag.getAttribute("href") === "#"; +}); + +assert(allAnchorsHaveHrefHash && anchorTags.length > 0); +``` + +# --seed-- + +## --seed-contents-- + +```html + +``` + +```css + +``` + +## --solutions-- + +```html + + + + The Odin Recipes + + +

                                                                                                                                          Creamy Chocolate Fudge

                                                                                                                                          + A delicious chocolate fudge dessert +

                                                                                                                                          Description

                                                                                                                                          +

                                                                                                                                          This recipe is for a rich and creamy chocolate fudge that is sure to satisfy your sweet tooth. It's perfect for a special occasion or as a tasty treat for any time of the year.

                                                                                                                                          +

                                                                                                                                          This recipe is easy to follow and only requires a few simple ingredients. With just a few steps, you'll be able to create a delicious dessert that everyone will love.

                                                                                                                                          +

                                                                                                                                          Ingredients

                                                                                                                                          +
                                                                                                                                            +
                                                                                                                                          • 1 cup sugar
                                                                                                                                          • +
                                                                                                                                          • 1/2 cup unsalted butter
                                                                                                                                          • +
                                                                                                                                          • 1/4 cup milk
                                                                                                                                          • +
                                                                                                                                          • 1/4 cup cocoa powder
                                                                                                                                          • +
                                                                                                                                          • 1/4 cup chocolate chips
                                                                                                                                          • +
                                                                                                                                          • 1/4 tsp salt
                                                                                                                                          • +
                                                                                                                                          • 1 tsp vanilla extract
                                                                                                                                          • +
                                                                                                                                          +

                                                                                                                                          Steps

                                                                                                                                          +
                                                                                                                                            +
                                                                                                                                          1. In a medium saucepan, melt the butter over medium heat.
                                                                                                                                          2. +
                                                                                                                                          3. Add the sugar, milk, cocoa powder, and salt to the saucepan and stir until well combined.
                                                                                                                                          4. +
                                                                                                                                          5. Bring the mixture to a boil, stirring constantly, and then reduce the heat to low and simmer for 5 minutes.
                                                                                                                                          6. +
                                                                                                                                          7. Remove the saucepan from the heat and stir in the chocolate chips and vanilla extract until the chocolate is melted and the mixture is smooth.
                                                                                                                                          8. +
                                                                                                                                          9. Pour the fudge into a greased 8-inch square pan and let it cool completely before cutting into squares.
                                                                                                                                          10. +
                                                                                                                                          +

                                                                                                                                          More Recipes

                                                                                                                                          +
                                                                                                                                          + + +``` diff --git a/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-a.md b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-a.md new file mode 100644 index 00000000000..f4625eb7e31 --- /dev/null +++ b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-a.md @@ -0,0 +1,65 @@ +--- +id: 637f4e3e72c65bc8e73dfe24 +videoId: kcHKFZBVtf4 +title: Understand Ordered and Unordered List Question A +challengeType: 15 +dashedName: understand-ordered-and-unordered-list-question-a +--- + +# --description-- + +If you want to have a list of items where the order doesn’t matter, like a shopping list of items that can be bought in any order, then you can use an unordered list. + +Unordered lists are created using the `
                                                                                                                                            ` element, and each item within the list is created using the list item element `
                                                                                                                                          • `. + +Each list item in an unordered list begins with a bullet point: + + + +If you instead want to create a list of items where the order does matter, like step-by-step instructions for a recipe, or your top 10 favorite TV shows, then you can use an ordered list. + +Ordered lists are created using the `
                                                                                                                                              ` element. Each individual item in them is again created using the list item element `
                                                                                                                                            1. `. However, each list item in an ordered list begins with a number instead: + + + +# --question-- + +## --assignment-- + +Watch the first three minutes of Kevin Powell's video on Ordered and Unordered lists above. + +--- + +Make an unordered shopping list of your favorite foods. + +--- + +Make an ordered list of todo’s you need to get done today. + +--- + +Make an unordered list of places you’d like to visit someday. + +--- + +Make an ordered list of your all time top 5 favorite video games or movies. + +## --text-- + +What HTML tag is used to create an unordered list? + +## --answers-- + +`
                                                                                                                                            2. ` + +--- + +`
                                                                                                                                                ` + +--- + +`
                                                                                                                                                  ` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-b.md b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-b.md new file mode 100644 index 00000000000..4c6822fc504 --- /dev/null +++ b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-b.md @@ -0,0 +1,45 @@ +--- +id: 637f4e4672c65bc8e73dfe25 +videoId: LGQuIIv2RVA +title: Understand Ordered and Unordered List Question B +challengeType: 15 +dashedName: understand-ordered-and-unordered-list-question-b +--- + +# --description-- + +If you want to have a list of items where the order doesn’t matter, like a shopping list of items that can be bought in any order, then you can use an unordered list. + +Unordered lists are created using the `
                                                                                                                                                    ` element, and each item within the list is created using the list item element `
                                                                                                                                                  • `. + +Each list item in an unordered list begins with a bullet point: + + + +If you instead want to create a list of items where the order does matter, like step-by-step instructions for a recipe, or your top 10 favorite TV shows, then you can use an ordered list. + +Ordered lists are created using the `
                                                                                                                                                      ` element. Each individual item in them is again created using the list item element `
                                                                                                                                                    1. `. However, each list item in an ordered list begins with a number instead: + + + +# --question-- + +## --text-- + +What HTML tag is used to create an ordered list? + +## --answers-- + +`
                                                                                                                                                        ` + +--- + +`
                                                                                                                                                      1. ` + +--- + +`
                                                                                                                                                          ` + +## --video-solution-- + +1 diff --git a/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-c.md b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-c.md new file mode 100644 index 00000000000..c766990ca22 --- /dev/null +++ b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-c.md @@ -0,0 +1,45 @@ +--- +id: 637f4e5172c65bc8e73dfe26 +videoId: LGQuIIv2RVA +title: Understand Ordered and Unordered List Question C +challengeType: 15 +dashedName: understand-ordered-and-unordered-list-question-c +--- + +# --description-- + +If you want to have a list of items where the order doesn’t matter, like a shopping list of items that can be bought in any order, then you can use an unordered list. + +Unordered lists are created using the `
                                                                                                                                                            ` element, and each item within the list is created using the list item element `
                                                                                                                                                          • `. + +Each list item in an unordered list begins with a bullet point: + + + +If you instead want to create a list of items where the order does matter, like step-by-step instructions for a recipe, or your top 10 favorite TV shows, then you can use an ordered list. + +Ordered lists are created using the `
                                                                                                                                                              ` element. Each individual item in them is again created using the list item element `
                                                                                                                                                            1. `. However, each list item in an ordered list begins with a number instead: + + + +# --question-- + +## --text-- + +What HTML tag is used to create list items within both unordered and ordered lists? + +## --answers-- + +`
                                                                                                                                                                ` + +--- + +`
                                                                                                                                                              1. ` + +--- + +`
                                                                                                                                                                  ` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/working-with-text-question-a.md b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/working-with-text-question-a.md new file mode 100644 index 00000000000..8698b62aca8 --- /dev/null +++ b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/working-with-text-question-a.md @@ -0,0 +1,60 @@ +--- +id: 637f4e5872c65bc8e73dfe27 +videoId: yqcd-XkxZNM +title: Working With Text Question A +challengeType: 15 +dashedName: working-with-text-question-a +--- + +# --description-- + +What would you expect the following text to output on an HTML page? + +```html + + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor + incididunt ut labore et dolore magna aliqua. + + Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris + nisi ut aliquip ex ea commodo consequat. + +``` + +It looks like two paragraphs of text, and so you might expect it to display in that way. However that is not the case, as you can see in the output below: + + + +When the browser encounters new lines like this in your HTML, it will compress them down into one single space. The result of this compression is that all of the text is clumped together into one long line. + +If you want to create paragraphs in HTML, you need to use the paragraph element, which will add a newline after each of your paragraphs. A paragraph element is defined by wrapping text content with a `

                                                                                                                                                                  ` tag. + +Changing our example from before to use paragraph elements fixes the issue: + + + +# --question-- + +## --assignment-- + +Watch and follow along to Kevin Powell’s HTML Paragraph and Headings Video above. + +## --text-- + +How do you create a paragraph in HTML? + +## --answers-- + +`

                                                                                                                                                                  This is a paragraph

                                                                                                                                                                  ` + +--- + +`

                                                                                                                                                                  This is a paragraph

                                                                                                                                                                  ` + +--- + +`This is a paragraph` + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/working-with-text-question-b.md b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/working-with-text-question-b.md new file mode 100644 index 00000000000..a74d8d11452 --- /dev/null +++ b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/working-with-text-question-b.md @@ -0,0 +1,40 @@ +--- +id: 637f4e5f72c65bc8e73dfe28 +videoId: yqcd-XkxZNM +title: Working With Text Question B +challengeType: 15 +dashedName: working-with-text-question-b +--- + +# --description-- + +Headings are different from other HTML text elements: they are displayed larger and bolder than other text to signify that they are headings. + +There are 6 different levels of headings starting from `

                                                                                                                                                                  ` to `

                                                                                                                                                                  `. The number within a heading tag represents that heading’s level. The largest and most important heading is `h1`, while `h6` is the tiniest heading at the lowest level. + +Headings are defined much like paragraphs. For example, to create an `h1` heading, we wrap our heading text in a `

                                                                                                                                                                  ` tag. + + + +Using the correct level of heading is important as levels provide a hierarchy to the content. An `h1` heading should always be used for the heading of the overall page, and the lower level headings should be used as the headings for content in smaller sections of the page. + +# --question-- +## --text-- + +How many different levels of headings are there and what is the difference between them? + +## --answers-- + +There are 5 different levels of headings. `h5` is the smallest and least important heading, and `h1` is the largest and most important heading. + +--- + +There are 6 different levels of headings. `h6` is the largest and most important heading, and `h1` is the smallest and least important heading. + +--- + +There are 6 different levels of headings. `h1` is the largest and most important heading, and `h6` is the smallest and least important heading. + +## --video-solution-- + +3 diff --git a/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/working-with-text-question-c.md b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/working-with-text-question-c.md new file mode 100644 index 00000000000..6ccf0e06658 --- /dev/null +++ b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/working-with-text-question-c.md @@ -0,0 +1,47 @@ +--- +id: 637f4e6672c65bc8e73dfe29 +videoId: gW6cBZLUk6M +title: Working With Text Question C +challengeType: 15 +dashedName: working-with-text-question-c +--- + +# --description-- + +The `` element makes text bold. It also semantically marks text as important; this affects tools, like screen readers, that users with visual impairments will rely on to use your website. The tone of voice on some screen readers will change to communicate the importance of the text within a `strong` element. To define a `strong` element you wrap text content in a `` tag. + +You can use `strong` on its own: + + + +But you will probably find yourself using the `strong` element much more in combination with other text elements, like this: + + + +Sometimes you will want to make text bold without giving it an important meaning. You’ll learn how to do that in the CSS lessons later in the curriculum. + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s HTML Bold and Italic Text Video above. + +## --text-- + +What element should you use to make text bold and important? + +## --answers-- + +`This is an important message` + +--- + +`

                                                                                                                                                                  This is an important message

                                                                                                                                                                  ` + +--- + +`This is an important message` + +## --video-solution-- + +3 diff --git a/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/working-with-text-question-d.md b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/working-with-text-question-d.md new file mode 100644 index 00000000000..d6647f9a7ea --- /dev/null +++ b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/working-with-text-question-d.md @@ -0,0 +1,39 @@ +--- +id: 637f4e6e72c65bc8e73dfe2a +videoId: gW6cBZLUk6M +title: Working With Text Question D +challengeType: 15 +dashedName: working-with-text-question-d +--- + +# --description-- + +The `em` element makes text italic. It also semantically places emphasis on the text, which again may affect things like screen readers. To define an emphasized element you wrap text content in a `` tag. + +To use `em` on its own: + + +Again, like the `strong` element, you will find yourself mostly using the `em` element with other text elements: + + + +# --question-- +## --text-- + +What element should you use to make text italicized to add emphasis? + +## --answers-- + +`This is an italic message` + +--- + +`This is an italic message` + +--- + +`This is an italic message` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/working-with-text-question-e.md b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/working-with-text-question-e.md new file mode 100644 index 00000000000..d022a6331e9 --- /dev/null +++ b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/working-with-text-question-e.md @@ -0,0 +1,66 @@ +--- +id: 637f4e7972c65bc8e73dfe2b +videoId: gW6cBZLUk6M +title: Working With Text Question E +challengeType: 15 +dashedName: working-with-text-question-e +--- + +# --description-- + +You may have noticed that in all the examples in this lesson you indent any elements that are within other elements. This is known as nesting elements. + +When you nest elements within other elements, you create a parent and child relationship between them. The nested elements are the children and the element they are nested within is the parent. + +In the following example, the `body` element is the parent and the `p` is the child: + +```html + + + + +

                                                                                                                                                                  Lorem ipsum dolor sit amet.

                                                                                                                                                                  + + +``` + +Just as in human relationships, HTML parent elements can have many children. Elements at the same level of nesting are considered to be siblings. + +For example, the two `p` elements in the following code are siblings, since they are both children of the `body` tag and are at the same level of nesting as each other: + +```html + + + + +

                                                                                                                                                                  Lorem ipsum dolor sit amet.

                                                                                                                                                                  +

                                                                                                                                                                  Ut enim ad minim veniam.

                                                                                                                                                                  + + +``` + +You use indentation to make the level of nesting clear and readable for yourselves and other developers who will work with your HTML in the future. It is recommended to indent any child elements by two spaces. + +The parent, child, and sibling relationships between elements will become much more important later when you start styling your HTML with CSS and adding behavior with JavaScript. For now, however, it is just important to know the distinction between how elements are related and the terminology used to describe their relationships. + +# --question-- + +## --text-- + +What relationship do two elements have if they are at the same level of nesting? + +## --answers-- + +The elements are each other's parents. + +--- + +The elements are each other's children. + +--- + +The elements are siblings. + +## --video-solution-- + +3 diff --git a/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/working-with-text-question-f.md b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/working-with-text-question-f.md new file mode 100644 index 00000000000..2ace3f4e36d --- /dev/null +++ b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/working-with-text-question-f.md @@ -0,0 +1,67 @@ +--- +id: 637f4e8072c65bc8e73dfe2c +videoId: gW6cBZLUk6M +title: Working With Text Question F +challengeType: 15 +dashedName: working-with-text-question-f +--- + +# --description-- + +You may have noticed that in all the examples in this lesson you indent any elements that are within other elements. This is known as nesting elements. + +When you nest elements within other elements, you create a parent and child relationship between them. The nested elements are the children and the element they are nested within is the parent. + +In the following example, the body element is the parent and the paragraph is the child: + +```html + + + + +

                                                                                                                                                                  Lorem ipsum dolor sit amet.

                                                                                                                                                                  + + +``` + +Just as in human relationships, HTML parent elements can have many children. Elements at the same level of nesting are considered to be siblings. + +For example, the two paragraphs in the following code are siblings, since they are both children of the body tag and are at the same level of nesting as each other: + +```html + + + + +

                                                                                                                                                                  Lorem ipsum dolor sit amet.

                                                                                                                                                                  +

                                                                                                                                                                  Ut enim ad minim veniam.

                                                                                                                                                                  + + +``` + +You use indentation to make the level of nesting clear and readable for yourselves and other developers who will work with your HTML in the future. It is recommended to indent any child elements by two spaces. + +The parent, child, and sibling relationships between elements will become much more important later when you start styling your HTML with CSS and adding behavior with JavaScript. For now, however, it is just important to know the distinction between how elements are related and the terminology used to describe their relationships. + +# --question-- + +## --text-- + +What relationship does an element have with any nested element within it? + +## --answers-- + +The element within the other element is called the parent element. + +--- + +The element within the other element is called the child element. + +--- + +The element within the other element is called the sibling element. + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/working-with-text-question-g.md b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/working-with-text-question-g.md new file mode 100644 index 00000000000..fe83f0ef062 --- /dev/null +++ b/curriculum/challenges/espanol/10-coding-interview-prep/the-odin-project/working-with-text-question-g.md @@ -0,0 +1,49 @@ +--- +id: 637f4e8772c65bc8e73dfe2d +videoId: gW6cBZLUk6M +title: Working With Text Question G +challengeType: 15 +dashedName: working-with-text-question-g +--- + +# --description-- + +HTML comments are not visible to the browser; they allow us to comment on your code so that other developers or your future selves can read them and get some context about something that might not be clear in the code. + +Writing an HTML comment is simple: You just enclose the comment with ``tags. For example: + +```html +

                                                                                                                                                                  View the html to see the hidden comments

                                                                                                                                                                  + + + +

                                                                                                                                                                  Some paragraph text

                                                                                                                                                                  + + +``` + +# --question-- + +## --assignment-- + +To get some practice working with text in HTML, create a plain blog article page which uses different headings, uses paragraphs, and has some text in the paragraphs bolded and italicized. You can use [Lorem Ipsum](https://loremipsum.io) to generate dummy text, in place of real text as you build your sites. + +## --text-- + +How do you create HTML comments? + +## --answers-- + +`/* This is an HTML comment */` + +--- + +`` + +--- + +`<-- This is an HTML comment --!>` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d1ac33c68d27dcda5796.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d1ac33c68d27dcda5796.md index a125456aeb7..c2453528839 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d1ac33c68d27dcda5796.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d1ac33c68d27dcda5796.md @@ -14,13 +14,25 @@ Gire el elemento `.back-mountain` por `45deg` en el sentido de las agujas del re Debe utilizar la propiedad `transform` para girar el elemento. ```js -assert.notEmpty(new __helpers.CSSHelp(document).getStyle('.back-mountain')?.transform); +const backMountain = new __helpers.CSSHelp(document).getStyle('.back-mountain'); + +if (backMountain?.transform) { + assert.notEmpty(backMountain?.transform); +} else { + assert.notEmpty(backMountain?.rotate); +} ``` Debe darle a `.back-mountain` un `transform` de `--fcc-expected--`, pero encontró `--fcc-actual--`. ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.back-mountain')?.transform, 'rotate(45deg)'); +const backMountain = new __helpers.CSSHelp(document).getStyle('.back-mountain'); + +if (backMountain?.transform) { + assert.equal(backMountain?.transform, 'rotate(45deg)'); +} else { + assert.equal(backMountain?.rotate, '45deg'); +} ``` Debe asignar a `.back-mountain` una propiedad `left`. diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d229b0e542520cd91c685.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d229b0e542520cd91c685.md index 0baa6c8e629..2e4c6ec908d 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d229b0e542520cd91c685.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d229b0e542520cd91c685.md @@ -14,13 +14,25 @@ Para que las patas del pingüino se vean más _penguiny_, gira el pie izquierdo Debe dar a `.foot.left` un `transform` de `rotate(80deg)`. ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.foot.left').getPropVal('transform', true), 'rotate(80deg)'); +const leftFoot = new __helpers.CSSHelp(document).getStyle('.foot.left'); + +if (leftFoot?.transform) { + assert.equal(leftFoot.getPropVal('transform', true), 'rotate(80deg)'); +} else { + assert.equal(leftFoot.getPropVal('rotate', true), '80deg'); +} ``` Debe dar a `.foot.right` un `transform` de `rotate(-80deg)`. ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.foot.right').getPropVal('transform', true), 'rotate(-80deg)'); +const rightFoot = new __helpers.CSSHelp(document).getStyle('.foot.right'); + +if (rightFoot?.transform) { + assert.equal(rightFoot.getPropVal('transform', true), 'rotate(-80deg)'); +} else { + assert.equal(rightFoot.getPropVal('rotate', true), '-80deg'); +} ``` # --seed-- diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2d4e80400325ff89664a.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2d4e80400325ff89664a.md index 3304e3a5a4c..44e74bfcee3 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2d4e80400325ff89664a.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2d4e80400325ff89664a.md @@ -14,7 +14,14 @@ Para mantener el degradado lineal en el lado correcto del brazo izquierdo del pi Debes darle a `.arm.left` una `transform` de `rotate(130deg) scaleX(-1)`. ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.arm.left').getPropVal('transform', true), 'rotate(130deg)scaleX(-1)'); +const leftArm = new __helpers.CSSHelp(document).getStyle('.arm.left'); + +if (leftArm?.rotate && leftArm?.transform) { + assert.equal(leftArm.getPropVal('rotate', true), '130deg'); + assert.equal(leftArm.getPropVal('transform', true), 'scaleX(-1)'); +} else { + assert.equal(leftArm.getPropVal('transform', true), 'rotate(130deg)scaleX(-1)'); +} ``` # --seed-- @@ -281,7 +288,6 @@ body { top: 35%; left: 5%; transform-origin: top left; - } --fcc-editable-region-- diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2ebc81ba81271460850d.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2ebc81ba81271460850d.md index 6c4fbbb8b7f..ce7880cb917 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2ebc81ba81271460850d.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2ebc81ba81271460850d.md @@ -14,7 +14,13 @@ Gire el brazo derecho `45deg` en sentido contrario a las agujas del reloj. Debes darle a `.arm.right` una `transform` de `rotate(-45deg)`. ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.arm.right')?.getPropVal('transform', true), 'rotate(-45deg)'); +const rightArm = new __helpers.CSSHelp(document).getStyle('.arm.right'); + +if (rightArm?.transform) { + assert.equal(rightArm?.getPropVal('transform', true), 'rotate(-45deg)'); +} else { + assert.equal(rightArm?.getPropVal('rotate', true), '-45deg'); +} ``` # --seed-- @@ -287,7 +293,6 @@ body { .arm.right { top: 0%; right: -5%; - } --fcc-editable-region-- diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d32c7fa21f32aaa91d499.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d32c7fa21f32aaa91d499.md index eb4cbb8dcd8..6b0a2aeb90c 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d32c7fa21f32aaa91d499.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d32c7fa21f32aaa91d499.md @@ -14,7 +14,16 @@ Dentro del primer punto de referencia, gire a `110deg` y mantenga la escala del Debes darle al waypoint `10%` una `transform` de `rotate(110deg) scaleX(-1)`. ```js -assert([...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '10%')?.style?.transform?.replace(/\s+/g, '') === 'rotate(110deg)scaleX(-1)'); +const wave10Percent = [...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '10%'); +const rotateProp = wave10Percent?.style?.rotate?.replace(/\s+/g, ''); +const transformProp = wave10Percent?.style?.transform?.replace(/\s+/g, ''); + +if (rotateProp && transformProp) { + assert(rotateProp === '110deg'); + assert(transformProp === 'scaleX(-1)'); +} else { + assert(transformProp === 'rotate(110deg)scaleX(-1)'); +} ``` # --seed-- diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d333b738e3c2b5d58b095.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d333b738e3c2b5d58b095.md index 3be58d6b25b..f81ea423609 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d333b738e3c2b5d58b095.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d333b738e3c2b5d58b095.md @@ -14,7 +14,16 @@ Dentro del segundo punto de referencia, gire a `130deg`, y conserve la escala de Debe dar al punto de referencia `20%` un `transform` de `rotate(130deg) scaleX(-1)`. ```js -assert([...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '20%')?.style?.transform?.replace(/\s+/g, '') === 'rotate(130deg)scaleX(-1)'); +const wave20Percent = [...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '20%'); +const transformProp = wave20Percent?.style?.transform?.replace(/\s+/g, ''); +const rotateProp = wave20Percent?.style?.rotate?.replace(/\s+/g, ''); + +if (rotateProp && transformProp) { + assert(rotateProp === '130deg'); + assert(transformProp === 'scaleX(-1)'); +} else { + assert(transformProp === 'rotate(130deg)scaleX(-1)'); +} ``` # --seed-- diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d337765b9f02c10e93722.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d337765b9f02c10e93722.md index d52ff1e4020..cdb9cb33e1f 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d337765b9f02c10e93722.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d337765b9f02c10e93722.md @@ -14,13 +14,31 @@ Para el tercer y cuarto waypoints, repita el patrón `transform` una vez más. Debe dar al punto de referencia `30%` un `transform` de `rotate(110deg) scaleX(-1)`. ```js -assert([...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '30%')?.style?.transform?.replace(/\s+/g, '') === 'rotate(110deg)scaleX(-1)'); +const wave30Percent = [...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '30%'); +const transformProp = wave30Percent?.style?.transform?.replace(/\s+/g, ''); +const rotateProp = wave30Percent?.style?.rotate?.replace(/\s+/g, ''); + +if (rotateProp && transformProp) { + assert(rotateProp === '110deg'); + assert(transformProp === 'scaleX(-1)'); +} else { + assert(transformProp === 'rotate(110deg)scaleX(-1)'); +} ``` Debe dar al punto de referencia `40%` un `transform` de `rotate(130deg) scaleX(-1)`. ```js -assert([...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '40%')?.style?.transform?.replace(/\s+/g, '') === 'rotate(130deg)scaleX(-1)'); +const wave40Percent = [...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '40%'); +const transformProp = wave40Percent?.style?.transform?.replace(/\s+/g, ''); +const rotateProp = wave40Percent?.style?.rotate?.replace(/\s+/g, ''); + +if (rotateProp && transformProp) { + assert(rotateProp === '130deg'); + assert(transformProp === 'scaleX(-1)'); +} else { + assert(transformProp === 'rotate(130deg)scaleX(-1)'); +} ``` # --seed-- diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98f0.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98f0.md index 510bbe4f1db..a12114b9405 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98f0.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98f0.md @@ -16,11 +16,11 @@ gradient-type( ); ``` -En el ejemplo, `color1` es sólido en la parte superior, `color2` es sólido en la parte inferior, y en el medio pasa uniformemente de uno a otro. En `.bb1a`, agregue un degradado de tipo `linear-gradient` a la propiedad `background` con `--building-color1` como primer color y `--window-color1` como segundo. +En el ejemplo, `color1` es sólido en la parte superior, `color2` es sólido en la parte inferior, y en el medio pasa uniformemente de uno a otro. In `.bb1a`, add a `background` property below the `background-color` property. Set it as a gradient of type `linear-gradient` that uses `--building-color1` as the first color and `--window-color1` as the second. # --hints-- -Debe aplicar un `background` a `.bb1a`. +You should apply a `background` to `.bb1a` right after the `background-color`. ```js assert(new __helpers.CSSHelp(document).getStyle('.bb1a')?.background); diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa2407b521be39a3de7be1.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa2407b521be39a3de7be1.md index 3e5aeae4918..d7dbbe11fef 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa2407b521be39a3de7be1.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa2407b521be39a3de7be1.md @@ -45,7 +45,7 @@ assert(document.querySelector('a').getAttribute('target') === '_blank');

                                                                                                                                                                  Cat Photos

                                                                                                                                                                  --fcc-editable-region-- -

                                                                                                                                                                  See more cat photos in our gallery.

                                                                                                                                                                  +

                                                                                                                                                                  See more cat photos in our gallery.

                                                                                                                                                                  --fcc-editable-region-- A cute orange cat lying on its back. diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2abbe7d18d49a1e0e1c8.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2abbe7d18d49a1e0e1c8.md index 71d15830797..f1330e90822 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2abbe7d18d49a1e0e1c8.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2abbe7d18d49a1e0e1c8.md @@ -39,13 +39,15 @@ assert(document.querySelector('h1')?.innerText === 'Nutrition Facts'); --fcc-editable-region-- - - - Nutrition Label - - - + + + Nutrition Label + + + + + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2d4150fe0d4cbd0f2628.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2d4150fe0d4cbd0f2628.md index 0aa5456c5e4..abdea738198 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2d4150fe0d4cbd0f2628.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2d4150fe0d4cbd0f2628.md @@ -43,14 +43,16 @@ assert(document.querySelector('p')?.innerText === '8 servings per container'); --fcc-editable-region-- - - - Nutrition Label - - -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  - + + + Nutrition Label + + + +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  + + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34948891834dd77655a6.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34948891834dd77655a6.md index d10159ea0af..344b6c6abc4 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34948891834dd77655a6.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34948891834dd77655a6.md @@ -43,15 +43,17 @@ assert(document.querySelectorAll('p')?.[1]?.innerText === 'Serving size 2/3 cup --fcc-editable-region-- - - - Nutrition Label - - -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  - + + + Nutrition Label + + + +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  + + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34ecc1091b4fd5a8a484.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34ecc1091b4fd5a8a484.md index f4bdb3ca9ba..854795004ee 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34ecc1091b4fd5a8a484.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34ecc1091b4fd5a8a484.md @@ -49,16 +49,18 @@ assert(links.find(link => link?.getAttribute('href') === 'https://fonts.googleap --fcc-editable-region-- - - - Nutrition Label - - -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  - + + + Nutrition Label + + + + +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f357957e370510f21ea16.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f357957e370510f21ea16.md index ee91066e95d..d160deea211 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f357957e370510f21ea16.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f357957e370510f21ea16.md @@ -32,17 +32,19 @@ assert(new __helpers.CSSHelp(document).getStyle('body')?.fontFamily === '"Open S ```html - - - Nutrition Label - - - - -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  - + + + + Nutrition Label + + + + + +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f378014c2da526a109c81.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f378014c2da526a109c81.md index 0a6e8c29224..c2c9a5d4f93 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f378014c2da526a109c81.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f378014c2da526a109c81.md @@ -30,17 +30,19 @@ assert(new __helpers.CSSHelp(document).getStyle('html')?.fontSize === '16px'); ```html - - - Nutrition Label - - - - -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  - + + + + Nutrition Label + + + + + +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38279e5c3d53692ea441.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38279e5c3d53692ea441.md index 2aaa97e4304..3af9406fba6 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38279e5c3d53692ea441.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38279e5c3d53692ea441.md @@ -37,18 +37,20 @@ assert(children?.every(child => child?.parentElement?.classList?.contains('label ```html - - - Nutrition Label - - - + + + + Nutrition Label + + + + --fcc-editable-region-- - -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  - + +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38cabc64e3556f98cc1a.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38cabc64e3556f98cc1a.md index 1e9c0a0f1be..1a823b03c28 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38cabc64e3556f98cc1a.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38cabc64e3556f98cc1a.md @@ -32,19 +32,21 @@ assert(new __helpers.CSSHelp(document).getStyle('.label')?.border === '2px solid ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3949f58e12577dcefb00.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3949f58e12577dcefb00.md index 5181b654eda..6f38cc5e471 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3949f58e12577dcefb00.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3949f58e12577dcefb00.md @@ -26,19 +26,21 @@ assert(new __helpers.CSSHelp(document).getStyle('.label')?.width === '270px'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f39d7da41b15851fa3fb9.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f39d7da41b15851fa3fb9.md index 70c36418fac..5c8547d5300 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f39d7da41b15851fa3fb9.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f39d7da41b15851fa3fb9.md @@ -30,19 +30,21 @@ assert(new __helpers.CSSHelp(document).getStyle('.label')?.padding === '0px 7px' ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3b091162165948e1cb33.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3b091162165948e1cb33.md index eaa2599ed01..1d658984c94 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3b091162165948e1cb33.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3b091162165948e1cb33.md @@ -32,19 +32,21 @@ assert(new __helpers.CSSHelp(document).getStyle('*')?.boxSizing === 'border-box' ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3cafd794015aa9547a6d.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3cafd794015aa9547a6d.md index e61236885df..73177cb21a3 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3cafd794015aa9547a6d.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3cafd794015aa9547a6d.md @@ -32,19 +32,21 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')?.fontWeight === '800'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3d9e59db4b5b8e960762.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3d9e59db4b5b8e960762.md index 4a9dbc050a4..22f4d8613c1 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3d9e59db4b5b8e960762.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3d9e59db4b5b8e960762.md @@ -24,19 +24,21 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')?.textAlign === 'center'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e1b7233ee5c7595771f.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e1b7233ee5c7595771f.md index ba7bfbfb8c2..7abaa767a63 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e1b7233ee5c7595771f.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e1b7233ee5c7595771f.md @@ -24,19 +24,21 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')?.margin === '-4px 0px'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e4af8008c5d494d3afe.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e4af8008c5d494d3afe.md index 4f3b7f70469..f675ff9d3fb 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e4af8008c5d494d3afe.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e4af8008c5d494d3afe.md @@ -30,19 +30,21 @@ assert(new __helpers.CSSHelp(document).getStyle('p')?.margin === '0px'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3ed16592445e57941aec.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3ed16592445e57941aec.md index e672221ac3d..1f62086d30f 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3ed16592445e57941aec.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3ed16592445e57941aec.md @@ -44,21 +44,23 @@ assert(document.querySelector('.divider')?.previousElementSibling?.localName === ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  --fcc-editable-region-- - + ``` diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f405b89a7ec5f8e2d11f4.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f405b89a7ec5f8e2d11f4.md index c228ca2a249..e0aa9a9e986 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f405b89a7ec5f8e2d11f4.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f405b89a7ec5f8e2d11f4.md @@ -36,20 +36,22 @@ assert(new __helpers.CSSHelp(document).getStyle('.divider')?.margin === '2px 0px ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f40b01f680e608d360ed4.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f40b01f680e608d360ed4.md index 32739596515..74b97526111 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f40b01f680e608d360ed4.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f40b01f680e608d360ed4.md @@ -26,20 +26,22 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')?.letterSpacing === '0.15px ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4172e9eec061d6456221.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4172e9eec061d6456221.md index 3fc2e64e531..696ad1b9526 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4172e9eec061d6456221.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4172e9eec061d6456221.md @@ -32,22 +32,24 @@ assert(!document.querySelector('p')?.classList?.contains('bold')); ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  --fcc-editable-region-- - + ``` diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f41c979787462e76dab90.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f41c979787462e76dab90.md index f0514727521..dc7e1f4f107 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f41c979787462e76dab90.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f41c979787462e76dab90.md @@ -44,20 +44,22 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f423cf65d5864132a0956.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f423cf65d5864132a0956.md index 06f6e47192d..b868c6c1881 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f423cf65d5864132a0956.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f423cf65d5864132a0956.md @@ -24,22 +24,24 @@ assert(document.querySelector('h1')?.classList?.contains('bold')); ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  --fcc-editable-region-- - + ``` diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f42a021625f656101ef93.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f42a021625f656101ef93.md index 70f102a1566..b6b178c78ee 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f42a021625f656101ef93.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f42a021625f656101ef93.md @@ -9,7 +9,7 @@ dashedName: step-22 El espaciado horizontal entre elementos igualmente importantes puede aumentar la legibilidad de su texto. -Envuelva el texto `2/3 cup (55g)` en un elemento `span` y asígnele un atributo `class` establecido en `right`. +Wrap the text `2/3 cup (55g)` in a `span` element. # --hints-- @@ -19,19 +19,13 @@ Debe crear un nuevo elemento `span`. assert(document.querySelector('span')); ``` -Su nuevo elemento `span` debe tener el atributo `class` establecido en `right`. - -```js -assert(document.querySelector('span')?.classList?.contains('right')); -``` - -Su elemento `span` debe tener el texto `2/3 cup (55g)`. +Your `span` element should have the text `2/3 cup (55g)`. ```js assert(document.querySelector('span')?.textContent?.trim() === '2/3 cup (55g)'); ``` -Su elemento `p` aún debe tener el texto `Serving size 2/3 cup (55g)`. +Your `p` element should still have the text `Serving size 2/3 cup (55g)`. ```js assert(document.querySelectorAll('p')?.[1]?.innerText === 'Serving size 2/3 cup (55g)'); @@ -44,22 +38,24 @@ assert(document.querySelectorAll('p')?.[1]?.innerText === 'Serving size 2/3 cup ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  --fcc-editable-region-- - + ``` diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4bfb9de4a16703b56eb6.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4bfb9de4a16703b56eb6.md index 7ec20111bce..86ecd9d7e51 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4bfb9de4a16703b56eb6.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4bfb9de4a16703b56eb6.md @@ -7,22 +7,20 @@ dashedName: step-23 # --description-- -La propiedad `float` se utiliza para colocar un elemento a la izquierda o derecha de su contenedor, permitiendo que otro contenido (como texto) se ajuste a su alrededor. - -Cree un nuevo selector `.right` y establezca la propiedad `float` en `right`. +Now we can add the horizontal spacing using `flex`. In your `p` selector, add a `display` property set to `flex` and a `justify-content` property set to `space-between`. # --hints-- -Debe crear un nuevo selector `.right`. +Your `p` selector should have a `display` property set to `flex`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.right')); +assert(new __helpers.CSSHelp(document).getStyle('p')?.display === 'flex'); ``` -El selector `.right` debe tener una propiedad `float` establecida en `right`. +Your `p` selector should have a `justify-content` property set to `space-between`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.right')?.float === 'right'); +assert(new __helpers.CSSHelp(document).getStyle('p')?.justifyContent === 'space-between'); ``` # --seed-- @@ -32,20 +30,22 @@ assert(new __helpers.CSSHelp(document).getStyle('.right')?.float === 'right'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  + ``` @@ -75,9 +75,11 @@ h1 { letter-spacing: 0.15px } +--fcc-editable-region-- p { margin: 0; } +--fcc-editable-region-- .divider { border-bottom: 1px solid #888989; @@ -87,8 +89,4 @@ p { .bold { font-weight: 800; } - ---fcc-editable-region-- - ---fcc-editable-region-- ``` diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ce9d877b668417c0c42.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ce9d877b668417c0c42.md index ea9a861327d..dcc67c1b389 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ce9d877b668417c0c42.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ce9d877b668417c0c42.md @@ -40,22 +40,24 @@ assert(children?.[3]?.localName === 'p'); ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  --fcc-editable-region-- - + ``` @@ -87,6 +89,8 @@ h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -97,8 +101,4 @@ p { .bold { font-weight: 800; } - -.right { - float: right; -} ``` diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4dde9d72e3694cb9ee3b.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4dde9d72e3694cb9ee3b.md index 12c87005dbb..2c9a0469833 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4dde9d72e3694cb9ee3b.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4dde9d72e3694cb9ee3b.md @@ -39,22 +39,24 @@ assert(style?.letterSpacing === '0.15px'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  + ``` @@ -88,6 +90,8 @@ h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -98,8 +102,4 @@ p { .bold { font-weight: 800; } - -.right { - float: right; -} ``` diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ec58334106a4170c2a8.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ec58334106a4170c2a8.md index 5d585e9235f..3c5c9ba92a7 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ec58334106a4170c2a8.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ec58334106a4170c2a8.md @@ -7,7 +7,7 @@ dashedName: step-26 # --description-- -Cree un nuevo elemento `div` debajo de su elemento `header` y asígnele un atributo `class` establecido en `divider lg`. +Create a new `div` element below your `header` element, and give it a `class` attribute set to `divider large`. # --hints-- @@ -23,12 +23,12 @@ Tu nuevo elemento `div` debe ir después de tu elemento `header`. assert(document.querySelector('.label')?.lastElementChild?.localName === 'div'); ``` -Su nuevo elemento `div` debe tener el atributo `class` establecido en `divider lg`. +Your new `div` element should have the `class` attribute set to `divider large`. ```js const div = document.querySelector('.label')?.lastElementChild; assert(div?.classList?.contains('divider')); -assert(div?.classList?.contains('lg')); +assert(div?.classList?.contains('large')); ``` # --seed-- @@ -38,25 +38,27 @@ assert(div?.classList?.contains('lg')); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  --fcc-editable-region-- --fcc-editable-region-- -
                                                                                                                                                                  - +
                                                                                                                                                                  + ``` @@ -88,6 +90,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -98,8 +102,4 @@ p { .bold { font-weight: 800; } - -.right { - float: right; -} ``` diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4f9e4a40566b776a8f38.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4f9e4a40566b776a8f38.md index fabdc711ca2..461b6619940 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4f9e4a40566b776a8f38.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4f9e4a40566b776a8f38.md @@ -7,32 +7,32 @@ dashedName: step-27 # --description-- -Cree un nuevo selector `.lg` y asígnele una propiedad `height` establecida en `10px`. También cree un selector `.lg, .md` y establezca la propiedad `background-color` en `black`. +Create a new `.large` selector and give it a `height` property set to `10px`. Also create an `.large, .medium` selector and set the `background-color` property to `black`. # --hints-- -Debería tener un nuevo selector `.lg`. +You should have a new `.large` selector. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg')); +assert(new __helpers.CSSHelp(document).getStyle('.large')); ``` -Su selector `.lg` debe tener una propiedad `height` establecida en `10px`. +Your `.large` selector should have a `height` property set to `10px`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg')?.height === '10px'); +assert(new __helpers.CSSHelp(document).getStyle('.large')?.height === '10px'); ``` -Debería tener un nuevo selector `.lg, .md`. +You should have a new `.large, .medium` selector. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')); +assert(new __helpers.CSSHelp(document).getStyle('.large, .medium')); ``` -Su selector `.lg, .md` debe tener una propiedad `background-color` establecida en `black`. +Your `.large, .medium` selector should have a `background-color` property set to `black`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')?.backgroundColor === 'black'); +assert(new __helpers.CSSHelp(document).getStyle('.large, .medium')?.backgroundColor === 'black'); ``` # --seed-- @@ -42,23 +42,25 @@ assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')?.backgroundColor === ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  + ``` @@ -90,6 +92,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -101,10 +105,6 @@ p { font-weight: 800; } -.right { - float: right; -} - --fcc-editable-region-- --fcc-editable-region-- diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f50473cc0196c6dd3892a.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f50473cc0196c6dd3892a.md index 2269accbcd9..57964c659b5 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f50473cc0196c6dd3892a.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f50473cc0196c6dd3892a.md @@ -7,16 +7,16 @@ dashedName: step-28 # --description-- -Puede notar que todavía hay un pequeño borde en la parte inferior de su elemento `.lg`. Para restablecer esto, asigne a su selector `.lg, .md` una propiedad `border` establecida en `0`. +You may notice there is still a small border at the bottom of your `.large` element. To reset this, give your `.large, .medium` selector a `border` property set to `0`. -Nota: la clase `md`(media) se utilizará en el paso 37 para las barras más delgadas de la etiqueta de información nutricional. +Note: the `medium`(medium) class will be utilized in step 37 for the thinner bars of the nutrition label. # --hints-- -Su selector `.lg, .md` debe tener una propiedad `border` establecida en `0`. +Your `.large, .medium` selector should have a `border` property set to `0`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')?.borderWidth === '0px'); +assert(new __helpers.CSSHelp(document).getStyle('.large, .medium')?.borderWidth === '0px'); ``` # --seed-- @@ -26,23 +26,25 @@ assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')?.borderWidth === '0p ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  + ``` @@ -74,6 +76,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -85,16 +89,12 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } --fcc-editable-region-- -.lg, .md { +.large, .medium { background-color: black; } --fcc-editable-region-- diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51257a8a516d80b6c743.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51257a8a516d80b6c743.md index 7a45f7348e5..82f0e668733 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51257a8a516d80b6c743.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51257a8a516d80b6c743.md @@ -7,7 +7,7 @@ dashedName: step-29 # --description-- -Cree un nuevo `div` debajo de su elemento `.lg` y asígnele un atributo `class` establecido en `calories-info`. +Create a new `div` below your `.large` element and give it a `class` attribute set to `calories-info`. # --hints-- @@ -23,10 +23,10 @@ Tu nuevo `div` debe tener un atributo `class` establecido en `calories-info`. assert(document.querySelector('.label')?.lastElementChild?.classList?.contains('calories-info')); ``` -Su nuevo `div` debe aparecer después del elemento `.lg`. +Your new `div` should come after the `.large` element. ```js -assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('lg')); +assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('large')); ``` # --seed-- @@ -36,26 +36,28 @@ assert(document.querySelector('.label')?.lastElementChild?.previousElementSiblin ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  --fcc-editable-region-- --fcc-editable-region-- -
                                                                                                                                                                  - +
                                                                                                                                                                  + ``` @@ -87,6 +89,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -98,15 +102,11 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51e4e5b24a6e80eccce1.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51e4e5b24a6e80eccce1.md index 7f2e0a3944d..47da15c2b9e 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51e4e5b24a6e80eccce1.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51e4e5b24a6e80eccce1.md @@ -7,27 +7,39 @@ dashedName: step-30 # --description-- -Dentro de su elemento `.calories-info`, cree un elemento `p`. Asigne a ese elemento `p` un atributo `class` establecido en `bold sm-text`, y el texto `Amount per serving`. +Within your `.calories-info` element, create a `div` element. Give that `div` element a `class` attribute set to `left-container`. Within the newly created `div` element, create a `h2` element with the text `Amount per serving`. Give the `h2` element a `class` attribute set to `bold small-text`. # --hints-- -Debe crear un nuevo elemento `p` dentro de su elemento `.calories-info`. +You should create a new `div` element within your `.calories-info` element. ```js -assert(document.querySelector('.calories-info')?.children?.[0]?.localName === 'p'); +assert(document.querySelector('.calories-info')?.children?.[0]?.localName === 'div'); ``` -Su nuevo elemento `p` debe tener un atributo `class` establecido en `bold sm-text`. +Your new `div` element should have a `class` attribute set to `left-container`. ```js -assert(document.querySelector('.calories-info')?.children?.[0]?.classList.contains('bold')); -assert(document.querySelector('.calories-info')?.children?.[0]?.classList.contains('sm-text')); +assert(document.querySelector('.calories-info')?.children?.[0]?.classList.contains('left-container')); ``` -Su nuevo elemento `p` debe tener el texto `Amount per serving`. +You should create a new `h2` element within your `.left-container` element. ```js -assert(document.querySelector('.calories-info')?.children?.[0]?.innerText === 'Amount per serving'); +assert(document.querySelector('.left-container')?.children?.[0]?.localName === 'h2'); +``` + +Your new `h2` element should have a `class` attribute set to `bold small-text`. + +```js +assert(document.querySelector('.left-container')?.children?.[0]?.classList.contains('bold')); +assert(document.querySelector('.left-container')?.children?.[0]?.classList.contains('small-text')); +``` + +Your new `h2` element should have the text `Amount per serving`. + +```js +assert(document.querySelector('.left-container')?.children?.[0]?.innerText === 'Amount per serving'); ``` # --seed-- @@ -37,28 +49,30 @@ assert(document.querySelector('.calories-info')?.children?.[0]?.innerText === 'A ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  ---fcc-editable-region-- -
                                                                                                                                                                  -
                                                                                                                                                                  + + + Nutrition Label + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  --fcc-editable-region-- +
                                                                                                                                                                  +
                                                                                                                                                                  - +--fcc-editable-region-- +
                                                                                                                                                                  + ``` @@ -90,6 +104,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -101,15 +117,11 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md index 2c29a469c20..f6bf1a543de 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md @@ -9,20 +9,20 @@ dashedName: step-31 La unidad `rem` significa `root em`, y es relativa al tamaño de fuente del elemento `html`. -Cree un selector `.sm-text` y establezca el `font-size` en `0.85rem`, que se calcularía en aproximadamente `13.6px` (recuerde que configuró su `html` para que tenga un `font-size` de `16px`). +Create an `.small-text` selector and set the `font-size` to `0.85rem`, which would calculate to be roughly `13.6px` (remember that you set your `html` to have a `font-size` of `16px`). # --hints-- -Debe tener un selector `.sm-text`. +You should have an `.small-text` selector. ```js -assert(new __helpers.CSSHelp(document).getStyle('.sm-text')); +assert(new __helpers.CSSHelp(document).getStyle('.small-text')); ``` -El selector `.sm-text` debe tener una propiedad `font-size` establecida en `0.85rem`. +Your `.small-text` selector should have a `font-size` property set to `0.85rem`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.sm-text')?.fontSize === '0.85rem'); +assert(new __helpers.CSSHelp(document).getStyle('.small-text')?.fontSize === '0.85rem'); ``` # --seed-- @@ -32,26 +32,30 @@ assert(new __helpers.CSSHelp(document).getStyle('.sm-text')?.fontSize === '0.85r ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  - +
                                                                                                                                                                  + ``` @@ -83,6 +87,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -94,15 +100,11 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5486b8fd4b71633f69b0.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5486b8fd4b71633f69b0.md index 9951b4851cd..29c7cb2b714 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5486b8fd4b71633f69b0.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5486b8fd4b71633f69b0.md @@ -1,51 +1,50 @@ --- id: 615f5486b8fd4b71633f69b0 -title: Paso 32 +title: Step 33 challengeType: 0 -dashedName: step-32 +dashedName: step-33 --- # --description-- -Debajo de su elemento `.sm-text`, cree un nuevo elemento `h1` con el texto `Calories 230`. Envuelve la parte `230` del texto en un elemento `span` con la `class` establecida en `right`. +Below your `.small-text` element, create a new `p` element with the text `Calories`. Also below the `.left-container` element, create a new `span` element with the text `230`. # --hints-- -Debería tener un nuevo elemento `h1` dentro de su elemento `.calories-info`. +You should have a new `p` element within your `.calories-info` element. ```js -assert(document.querySelector('.calories-info')?.querySelector('h1')) +assert(document.querySelector('.calories-info')?.querySelector('p')) ``` -Su elemento `h1` debe ir después de su elemento `.sm-text`. +You should have a new `span` element within your `.calories-info` element. ```js -assert(document.querySelector('.sm-text')?.nextElementSibling?.localName === 'h1'); +assert(document.querySelector('.calories-info')?.querySelector('span')) ``` -Tu elemento `h1` debe tener el texto `Calories 230`. +Your `p` element should come after your `.small-text` element. ```js -// the float: right property does weird things to the inner text. -assert(document.querySelector('.calories-info')?.lastElementChild?.innerText.match(/Calories[\s|\n]*230/)); +assert(document.querySelector('.small-text')?.nextElementSibling?.localName === 'p'); ``` -Debe crear un elemento `span` dentro de su nuevo elemento `h1`. +Your `p` element should have the text `Calories`. ```js -assert(document.querySelector('.calories-info')?.lastElementChild?.querySelector('span')); +assert(document.querySelector('.left-container')?.lastElementChild?.innerText === 'Calories'); ``` -Su elemento `span` debe tener la `class` establecida en `right`. +Your `span` element should come after your `.left-container` element. ```js -assert(document.querySelector('.calories-info')?.lastElementChild?.querySelector('span')?.classList?.contains('right')); +assert(document.querySelector('.left-container')?.nextElementSibling?.localName ==='span'); ``` Su elemento `span` debe tener el texto `230`. ```js -assert(document.querySelector('.calories-info')?.lastElementChild?.querySelector('span')?.innerText === '230'); +assert(document.querySelector('.calories-info')?.lastElementChild?.innerText === '230'); ``` # --seed-- @@ -55,28 +54,32 @@ assert(document.querySelector('.calories-info')?.lastElementChild?.querySelector ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

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

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  ---fcc-editable-region--
                                                                                                                                                                  - +--fcc-editable-region-- +
                                                                                                                                                                  + ``` @@ -108,6 +111,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -119,20 +124,20 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } + +.calories-info h2 { + margin: 0; +} ``` diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f575b50b91e72af079480.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f575b50b91e72af079480.md index cf8eec604b0..14f20ffb784 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f575b50b91e72af079480.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f575b50b91e72af079480.md @@ -1,29 +1,41 @@ --- id: 615f575b50b91e72af079480 -title: Paso 33 +title: Step 35 challengeType: 0 -dashedName: step-33 +dashedName: step-35 --- # --description-- -Cree un nuevo selector `.calories-info h1` configurando el margen superior e inferior en `-5px`, y el margen izquierdo y derecho en `-2px`. +Create a new `.left-container p` selector setting the top and bottom margin to `-5px`, and the left and right margin to `-2px`. Also set the `font-size` to `2em` and `font-weight` to `700`. # --hints-- -Deberías tener un nuevo selector `.calories-info h1`. +You should have a new `.left-container p` selector. ```js -assert(new __helpers.CSSHelp(document).getStyle('.calories-info h1')); +assert(new __helpers.CSSHelp(document).getStyle('.left-container p')); ``` -Su nuevo selector `.calories-info h1` debe tener una propiedad `margin` establecida en `-5px -2px`. +Your new `.left-container p` selector should have a `margin` property set to `-5px -2px`. ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marginTop, '-5px'); -assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marginBottom, '-5px'); -assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marginLeft, '-2px'); -assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marginRight, '-2px'); +assert.equal(new __helpers.CSSHelp(document).getStyle('.left-container p')?.marginTop, '-5px'); +assert.equal(new __helpers.CSSHelp(document).getStyle('.left-container p')?.marginBottom, '-5px'); +assert.equal(new __helpers.CSSHelp(document).getStyle('.left-container p')?.marginLeft, '-2px'); +assert.equal(new __helpers.CSSHelp(document).getStyle('.left-container p')?.marginRight, '-2px'); +``` + +Your new `.left-container p` selector should have a `font-size` property set to `2em`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.left-container p')?.fontSize === '2em'); +``` + +Your new `.left-container p` selector should have a `font-weight` property set to `700`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.left-container p')?.fontWeight === '700'); ``` # --seed-- @@ -33,27 +45,32 @@ assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marg ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  -

                                                                                                                                                                  Calories 230

                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  +

                                                                                                                                                                  Calories

                                                                                                                                                                  + 230
                                                                                                                                                                  - +
                                                                                                                                                                  + ``` @@ -85,6 +102,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -96,23 +115,29 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + --fcc-editable-region-- --fcc-editable-region-- diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5af373a68e744a3c5a76.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5af373a68e744a3c5a76.md index 8ebb0f18fc0..292ac1e333f 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5af373a68e744a3c5a76.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5af373a68e744a3c5a76.md @@ -1,13 +1,13 @@ --- id: 615f5af373a68e744a3c5a76 -title: Paso 34 +title: Step 36 challengeType: 0 -dashedName: step-34 +dashedName: step-36 --- # --description-- -Cree un selector `.calories-info span` y establezca el `font-size` en `1.2em`. +Create a `.calories-info span` selector, set its `font-size` to `2.4em` and `font-weight` to `700`. # --hints-- @@ -17,10 +17,16 @@ Debe crear un selector `.calories-info span`. assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')); ``` -El selector `.calories-info span` debe tener una propiedad `font-size` establecida en `1.2em`. +Your `.calories-info span` selector should have a `font-size` property set to `2.4em`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.fontSize === '1.2em'); +assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.fontSize === '2.4em'); +``` + +Your `.calories-info span` selector should have a `font-weight` property set to `700`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.fontWeight === '700'); ``` # --seed-- @@ -30,27 +36,32 @@ assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.fontSize ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  -

                                                                                                                                                                  Calories 230

                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  +

                                                                                                                                                                  Calories

                                                                                                                                                                  + 230
                                                                                                                                                                  - +
                                                                                                                                                                  + ``` @@ -82,6 +93,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -93,25 +106,33 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; + font-size: 2em; + font-weight: 700; } --fcc-editable-region-- diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5fd85d0062761f288364.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5fd85d0062761f288364.md index 997db7a30b9..b1dac10da81 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5fd85d0062761f288364.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5fd85d0062761f288364.md @@ -1,22 +1,22 @@ --- id: 615f5fd85d0062761f288364 -title: Paso 36 +title: Step 37 challengeType: 0 -dashedName: step-36 +dashedName: step-37 --- # --description-- La tipografía es a menudo más arte que ciencia. Es posible que deba ajustar cosas como la alineación hasta que se vea correcta. -Dale a tu selector de `.calories-info span` un `margin-top` establecido en `-7px`. Esto cambiará su texto `230` a su lugar. +Give your `.calories-info span` selector a `margin` set to `-7px -2px`. Esto cambiará su texto `230` a su lugar. # --hints-- -Tu selector de `.calories-info span` debe tener un `margin-top` establecido en `-7px`. +Your `.calories-info span` selector should have a `margin` set to `-7px -2px`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.marginTop === '-7px'); +assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.margin === '-7px -2px'); ``` # --seed-- @@ -26,27 +26,32 @@ assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.marginTo ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  -

                                                                                                                                                                  Calories 230

                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  +

                                                                                                                                                                  Calories

                                                                                                                                                                  + 230
                                                                                                                                                                  - +
                                                                                                                                                                  + ``` @@ -78,6 +83,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -89,31 +96,39 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } --fcc-editable-region-- .calories-info span { - font-size: 1.2em; + font-size: 2.4em; + font-weight: 700; } --fcc-editable-region-- ``` diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f61338c8ca176d6445574.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f61338c8ca176d6445574.md index 54d7e4d2d3c..c641c990dd3 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f61338c8ca176d6445574.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f61338c8ca176d6445574.md @@ -1,13 +1,13 @@ --- id: 615f61338c8ca176d6445574 -title: Paso 37 +title: Step 38 challengeType: 0 -dashedName: step-37 +dashedName: step-38 --- # --description-- -Debajo de su elemento `.calories-info`, agregue un `div` con el atributo `class` establecido en `divider md`. +Below your `.calories-info` element, add a `div` with the `class` attribute set to `divider medium`. # --hints-- @@ -17,11 +17,11 @@ Debe crear un nuevo `div` dentro de su elemento `.label`. assert(document.querySelectorAll('.label > div')?.length === 3) ``` -Su nuevo `div` debe tener el atributo `class` establecido en `divider md`. Este div debe ser el último elemento en su elemento `.label`. +Your new `div` should have the `class` attribute set to `divider medium`. Este div debe ser el último elemento en su elemento `.label`. ```js const div = document.querySelector('.label')?.lastElementChild; -assert(div?.classList?.contains('divider') && div?.classList?.contains('md')); +assert(div?.classList?.contains('divider') && div?.classList?.contains('medium')); ``` # --seed-- @@ -31,30 +31,35 @@ assert(div?.classList?.contains('divider') && div?.classList?.contains('md')); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  -

                                                                                                                                                                  Calories 230

                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  +

                                                                                                                                                                  Calories

                                                                                                                                                                  + 230 +
                                                                                                                                                                  --fcc-editable-region-- --fcc-editable-region-- -
                                                                                                                                                                  - +
                                                                                                                                                                  + ``` @@ -86,6 +91,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -97,30 +104,38 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; } ``` diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f666ac5edea782feb7e75.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f666ac5edea782feb7e75.md index 2ef4692628e..f074a2cf764 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f666ac5edea782feb7e75.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f666ac5edea782feb7e75.md @@ -1,26 +1,26 @@ --- id: 615f666ac5edea782feb7e75 -title: Paso 38 +title: Step 39 challengeType: 0 -dashedName: step-38 +dashedName: step-39 --- # --description-- -Cree un selector `.md` y asígnele una propiedad `height` de `5px`. +Create an `.medium` selector and give it a `height` property of `5px`. # --hints-- -Debe crear un selector `.md`. +You should create an `.medium` selector. ```js -assert(new __helpers.CSSHelp(document).getStyle('.md')); +assert(new __helpers.CSSHelp(document).getStyle('.medium')); ``` -Su selector `.md` debe tener una propiedad `height` establecida en `5px`. +Your `.medium` selector should have a `height` property set to `5px`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.md')?.height === '5px'); +assert(new __helpers.CSSHelp(document).getStyle('.medium')?.height === '5px'); ``` # --seed-- @@ -30,28 +30,33 @@ assert(new __helpers.CSSHelp(document).getStyle('.md')?.height === '5px'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  -

                                                                                                                                                                  Calories 230

                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  +

                                                                                                                                                                  Calories

                                                                                                                                                                  -
                                                                                                                                                                  + 230
                                                                                                                                                                  - +
                                                                                                                                                                  +
                                                                                                                                                                  + ``` @@ -83,6 +88,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -94,15 +101,11 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } @@ -111,17 +114,29 @@ p { --fcc-editable-region-- -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; } ``` diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f671b6d1919792745aa5d.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f671b6d1919792745aa5d.md index 7719b591f68..f37aa655548 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f671b6d1919792745aa5d.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f671b6d1919792745aa5d.md @@ -1,29 +1,29 @@ --- id: 615f671b6d1919792745aa5d -title: Paso 39 +title: Step 40 challengeType: 0 -dashedName: step-39 +dashedName: step-40 --- # --description-- -Cree un nuevo elemento `div` debajo de su elemento `.md`. Asígnele un atributo `class` establecido en `daily-value sm-text`. Dentro de este nuevo `div`, agregue un elemento `p` con el texto `% Daily Value *`, y configure el atributo `class` a `right bold`. +Create a new `div` element below your `.medium` element. Give it a `class` attribute set to `daily-value small-text`. Within this new `div`, add a `p` element with the text `% Daily Value *`, and set the `class` attribute to `bold right`. # --hints-- -Debe crear un nuevo elemento `div` después de su elemento `.md`. +You should create a new `div` element after your `.medium` element. ```js assert(document.querySelector('.label')?.lastElementChild?.localName === 'div'); assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('divider')); -assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('md')); +assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('medium')); ``` -Su nuevo `div` debe tener un atributo `class` establecido en `daily-value sm-text`. +Your new `div` should have a `class` attribute set to `daily-value small-text`. ```js assert(document.querySelector('.label')?.lastElementChild?.classList?.contains('daily-value')); -assert(document.querySelector('.label')?.lastElementChild?.classList?.contains('sm-text')); +assert(document.querySelector('.label')?.lastElementChild?.classList?.contains('small-text')); ``` Su nuevo elemento `div` debe tener un elemento `p`. @@ -38,11 +38,11 @@ Su nuevo elemento `p` debe tener el texto `% Daily Value *`. assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.textContent === '% Daily Value *'); ``` -Su nuevo elemento `p` debe tener un atributo `class` establecido en `right bold`. +Your new `p` element should have a `class` attribute set to `bold right`. ```js -assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.classList?.contains('right')); assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.classList?.contains('right')); ``` # --seed-- @@ -52,32 +52,36 @@ assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.cl ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  -

                                                                                                                                                                  Calories 230

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  ---fcc-editable-region-- ---fcc-editable-region-- + + + Nutrition Label + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  +

                                                                                                                                                                  Calories

                                                                                                                                                                  + 230
                                                                                                                                                                  - + --fcc-editable-region-- +
                                                                                                                                                                  + + --fcc-editable-region-- +
                                                                                                                                                                  + ``` @@ -109,6 +113,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -120,34 +126,42 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; } ``` diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6823d0815b7a991f2a75.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6823d0815b7a991f2a75.md index dcfc6994ae0..657f236779b 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6823d0815b7a991f2a75.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6823d0815b7a991f2a75.md @@ -1,32 +1,32 @@ --- id: 615f6823d0815b7a991f2a75 -title: Paso 40 +title: Step 42 challengeType: 0 -dashedName: step-40 +dashedName: step-42 --- # --description-- -El estilo `float` hace que el nuevo elemento `p` quede fuera del borde de la etiqueta. Use su elemento `.divider` existente como ejemplo para agregar un nuevo divisor después del elemento `p`. +Use your existing `.divider` element as an example to add a new divider after the `p` element. # --hints-- -Debe crear un nuevo `div` dentro de su elemento `.daily-value.sm-text`. +You should create a new `div` within your `.daily-value` element. ```js -assert(document.querySelectorAll('.daily-value.sm-text > div')?.length === 1) +assert(document.querySelectorAll('.daily-value.small-text > div')?.length === 1) ``` Tu nuevo `div` debe tener el atributo `class` establecido en `divider`. ```js -assert(document.querySelector('.daily-value.sm-text > div')?.classList?.contains('divider')) +assert(document.querySelector('.daily-value.small-text > div')?.classList?.contains('divider')) ``` Tu nuevo `div` debería ir después de tu elemento `p`. ```js -assert(document.querySelector('.daily-value.sm-text > div')?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text > div')?.previousElementSibling?.localName === 'p'); ``` # --seed-- @@ -36,34 +36,38 @@ assert(document.querySelector('.daily-value.sm-text > div')?.previousElementSibl ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  -

                                                                                                                                                                  Calories 230

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

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  + + + Nutrition Label + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  +

                                                                                                                                                                  Calories

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

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  +
                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                  + ``` @@ -95,6 +99,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -106,34 +112,46 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } ``` diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6b2d164f81809efd9bdc.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6b2d164f81809efd9bdc.md index 33a1b765ae4..e3caeec93b8 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6b2d164f81809efd9bdc.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6b2d164f81809efd9bdc.md @@ -1,56 +1,62 @@ --- id: 615f6b2d164f81809efd9bdc -title: Paso 42 +title: Step 43 challengeType: 0 -dashedName: step-42 +dashedName: step-43 --- # --description-- -Después de su último elemento `.divider`, cree un elemento `p` y asígnele el texto `Total Fat 8g 10%`. Envuelva `Total Fat` en un elemento `span` con la `class` configurada en `bold`. Envuelva `10%` en otro elemento `span` con la `class` establecida en `bold right`. +Después de su último elemento `.divider`, cree un elemento `p` y asígnele el texto `Total Fat 8g 10%`. Envuelva `Total Fat` en un elemento `span` con la `class` configurada en `bold`. Wrap `10%` in another `span` element with the `class` set to `bold`. Also wrap the words `Total Fat 8g` in an additional `span` element for alignment. # --hints-- Debe crear un nuevo elemento `p` al final de su elemento `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` Su nuevo elemento `p` debe tener el texto `Total Fat 8g 10%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Total Fat 8g[\s|\n]+10%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Total Fat[\s|\n]+8g[\s|\n]+10%/)); ``` -Su elemento `p` debe tener dos elementos `span`. +Your `p` element should have three `span` elements. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 2); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 3); ``` -Tu primer elemento `span` debe envolver el texto `Total Fat`. +One `span` element should wrap the text `Total Fat`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.innerText === 'Total Fat'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span > span')?.innerText === 'Total Fat'); ``` -Su primer elemento `span` debe tener `class` establecido en `bold`. +The `span` element around `Total Fat` should have the `class` set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.className === 'bold'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span > span')?.className === 'bold'); ``` -Su segundo elemento `span` debe envolver el texto `10%`. +A `span` element should wrap the text `10%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.[1]?.innerText === '10%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span + span')?.innerText === '10%'); ``` -El segundo elemento `span` debe tener el `class` establecido en `bold right`. +The `span` element around `10%` should have the `class` set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.[1]?.className === 'bold right'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.[1]?.className === 'bold'); +``` + +A `span` element should have the text `Total Fat 8g`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Total Fat[\s|\n]+8g/)); ``` # --seed-- @@ -60,35 +66,39 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySe ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  -

                                                                                                                                                                  Calories 230

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  -
                                                                                                                                                                  ---fcc-editable-region-- ---fcc-editable-region-- + + + Nutrition Label + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  +

                                                                                                                                                                  Calories

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

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                  + ``` @@ -120,46 +130,59 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } ``` diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6cc778f7698258467596.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6cc778f7698258467596.md index bbafe08d050..6cfa76c1a73 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6cc778f7698258467596.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6cc778f7698258467596.md @@ -1,46 +1,45 @@ --- id: 615f6cc778f7698258467596 -title: Paso 43 +title: Step 44 challengeType: 0 -dashedName: step-43 +dashedName: step-44 --- # --description-- -Debajo de su elemento con el texto `Total Fat`, cree un nuevo elemento `p` con el texto `Saturated Fat 1g 5%`. Envuelva el `5%` en un `span` con el atributo `class` establecido en`bold right`. +Debajo de su elemento con el texto `Total Fat`, cree un nuevo elemento `p` con el texto `Saturated Fat 1g 5%`. Wrap the `5%` in a `span` with the `class` attribute set to `bold`. In this case this is enough to align the percentage to `5%`. # --hints-- Debe crear un nuevo elemento `p` debajo de su elemento con el texto `Total de Grasas`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.innerText.match(/Total Fat 8g\s*10%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.innerText.match(/Total Fat 8g\s*10%/)); ``` Su nuevo elemento `p` debe tener el texto `Grasas saturadas 1g 5%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText.match(/Saturated Fat 1g\s*5%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText.match(/Saturated Fat 1g\s*5%/)); ``` Su nuevo elemento `p` debe tener un elemento `span`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.localName === 'span'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.localName === 'span'); ``` -Su elemento `span` debe tener el atributo `class` establecido en `bold right`. +Your `span` element should have the `class` attribute set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); ``` Su elemento `span` debe envolver el texto `5%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.innerText === "5%"); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === "5%"); ``` # --seed-- @@ -50,36 +49,40 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastEle ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  -

                                                                                                                                                                  Calories 230

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                  ---fcc-editable-region-- ---fcc-editable-region-- + + + Nutrition Label + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  +

                                                                                                                                                                  Calories

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

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                  +
                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                  + ``` @@ -111,46 +114,59 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } ``` diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6fddaac1e083502d3e6a.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6fddaac1e083502d3e6a.md index 9930b02f21e..236ff502d5e 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6fddaac1e083502d3e6a.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6fddaac1e083502d3e6a.md @@ -1,8 +1,8 @@ --- id: 615f6fddaac1e083502d3e6a -title: Paso 44 +title: Step 45 challengeType: 0 -dashedName: step-44 +dashedName: step-45 --- # --description-- @@ -14,7 +14,7 @@ Este nuevo elemento `p` deberá sangrarse. Dale una `class` establecida en `inde Su elemento `p` con el texto `Saturated Fat 1g 5%` debe tener un atributo `class` establecido en `indent`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('indent')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('indent')); ``` # --seed-- @@ -24,36 +24,41 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  -

                                                                                                                                                                  Calories 230

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                  ---fcc-editable-region-- -

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  +

                                                                                                                                                                  Calories

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

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                  +

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  +
                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                  + ``` @@ -85,46 +90,59 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } ``` diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f70077a4ff98424236c1e.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f70077a4ff98424236c1e.md index 14dfe7ac64d..bcf53dd4b3f 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f70077a4ff98424236c1e.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f70077a4ff98424236c1e.md @@ -1,8 +1,8 @@ --- id: 615f70077a4ff98424236c1e -title: Paso 45 +title: Step 46 challengeType: 0 -dashedName: step-45 +dashedName: step-46 --- # --description-- @@ -30,34 +30,39 @@ assert(new __helpers.CSSHelp(document).getStyle('.indent')?.marginLeft === '1em' ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  -

                                                                                                                                                                  Calories 230

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                  -

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  +

                                                                                                                                                                  Calories

                                                                                                                                                                  + 230
                                                                                                                                                                  - +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                  +

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  + ``` @@ -89,47 +94,60 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } --fcc-editable-region-- diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f72a872354a850d4f533e.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f72a872354a850d4f533e.md index c050ea3ee1d..3603ffd7d5d 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f72a872354a850d4f533e.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f72a872354a850d4f533e.md @@ -1,8 +1,8 @@ --- id: 615f72a872354a850d4f533e -title: Paso 46 +title: Step 47 challengeType: 0 -dashedName: step-46 +dashedName: step-47 --- # --description-- @@ -30,34 +30,39 @@ assert(new __helpers.CSSHelp(document).getStyle('.daily-value p')?.borderBottom ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  -

                                                                                                                                                                  Calories 230

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                  -

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  +

                                                                                                                                                                  Calories

                                                                                                                                                                  + 230
                                                                                                                                                                  - +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                  +

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  + ``` @@ -89,47 +94,60 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f74a71f1e498619e38ee8.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f74a71f1e498619e38ee8.md index 1225d80c4f9..1ebf447794e 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f74a71f1e498619e38ee8.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f74a71f1e498619e38ee8.md @@ -1,8 +1,8 @@ --- id: 615f74a71f1e498619e38ee8 -title: Paso 47 +title: Step 48 challengeType: 0 -dashedName: step-47 +dashedName: step-48 --- # --description-- @@ -14,16 +14,15 @@ Los bordes inferiores debajo de los elementos `% Daily Value *` y `Saturated Fat Su elemento `p` con el texto `% Daily Value *` debe tener `no-divider` agregado al atributo `class`. No elimine las clases existentes. ```js -const p = document.querySelector('.daily-value.sm-text')?.firstElementChild; +const p = document.querySelector('.daily-value.small-text')?.firstElementChild; assert(p?.classList?.contains('no-divider')); assert(p?.classList?.contains('bold')); -assert(p?.classList?.contains('right')); ``` Su elemento `p` con el texto `Saturated Fat 1g 5%` debe tener `no-divider` agregado al atributo `class`. No elimine las clases existentes. ```js -const p = document.querySelector('.daily-value.sm-text')?.lastElementChild; +const p = document.querySelector('.daily-value.small-text')?.lastElementChild; assert(p?.classList?.contains('no-divider')); assert(p?.classList?.contains('indent')); ``` @@ -35,36 +34,41 @@ assert(p?.classList?.contains('indent')); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  -

                                                                                                                                                                  Calories 230

                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  +

                                                                                                                                                                  Calories

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

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                  -

                                                                                                                                                                  Saturated Fat 1g 5%

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

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                  +

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  +
                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                  + ``` @@ -96,47 +100,60 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ad94380408d971d14f6.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ad94380408d971d14f6.md index 58d3af576f8..9caf9ef2d3a 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ad94380408d971d14f6.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ad94380408d971d14f6.md @@ -1,8 +1,8 @@ --- id: 615f7ad94380408d971d14f6 -title: Paso 48 +title: Step 49 challengeType: 0 -dashedName: step-48 +dashedName: step-49 --- # --description-- @@ -44,37 +44,43 @@ assert(style?.borderBottom === '1px solid rgb(136, 137, 137)'); ## --seed-contents-- + ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  -

                                                                                                                                                                  Calories 230

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                  -

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  +

                                                                                                                                                                  Calories

                                                                                                                                                                  + 230
                                                                                                                                                                  - +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                  +

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  + ``` @@ -106,47 +112,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7bc680f7168ea01ebf99.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7bc680f7168ea01ebf99.md index 9b6df5680ae..044970ad768 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7bc680f7168ea01ebf99.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7bc680f7168ea01ebf99.md @@ -1,8 +1,8 @@ --- id: 615f7bc680f7168ea01ebf99 -title: Paso 49 +title: Step 50 challengeType: 0 -dashedName: step-49 +dashedName: step-50 --- # --description-- @@ -13,16 +13,16 @@ Su primer elemento `.no-divider` tiene un `.divider` después de él. Cree otro # --hints-- -Debe crear un nuevo `div` al final de su elemento `.daily-value.sm-text`. +You should create a new `div` at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` Tu nuevo `div` debe tener el atributo `class` establecido en `divider`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -32,36 +32,41 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  -

                                                                                                                                                                  Calories 230

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

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                  -

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  +

                                                                                                                                                                  Calories

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

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                  +

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  +
                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                  + ``` @@ -93,47 +98,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7c71eab8218f846e4503.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7c71eab8218f846e4503.md index 9555786a5d1..f1a1db9d790 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7c71eab8218f846e4503.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7c71eab8218f846e4503.md @@ -1,32 +1,32 @@ --- id: 615f7c71eab8218f846e4503 -title: Paso 50 +title: Step 51 challengeType: 0 -dashedName: step-50 +dashedName: step-51 --- # --description-- -Después de su último `.divider`, cree otro elemento `p` con el texto `Trans Fat 0g`. Ponga en cursiva la palabra `Trans` envolviéndola en un elemento `i`. Asigne al nuevo elemento `p` el atributo `class` establecido en `indent no-divider`. +Después de su último `.divider`, cree otro elemento `p` con el texto `Trans Fat 0g`. Ponga en cursiva la palabra `Trans` envolviéndola en un elemento `i`. Asigne al nuevo elemento `p` el atributo `class` establecido en `indent no-divider`. Wrap `Trans Fat 0g` in a `span` element for alignment. # --hints-- -Debe crear un nuevo elemento `p` al final de su elemento `.daily-value.sm-text`. +You should create a new `p` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` Su nuevo elemento `p` debe tener el texto `Trans Fat 0g`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText === 'Trans Fat 0g'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText === 'Trans Fat 0g'); ``` Su nuevo elemento `p` debe tener el atributo `class` establecido en `indent no-divider`. ```js -const p = document.querySelector('.daily-value.sm-text')?.lastElementChild; +const p = document.querySelector('.daily-value.small-text')?.lastElementChild; assert(p?.classList?.contains('indent')); assert(p?.classList?.contains('no-divider')); ``` @@ -34,13 +34,25 @@ assert(p?.classList?.contains('no-divider')); Su nuevo elemento `p` debe tener un elemento `i`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.localName === 'i'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('i')); ``` Su elemento `i` debe envolver el texto `Trans`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.innerText === 'Trans'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('i')?.innerText === 'Trans'); +``` + +Your new `p` element should have a `span` element. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span')); +``` + +Your `span` element should wrap the text `Trans Fat 0g`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span')?.innerText?.match(/Trans[\s|\n]+Fat 0g/)); ``` # --seed-- @@ -50,37 +62,42 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstEl ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  -

                                                                                                                                                                  Calories 230

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

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                  -

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  -
                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  +

                                                                                                                                                                  Calories

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

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                  +

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                  + ``` @@ -112,47 +129,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7d489a581590d1350288.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7d489a581590d1350288.md index ca9cb9dcb3f..ae93d46d2fb 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7d489a581590d1350288.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7d489a581590d1350288.md @@ -1,8 +1,8 @@ --- id: 615f7d489a581590d1350288 -title: Paso 51 +title: Step 52 challengeType: 0 -dashedName: step-51 +dashedName: step-52 --- # --description-- @@ -11,16 +11,16 @@ Crea otro `.divider` después de tu último elemento `p`. # --hints-- -Debe crear un nuevo elemento `div` al final de su elemento `.daily-value.sm-text`. +You should create a new `div` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` Su nuevo elemento `div` debe tener el atributo `class` establecido en `divider`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -30,38 +30,43 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  -

                                                                                                                                                                  Calories 230

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

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                  -

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  +

                                                                                                                                                                  Calories

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

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                  +

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                  +
                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                  + ``` @@ -93,47 +98,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7de4487b64919bb4aa5e.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7de4487b64919bb4aa5e.md index 3d47edbc4be..6f984a2df8a 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7de4487b64919bb4aa5e.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7de4487b64919bb4aa5e.md @@ -1,57 +1,62 @@ --- id: 615f7de4487b64919bb4aa5e -title: Paso 52 +title: Step 53 challengeType: 0 -dashedName: step-52 +dashedName: step-53 --- # --description-- -Después de su último `.divider`, cree un nuevo elemento `p` con el texto `Cholesterol 0mg 0%`. Envuelve el texto `Cholesterol` en un elemento `span` y dale a ese elemento `span` el atributo `class` establecido en `bold`. Envuelva el texto `0%` en otro elemento `span`, con `class` establecido en `bold right`. +Después de su último `.divider`, cree un nuevo elemento `p` con el texto `Cholesterol 0mg 0%`. Envuelve el texto `Cholesterol` en un elemento `span` y dale a ese elemento `span` el atributo `class` establecido en `bold`. Wrap the text `0%` in another `span` element, with the `class` set to `bold`. Also wrap `Cholesterol 0mg` in an additional `span` element for the alignment. # --hints-- -Debe crear un nuevo elemento `p` al final de su elemento `.daily-value.sm-text`. +You should create a new `p` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` Su nuevo elemento `p` debe tener el texto `Cholesterol 0mg 0%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Cholesterol 0mg[\s|\n]+0%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Cholesterol[\s|\n]+0mg[\s|\n]+0%/)); ``` -Su nuevo elemento `p` debe tener dos elementos `span`. +Your new `p` element should have three `span` elements. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 2); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 3); ``` -Su primer elemento `span` debe tener el atributo `class` establecido en `bold`. +Your first `span` `Cholesterol` element should have the `class` attribute set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.classList?.contains('bold')); ``` -Tu primer elemento `span` debe envolver el texto `Cholesterol`. +Your first `span` element should wrap the text `Cholesterol 0mg`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.innerText === 'Cholesterol'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.innerText?.match(/Cholesterol[\s|\n]+0mg/)); ``` -Su segundo elemento `span` debe tener el atributo `class` establecido en `bold right`. +Your first `span` element should wrap the text `Cholesterol`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.innerText === 'Cholesterol'); ``` -Su segundo elemento `span` debe envolver el texto `0%`. +Your second `span` element should have the `class` attribute set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.innerText === '0%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); +``` + +Your second `span` element should wrap the text `0%`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === '0%'); ``` # --seed-- @@ -61,39 +66,44 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastEle ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  -

                                                                                                                                                                  Calories 230

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

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                  -

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                  -
                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  +

                                                                                                                                                                  Calories

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

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                  +

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                  + ``` @@ -125,47 +135,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7e7281626a92bbd62da8.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7e7281626a92bbd62da8.md index c61f4c233a3..945fa973617 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7e7281626a92bbd62da8.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7e7281626a92bbd62da8.md @@ -1,57 +1,62 @@ --- id: 615f7e7281626a92bbd62da8 -title: Paso 53 +title: Step 54 challengeType: 0 -dashedName: step-53 +dashedName: step-54 --- # --description-- -Debajo de su último elemento `p`, cree otro elemento `p` con el texto `Sodium 160mg 7%`. Envuelva el texto `Sodium` en un elemento `span` con un atributo `class` establecido en `bold`. Envuelve el texto `7%` en otro elemento `span` con la `class` establecida en `bold right`. +Debajo de su último elemento `p`, cree otro elemento `p` con el texto `Sodium 160mg 7%`. Envuelva el texto `Sodium` en un elemento `span` con un atributo `class` establecido en `bold`. Wrap the `7%` text in another `span` element with the `class` set to `bold`. Also add an additional `span` element around `Sodium 160mg` for aligning it correctly. # --hints-- -Debe crear un nuevo elemento `p` al final de su elemento `.daily-value.sm-text`. +You should create a new `p` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` Su nuevo elemento `p` debe tener el texto `Sodium 160mg 7%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Sodium 160mg[\s|\n]+7%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Sodium[\s|\n]160mg[\s|\n]+7%/)); ``` -Su nuevo elemento `p` debe tener dos elementos `span`. +Your new `p` element should have three `span` elements. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 2); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 3); ``` -Su primer elemento `span` debe tener el atributo `class` establecido en `bold`. +A `span` element should wrap the text `Sodium 360mg`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.innerText?.match(/Sodium[\s|\n]160mg/)); ``` -Su primer elemento `span` debe envolver el texto `Sodium`. +A `span` element should wrap the text `Sodium`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.innerText === 'Sodium'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.innerText === "Sodium"); ``` -Su segundo elemento `span` debe tener el atributo `class` establecido en `bold right`. +The `span` around `Sodium` should have the `class` attribute set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.classList?.contains('bold')); ``` -Su segundo elemento `span` debe envolver el texto `7%`. +A `span` element should wrap the text `7%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.innerText === '7%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === '7%'); +``` + +The `span` element around `7%` should have the `class` attribute set to `bold`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); ``` # --seed-- @@ -61,40 +66,45 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastEle ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  -

                                                                                                                                                                  Calories 230

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

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                  -

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  +

                                                                                                                                                                  Calories

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

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                  +

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                  +
                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                  + ``` @@ -126,47 +136,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ecb09de9a938ef94756.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ecb09de9a938ef94756.md index c6c2b15ead2..5a74dad1550 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ecb09de9a938ef94756.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ecb09de9a938ef94756.md @@ -1,57 +1,68 @@ --- id: 615f7ecb09de9a938ef94756 -title: Paso 54 +title: Step 55 challengeType: 0 -dashedName: step-54 +dashedName: step-55 --- # --description-- -Agrega otro elemento `p` con el texto `Total Carbohydrate 37g 13%`. Al igual que antes, utilice los elementos `span` para hacer que el texto `Total Carbohydrate` esté en negrita y que el texto `13%` esté en negrita y alineado a la derecha. +Agrega otro elemento `p` con el texto `Total Carbohydrate 37g 13%`. Like before, use `span` elements to make the text `Total Carbohydrate` and `13%` bold. Also add an additional `span` element to wrap the `Total Carbohydrate 37g` text in a span element so to have it aligned to the left, and `13%` to the right. # --hints-- -Debe crear un nuevo elemento `p` al final de su elemento `.daily-value.sm-text`. +You should create a new `p` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` Su nuevo elemento `p` debe tener el texto `Total Carbohydrate 37g 13%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Total Carbohydrate 37g[\s|\n]+13%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Total Carbohydrate[\s|\n]+37g[\s|\n]+13%/)); ``` -Su nuevo elemento `p` debe tener dos elementos `span`. +Your new `p` element should have three `span` elements. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 2); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 3); ``` -Su primer elemento `span` debe tener el atributo `class` establecido en `bold`. +One `span` element should wrap the text `Total Carbohydrate 37g`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.innerText?.match(/Total Carbohydrate[\s|\n]+37g/)); ``` -Su primer elemento `span` debe envolver el texto `Total Carbohydrate`. +One `span` element should wrap the text `Total Carbohydrate`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.innerText === 'Total Carbohydrate'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.innerText === 'Total Carbohydrate'); ``` -Su segundo elemento `span` debe tener el atributo `class` establecido en`bold right`. +The `span` element around `Total Carbohydrate` should have the `class` attribute set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.classList?.contains('bold')); ``` -Su segundo elemento `span` debe envolver el texto `13%`. +A `span` element should wrap the text `13%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.innerText === '13%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === '13%'); +``` + +The `span` element around `13%` should have the `class` attribute set to `bold`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); +``` + +Your second `span` element should wrap the text `13%`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === '13%'); ``` # --seed-- @@ -61,41 +72,46 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastEle ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  -

                                                                                                                                                                  Calories 230

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

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                  -

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                  -

                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  +

                                                                                                                                                                  Calories

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

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                  +

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                  +

                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                  +
                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                  + ``` @@ -127,47 +143,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7fa959ab75948f96a0d6.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7fa959ab75948f96a0d6.md index ed32f555e9f..418d2475862 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7fa959ab75948f96a0d6.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7fa959ab75948f96a0d6.md @@ -1,8 +1,8 @@ --- id: 615f7fa959ab75948f96a0d6 -title: Paso 55 +title: Step 56 challengeType: 0 -dashedName: step-55 +dashedName: step-56 --- # --description-- @@ -11,30 +11,30 @@ Debajo de su último elemento `p`, agregue otro elemento `p` con el texto `Dieta # --hints-- -Debe crear un nuevo elemento `p` y `div` al final de su elemento `.daily-value.sm-text`. +You should create a new `p` and `div` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` Su nuevo elemento `p` debe tener el texto `Dietary Fiber 4g`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.innerText.match(/Dietary Fiber[\s|\n]+4g/)); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.innerText.match(/Dietary Fiber[\s|\n]+4g/)); ``` Su nuevo elemento `p` debe tener el atributo `class` establecido en `indent no-divider`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('indent')); -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('indent')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('no-divider')); ``` Tu nuevo `div` debe tener el atributo `class` establecido en `divider`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -44,42 +44,47 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  -

                                                                                                                                                                  Calories 230

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

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                  -

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                  -

                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                  -

                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  +

                                                                                                                                                                  Calories

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

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                  +

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                  +

                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                  +

                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                  +
                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                  + ``` @@ -111,47 +116,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f808d85793195b0f53be9.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f808d85793195b0f53be9.md index bb7217addbd..4d49b7f4700 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f808d85793195b0f53be9.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f808d85793195b0f53be9.md @@ -1,8 +1,8 @@ --- id: 615f808d85793195b0f53be9 -title: Paso 56 +title: Step 57 challengeType: 0 -dashedName: step-56 +dashedName: step-57 --- # --description-- @@ -11,30 +11,30 @@ Cree otro elemento `p` después de su último `.divider` y asígnele el texto `T # --hints-- -Debe crear un nuevo elemento `p` y `div` al final de su elemento `.daily-value.sm-text`. +You should create a new `p` and `div` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` Su nuevo elemento `p` debe tener el texto `Total Sugars 12g`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.innerText.match(/Total Sugars[\s|\n]+12g/)); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.innerText.match(/Total Sugars[\s|\n]+12g/)); ``` Su nuevo elemento `p` debe tener el atributo `class` establecido en `indent no-divider`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('indent')); -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('indent')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('no-divider')); ``` Tu nuevo `div` debe tener el atributo `class` establecido en `divider`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -44,44 +44,49 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  -

                                                                                                                                                                  Calories 230

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

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                  -

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                  -

                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                  -

                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                  -

                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                  -
                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  +

                                                                                                                                                                  Calories

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

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                  +

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                  +

                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                  +

                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                  +

                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                  + ``` @@ -113,47 +118,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f829d07b18f96f6f6684b.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f829d07b18f96f6f6684b.md index 695ee8885db..84c6b3d60db 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f829d07b18f96f6f6684b.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f829d07b18f96f6f6684b.md @@ -1,21 +1,21 @@ --- id: 615f829d07b18f96f6f6684b -title: Paso 57 +title: Step 58 challengeType: 0 -dashedName: step-57 +dashedName: step-58 --- # --description-- -La ventaja de crear estos divisores es que puede aplicar clases específicas para diseñarlos individualmente. Agregue `dbl-indent` a la `class` para su último `.divider`. +La ventaja de crear estos divisores es que puede aplicar clases específicas para diseñarlos individualmente. Add `double-indent` to the `class` for your last `.divider`. # --hints-- -Tu último elemento `.divider` debe tener `dbl-indent` agregado a la `class`. No elimine el valor existente. +Your last `.divider` element should have `double-indent` added to the `class`. No elimine el valor existente. ```js -const last = document.querySelector('.daily-value.sm-text')?.lastElementChild; -assert(last?.classList?.contains('dbl-indent')); +const last = document.querySelector('.daily-value.small-text')?.lastElementChild; +assert(last?.classList?.contains('double-indent')); assert(last?.classList?.contains('divider')); ``` @@ -26,46 +26,51 @@ assert(last?.classList?.contains('divider')); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  -

                                                                                                                                                                  Calories 230

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

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                  -

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                  -

                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                  -

                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                  -

                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                  -
                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  +

                                                                                                                                                                  Calories

                                                                                                                                                                  + 230
                                                                                                                                                                  - +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                  +

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                  +

                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                  +

                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                  +

                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                  +
                                                                                                                                                                  + ``` @@ -97,47 +102,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f83ef928ec9982b785b6a.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f83ef928ec9982b785b6a.md index 342c6dc4b46..370fd147adf 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f83ef928ec9982b785b6a.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f83ef928ec9982b785b6a.md @@ -1,26 +1,26 @@ --- id: 615f83ef928ec9982b785b6a -title: Paso 58 +title: Step 59 challengeType: 0 -dashedName: step-58 +dashedName: step-59 --- # --description-- -Cree un selector `.dbl-indent` y asígnele un margen izquierdo de `2em`. +Create a `.double-indent` selector and give it a left margin of `2em`. # --hints-- -Debería tener un nuevo selector `.dbl-indent`. +You should have a new `.double-indent` selector. ```js -assert(new __helpers.CSSHelp(document).getStyle('.dbl-indent')); +assert(new __helpers.CSSHelp(document).getStyle('.double-indent')); ``` -Su selector `.dbl-indent` debe tener una propiedad `margin-left` establecida en `2em`. +Your `.double-indent` selector should have a `margin-left` property set to `2em`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.dbl-indent')?.marginLeft === '2em'); +assert(new __helpers.CSSHelp(document).getStyle('.double-indent')?.marginLeft === '2em'); ``` # --seed-- @@ -30,44 +30,49 @@ assert(new __helpers.CSSHelp(document).getStyle('.dbl-indent')?.marginLeft === ' ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  -

                                                                                                                                                                  Calories 230

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                  -

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                  -

                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                  -

                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                  -

                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                  -
                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  +

                                                                                                                                                                  Calories

                                                                                                                                                                  + 230
                                                                                                                                                                  - +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                  +

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                  +

                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                  +

                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                  +

                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  + ``` @@ -99,56 +104,70 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } ---fcc-editable-region-- +--fcc-editable-region-- ---fcc-editable-region-- +--fcc-editable-region-- .daily-value p:not(.no-divider) { border-bottom: 1px solid #888989; diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f84f246e8ba98e3cd97be.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f84f246e8ba98e3cd97be.md index 09148309e2f..0c25d20ad4b 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f84f246e8ba98e3cd97be.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f84f246e8ba98e3cd97be.md @@ -1,61 +1,60 @@ --- id: 615f84f246e8ba98e3cd97be -title: Paso 59 +title: Step 60 challengeType: 0 -dashedName: step-59 +dashedName: step-60 --- # --description-- -Debajo de su elemento `.dbl-indent`, agregue un nuevo elemento `p` con el texto `Includes 10g Added Sugars 20%`. Su nuevo elemento `p` también debe tener doble sangría y no tener un borde inferior. Usa un `span` para hacer que el `20%` esté en negrita y alineado a la derecha. +Below your `.double-indent` element, add a new `p` element with the text `Includes 10g Added Sugars 20%`. Su nuevo elemento `p` también debe tener doble sangría y no tener un borde inferior. Usa un `span` para hacer que el `20%` esté en negrita y alineado a la derecha. Luego crea otro divisor después de ese elemento `p`. # --hints-- -Debe crear un nuevo elemento `p` y `div` al final de su elemento `.daily-value.sm-text`. +You should create a new `p` and `div` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` Su nuevo elemento `p` debe tener el texto `Includes 10g Added Sugars 20%`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.innerText.match(/Includes 10g Added Sugars[\s|\n]+20%/)); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.innerText.match(/Includes 10g Added Sugars[\s|\n]+20%/)); ``` -Su nuevo elemento `p` debe tener el atributo `class` establecido en `dbl-indent no-divider`. +Your new `p` element should have the `class` attribute set to `double-indent no-divider`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('dbl-indent')); -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('double-indent')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('no-divider')); ``` Su nuevo elemento `p` debe tener un elemento `span`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.firstElementChild?.localName === 'span'); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.firstElementChild?.localName === 'span'); ``` -Su elemento `span` debe tener el atributo `class` establecido en `bold right`. +Your `span` element should have the `class` attribute set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.firstElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.firstElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.firstElementChild?.classList?.contains('bold')); ``` Su elemento `span` debe envolver el texto `20%`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type span')?.innerText === '20%'); +assert(document.querySelector('.daily-value.small-text p:last-of-type span')?.innerText === '20%'); ``` Tu nuevo `div` debe tener el atributo `class` establecido en `divider`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -65,46 +64,51 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  -

                                                                                                                                                                  Calories 230

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

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                  -

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                  -

                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                  -

                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                  -

                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                  -
                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  +

                                                                                                                                                                  Calories

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

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                  +

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                  +

                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                  +

                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                  +

                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                  + ``` @@ -136,54 +140,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f887466db4ba14b5342cc.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f887466db4ba14b5342cc.md index fb53ccd1a59..3621fa740a4 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f887466db4ba14b5342cc.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f887466db4ba14b5342cc.md @@ -1,8 +1,8 @@ --- id: 615f887466db4ba14b5342cc -title: Paso 60 +title: Step 61 challengeType: 0 -dashedName: step-60 +dashedName: step-61 --- # --description-- @@ -13,30 +13,30 @@ Siguiendo este elemento, cree un gran divisor. # --hints-- -Debe crear un nuevo elemento `p` y `div` al final de su elemento `.daily-value.sm-text`. +You should create a new `p` and `div` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` Su nuevo elemento `p` debe tener el texto `Protein 3g`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.innerText.match(/Protein[\s|\n]+3g/)); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.innerText.match(/Protein[\s|\n]+3g/)); ``` Su nuevo elemento `p` debe tener el atributo `class` establecido en `no-divider`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('no-divider')); ``` -Su nuevo `div` debe tener el atributo `class` establecido en `divider lg`. +Your new `div` should have the `class` attribute set to `divider large`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('lg')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('large')); ``` # --seed-- @@ -46,48 +46,53 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  -

                                                                                                                                                                  Calories 230

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

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                  -

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                  -

                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                  -

                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                  -

                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  +

                                                                                                                                                                  Calories

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

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                  +

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                  +

                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                  +

                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                  +

                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                                                  +
                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                  + ``` @@ -119,54 +124,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f89e055040ba294719d2f.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f89e055040ba294719d2f.md index 2f85407b233..c6633389700 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f89e055040ba294719d2f.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f89e055040ba294719d2f.md @@ -1,39 +1,40 @@ --- id: 615f89e055040ba294719d2f -title: Paso 61 +title: Step 62 challengeType: 0 -dashedName: step-61 +dashedName: step-62 --- # --description-- -Crea otro elemento `p` debajo de tu divisor grande. Asigne al elemento `p` el texto `Vitamin D 2mcg 10%`. Usa un `span` para hacer que el `10%` se alinee a la derecha, pero no lo pongas en negrita. +Crea otro elemento `p` debajo de tu divisor grande. Asigne al elemento `p` el texto `Vitamin D 2mcg 10%`. + +The `p` element contains only text, you can wrap the percentage in a `span` element so that it is considered a separate entity from the rest of the text, and it's moved to the right. # --hints-- -Debe crear un nuevo elemento `p` al final de su elemento `.daily-value.sm-text`. +You should create a new `p` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` -Su nuevo elemento `p` debe tener el texto `Vitamin D 2mcg 10%`. +Your new `p` element should have the text `Vitamin D 2mcg 10%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Vitamin D 2mcg[\s|\n]+10%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Vitamin D 2mcg[\s|\n]+10%/)); ``` -Su nuevo elemento `p` debe tener un elemento `span`. +Your new `p` element should have a `span` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 1); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 1); ``` -Su elemento `span` debe tener la `class` establecida en `right`. Recuerda que no debes ponerlo en negrita. +Your `span` element should not be bold. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.classList?.contains('right')); -assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.classList?.contains('bold')); +assert(!document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span')?.classList?.contains('bold')); ``` # --seed-- @@ -43,50 +44,55 @@ assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.queryS ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  -

                                                                                                                                                                  Calories 230

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

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                  -

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                  -

                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                  -

                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                  -

                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                                                  -

                                                                                                                                                                  Protein 3g

                                                                                                                                                                  -
                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  +

                                                                                                                                                                  Calories

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

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                  +

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                  +

                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                  +

                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                  +

                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                                                  +

                                                                                                                                                                  Protein 3g

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                  + ``` @@ -118,54 +124,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8bfe0f30a1a3c340356b.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8bfe0f30a1a3c340356b.md index 3a129bf801f..804e7068e1b 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8bfe0f30a1a3c340356b.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8bfe0f30a1a3c340356b.md @@ -1,8 +1,8 @@ --- id: 615f8bfe0f30a1a3c340356b -title: Paso 62 +title: Step 63 challengeType: 0 -dashedName: step-62 +dashedName: step-63 --- # --description-- @@ -11,55 +11,53 @@ Cree otro elemento `p`, asígnele el texto `Calcium 260mg 20%`. Alinea `20%` a l # --hints-- -Debe crear dos nuevos elementos `p` al final de su elemento `.daily-value.sm-text`. +You should create two new `p` elements at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); ``` Su primer elemento nuevo `p` debe tener el texto `Calcium 260mg 20%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.innerText?.match(/Calcium 260mg[\s|\n]+20%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.innerText?.match(/Calcium 260mg[\s|\n]+20%/)); ``` Su primer elemento nuevo `p` debe tener un elemento `span`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.localName === 'span'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.localName === 'span'); ``` -Su primer elemento `span` debe tener el atributo `class` establecido en `right`. Recuerda, no lo pongas en negrita. +Your first `span` element should not be bold. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.classList?.contains('right')); -assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.classList?.contains('bold')); +assert(!document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.classList?.contains('bold')); ``` Su primer elemento `span` debe envolver el texto `20%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.innerText === '20%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.innerText === '20%'); ``` Su segundo elemento nuevo `p` debe tener el texto `Iron 8mg 45%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Iron 8mg[\s|\n]+45%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Iron 8mg[\s|\n]+45%/)); ``` Tu segundo elemento nuevo `p` debe tener un elemento `span`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.localName === 'span'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.localName === 'span'); ``` -Su segundo elemento `span` debe tener el atributo `class` establecido en `right`. Recuerda, no lo pongas en negrita. +Your second `span` element should not be bold. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('right')); -assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(!document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); ``` # --seed-- @@ -69,51 +67,56 @@ assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstE ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  -

                                                                                                                                                                  Calories 230

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

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                  -

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                  -

                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                  -

                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                  -

                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                                                  -

                                                                                                                                                                  Protein 3g

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  +

                                                                                                                                                                  Calories

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

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                  +

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                  +

                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                  +

                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                  +

                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                                                  +

                                                                                                                                                                  Protein 3g

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                  +
                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                  + ``` @@ -145,54 +148,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8f1223601fa546e93f31.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8f1223601fa546e93f31.md index 8441bd58098..a57c18f23f0 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8f1223601fa546e93f31.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8f1223601fa546e93f31.md @@ -1,8 +1,8 @@ --- id: 615f8f1223601fa546e93f31 -title: Paso 63 +title: Step 64 challengeType: 0 -dashedName: step-63 +dashedName: step-64 --- # --description-- @@ -11,35 +11,34 @@ Cree el elemento final `p` para su sección `.daily-value`. Dale el texto `Potas # --hints-- -Debe crear un nuevo elemento `p` al final de su elemento `.daily-value.sm-text`. +You should create a new `p` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` Su nuevo elemento `p` debe tener el atributo `class` establecido en `no-divider`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('no-divider')); ``` Su nuevo elemento `p` debe tener el texto `Potassium 235mg 6%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Potassium 235mg[\s|\n]+6%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Potassium 235mg[\s|\n]+6%/)); ``` Su nuevo elemento `p` debe tener un elemento `span`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 1); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 1); ``` -Su elemento `span` debe tener la `class` establecida en `right`. Recuerda que no debes ponerlo en negrita. +Your `span` element should not be bold. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.classList?.contains('right')); -assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.classList?.contains('bold')); +assert(!document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span')?.classList?.contains('bold')); ``` # --seed-- @@ -49,53 +48,58 @@ assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.queryS ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  -

                                                                                                                                                                  Calories 230

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

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                  -

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                  -

                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                  -

                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                  -

                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                                                  -

                                                                                                                                                                  Protein 3g

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                  -

                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                  -

                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  +

                                                                                                                                                                  Calories

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

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                  +

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                  +

                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                  +

                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                  +

                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                                                  +

                                                                                                                                                                  Protein 3g

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                  +

                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                  +

                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                  +
                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                  + ``` @@ -127,54 +131,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f905fbd1017a65ca224eb.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f905fbd1017a65ca224eb.md index c6b1b2584bc..181bb75e9f1 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f905fbd1017a65ca224eb.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f905fbd1017a65ca224eb.md @@ -1,8 +1,8 @@ --- id: 615f905fbd1017a65ca224eb -title: Paso 64 +title: Step 65 challengeType: 0 -dashedName: step-64 +dashedName: step-65 --- # --description-- @@ -23,11 +23,11 @@ Debe crear un nuevo `div` después de su elemento `.daily-value`. assert(document.querySelector('.daily-value').nextElementSibling?.localName === 'div'); ``` -Tu nuevo `div` debe tener `class` establecido en `divider md`. +Your new `div` should have the `class` set to `divider medium`. ```js assert(document.querySelector('.daily-value')?.nextElementSibling?.classList?.contains('divider')); -assert(document.querySelector('.daily-value')?.nextElementSibling?.classList?.contains('md')); +assert(document.querySelector('.daily-value')?.nextElementSibling?.classList?.contains('medium')); ``` Debe crear un elemento `p` después de su nuevo elemento `div`. @@ -55,55 +55,60 @@ assert.equal(document.querySelector('.label')?.lastElementChild?.innerText, '* T ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  -

                                                                                                                                                                  Calories 230

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                  -

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                  -

                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                  -

                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                  -

                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                                                  -

                                                                                                                                                                  Protein 3g

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                  -

                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                  -

                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                  -

                                                                                                                                                                  Potassium 235mg 6%

                                                                                                                                                                  -
                                                                                                                                                                  ---fcc-editable-region-- ---fcc-editable-region-- + + + Nutrition Label + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  +

                                                                                                                                                                  Calories

                                                                                                                                                                  +
                                                                                                                                                                  + 230
                                                                                                                                                                  - +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                  +

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                  +

                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                  +

                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                  +

                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                                                  +

                                                                                                                                                                  Protein 3g

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                  +

                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                  +

                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                  +

                                                                                                                                                                  Potassium 235mg 6%

                                                                                                                                                                  +
                                                                                                                                                                  + --fcc-editable-region-- + + --fcc-editable-region-- +
                                                                                                                                                                  + ``` @@ -135,54 +140,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f94786869e1a7fec54375.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f94786869e1a7fec54375.md index 974547f8706..4c07e75f89c 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f94786869e1a7fec54375.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f94786869e1a7fec54375.md @@ -1,8 +1,8 @@ --- id: 615f94786869e1a7fec54375 -title: Paso 65 +title: Step 66 challengeType: 0 -dashedName: step-65 +dashedName: step-66 --- # --description-- @@ -36,54 +36,60 @@ assert(new __helpers.CSSHelp(document).getStyle('.note')?.margin === '5px 0px'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  -

                                                                                                                                                                  Calories 230

                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  +

                                                                                                                                                                  Calories

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                  -

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                  -

                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                  -

                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                  -

                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                                                  -

                                                                                                                                                                  Protein 3g

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                  -

                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                  -

                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                  -

                                                                                                                                                                  Potassium 235mg 6%

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                                                                                  + 230
                                                                                                                                                                  - +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                  +

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                  +

                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                  +

                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                  +

                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                                                  +

                                                                                                                                                                  Protein 3g

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                  +

                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                  +

                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                  +

                                                                                                                                                                  Potassium 235mg 6%

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily + diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                                                                                  +
                                                                                                                                                                  + ``` @@ -115,54 +121,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f951dff9317a900ef683f.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f951dff9317a900ef683f.md index 680e2143275..01e1b00601d 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f951dff9317a900ef683f.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f951dff9317a900ef683f.md @@ -1,8 +1,8 @@ --- id: 615f951dff9317a900ef683f -title: Paso 66 +title: Step 67 challengeType: 0 -dashedName: step-66 +dashedName: step-67 --- # --description-- @@ -35,54 +35,60 @@ assert(new __helpers.CSSHelp(document).getStyle('.note')?.textIndent === '-8px') ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  -

                                                                                                                                                                  Calories 230

                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  +

                                                                                                                                                                  Calories

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                  -

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                  -

                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                  -

                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                  -

                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                                                  -

                                                                                                                                                                  Protein 3g

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                  -

                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                  -

                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                  -

                                                                                                                                                                  Potassium 235mg 6%

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                                                                                  + 230
                                                                                                                                                                  - +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                  +

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                  +

                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                  +

                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                  +

                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                                                  +

                                                                                                                                                                  Protein 3g

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                  +

                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                  +

                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                  +

                                                                                                                                                                  Potassium 235mg 6%

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily + diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                                                                                  +
                                                                                                                                                                  + ``` @@ -114,54 +120,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } @@ -182,54 +202,60 @@ p { ```html - - - Nutrition Label - - - - -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  -

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  -

                                                                                                                                                                  Calories 230

                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  +

                                                                                                                                                                  Calories

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                  -

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                  -

                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                  -

                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                  -

                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                                                  -

                                                                                                                                                                  Protein 3g

                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                  -

                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                  -

                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                  -

                                                                                                                                                                  Potassium 235mg 6%

                                                                                                                                                                  -
                                                                                                                                                                  -
                                                                                                                                                                  -

                                                                                                                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                                                                                  + 230
                                                                                                                                                                  - +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                  +

                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                  +

                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                  +

                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                  +

                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                                                  +

                                                                                                                                                                  Protein 3g

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                  +

                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                  +

                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                  +

                                                                                                                                                                  Potassium 235mg 6%

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily + diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                                                                                  +
                                                                                                                                                                  + ``` @@ -261,54 +287,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/635bde33c91c80540eae239b.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/635bde33c91c80540eae239b.md new file mode 100644 index 00000000000..d9073bf18ba --- /dev/null +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/635bde33c91c80540eae239b.md @@ -0,0 +1,153 @@ +--- +id: 635bde33c91c80540eae239b +title: Step 41 +challengeType: 0 +dashedName: step-41 +--- + +# --description-- + +The text `* Daily Value %` should be aligned to the right. Create a `.right` selector and use the `justify-content` property to do it. + +# --hints-- + +You should have a `.right` selector. + +```js +const hasRight = new __helpers.CSSHelp(document).getStyle('.right'); +assert(hasRight); + +``` + +The `.right` selector should have the `justify-content` property set to `flex-end`. + +```js +const rightJustifyContent = new __helpers.CSSHelp(document).getStyle('.right')?.getPropertyValue('justify-content'); +assert(rightJustifyContent === 'flex-end'); + +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  +

                                                                                                                                                                  Calories

                                                                                                                                                                  +
                                                                                                                                                                  + 230 +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  % Daily Value *

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  + + +``` + +```css +* { + box-sizing: border-box; +} + +html { + font-size: 16px; +} + +body { + font-family: 'Open Sans', sans-serif; +} + +.label { + border: 2px solid black; + width: 270px; + margin: 20px auto; + padding: 0 7px; +} + +header h1 { + text-align: center; + margin: -4px 0; + letter-spacing: 0.15px +} + +p { + margin: 0; + display: flex; + justify-content: space-between; +} + +.divider { + border-bottom: 1px solid #888989; + margin: 2px 0; +} + +.bold { + font-weight: 800; +} + +.large { + height: 10px; +} + +.large, .medium { + background-color: black; + border: 0; +} + +.medium { + height: 5px; +} + +.small-text { + font-size: 0.85rem; +} + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { + margin: -5px -2px; + font-size: 2em; + font-weight: 700; +} + +.calories-info span { + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +--fcc-editable-region-- + +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6395d33ab5d91bf317107c48.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6395d33ab5d91bf317107c48.md new file mode 100644 index 00000000000..e6f009b7e04 --- /dev/null +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6395d33ab5d91bf317107c48.md @@ -0,0 +1,117 @@ +--- +id: 6395d33ab5d91bf317107c48 +title: Step 32 +challengeType: 0 +dashedName: step-32 +--- + +# --description-- + +Create a `.calories-info h2` selector and remove all margins. + +# --hints-- + +Create a `.calories-info h2` selector. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info h2')); +``` + +Your `.calories-info h2` selector should have a `margin` set to `0`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info h2')?.margin === '0px'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  + + +``` + +```css +* { + box-sizing: border-box; +} + +html { + font-size: 16px; +} + +body { + font-family: 'Open Sans', sans-serif; +} + +.label { + border: 2px solid black; + width: 270px; + margin: 20px auto; + padding: 0 7px; +} + +header h1 { + text-align: center; + margin: -4px 0; + letter-spacing: 0.15px +} + +p { + margin: 0; + display: flex; + justify-content: space-between; +} + +.divider { + border-bottom: 1px solid #888989; + margin: 2px 0; +} + +.bold { + font-weight: 800; +} + +.large { + height: 10px; +} + +.large, .medium { + background-color: black; + border: 0; +} + +.small-text { + font-size: 0.85rem; +} + +--fcc-editable-region-- + +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6396e33fe478dd264ebbf278.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6396e33fe478dd264ebbf278.md new file mode 100644 index 00000000000..6a2dbb37aa9 --- /dev/null +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6396e33fe478dd264ebbf278.md @@ -0,0 +1,135 @@ +--- +id: 6396e33fe478dd264ebbf278 +title: Step 34 +challengeType: 0 +dashedName: step-34 +--- + +# --description-- + +Create a new `.calories-info` selector and give it a `display` property set to `flex`. Also give it a `justify-content` property set to `space-between` and `align-items` property set to `flex-end`. + +# --hints-- + +You should create a `.calories-info` selector. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info')); +``` + +Your `.calories-info` selector should have a `display` property set to `flex`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info')?.display === 'flex'); +``` + +Your `.calories-info` selector should have a `justify-content` property set to `space-between`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info')?.justifyContent === 'space-between'); +``` + +Your `.calories-info` selector should have a `align-items` property set to `flex-end`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info')?.alignItems === 'flex-end'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Nutrition Label + + + + + +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  8 servings per container

                                                                                                                                                                  +

                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +
                                                                                                                                                                  +

                                                                                                                                                                  Amount per serving

                                                                                                                                                                  +

                                                                                                                                                                  Calories

                                                                                                                                                                  +
                                                                                                                                                                  + 230 +
                                                                                                                                                                  +
                                                                                                                                                                  + + +``` + +```css +* { + box-sizing: border-box; +} + +html { + font-size: 16px; +} + +body { + font-family: 'Open Sans', sans-serif; +} + +.label { + border: 2px solid black; + width: 270px; + margin: 20px auto; + padding: 0 7px; +} + +header h1 { + text-align: center; + margin: -4px 0; + letter-spacing: 0.15px +} + +p { + margin: 0; + display: flex; + justify-content: space-between; +} + +.divider { + border-bottom: 1px solid #888989; + margin: 2px 0; +} + +.bold { + font-weight: 800; +} + +.large { + height: 10px; +} + +.large, .medium { + background-color: black; + border: 0; +} + +.small-text { + font-size: 0.85rem; +} + +--fcc-editable-region-- + +--fcc-editable-region-- + +.calories-info h2 { + margin: 0; +} +``` diff --git a/curriculum/challenges/espanol/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c8bf3980c14c438d2aed.md b/curriculum/challenges/espanol/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c8bf3980c14c438d2aed.md index 29c48fafd6b..95b1c534590 100644 --- a/curriculum/challenges/espanol/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c8bf3980c14c438d2aed.md +++ b/curriculum/challenges/espanol/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c8bf3980c14c438d2aed.md @@ -7,7 +7,7 @@ dashedName: step-39 # --description-- -For now, make your `goStore` function output the message `Going to store.` to the console. For example, here is a function that outputs the message "Hello World". +For now, make your `goStore` function output the message `Going to store.` to the console. For example, here is a function that outputs the message `Hello World`. ```js function functionName() { diff --git a/curriculum/challenges/espanol/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b0b5053f16111b0b6b5f.md b/curriculum/challenges/espanol/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b0b5053f16111b0b6b5f.md index 13ec3548717..2f4cd196c49 100644 --- a/curriculum/challenges/espanol/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b0b5053f16111b0b6b5f.md +++ b/curriculum/challenges/espanol/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b0b5053f16111b0b6b5f.md @@ -47,7 +47,7 @@ Your `update` function should set `button3.onclick` to `fightDragon`. assert.match(update.toString(), /button3\.onclick\s*=\s*fightDragon/); ``` -Your `update` function should set `text.innerText` to `You are in the town square. You see a sign that says "Store".`. +Your `update` function should set `text.innerText` to `You are in the town square. You see a sign that says \"Store\".`. ```js assert.match(update.toString(), /text\.innerText\s*=\s*"You are in the town square. You see a sign that says \\"Store\\"\."/); diff --git a/curriculum/challenges/espanol/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md b/curriculum/challenges/espanol/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md index 4f3e46c6b3d..798030100c5 100644 --- a/curriculum/challenges/espanol/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md +++ b/curriculum/challenges/espanol/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md @@ -7,7 +7,7 @@ dashedName: step-62 # --description-- -The `locations` array contains two locations: the town square and the store. Currently you are passing that entire array into the update functions. Pass in only the first element of the `locations` array by adding `[0]` at the end of the variable. For example: `myFunction(arg[0]);`. +The `locations` array contains two locations: the `town square` and the `store`. Currently you are passing that entire array into the `update` function. Pass in only the first element of the `locations` array by adding `[0]` at the end of the variable. For example: `myFunction(arg[0]);`. This is called bracket notation. Values in an array are accessed by index. Indices are numerical values and start at 0 - this is called zero-based indexing. `arg[0]` would be the first element in the `arg` array. diff --git a/curriculum/challenges/espanol/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md b/curriculum/challenges/espanol/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md index 005b861e498..9e318ba2811 100644 --- a/curriculum/challenges/espanol/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md +++ b/curriculum/challenges/espanol/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md @@ -7,7 +7,7 @@ dashedName: step-67 # --description-- -Finally, update the `text.innerText` assignment to equal the `text` from the location object. However, instead of using bracket notation, use dot notation. Here is an example of accessing the `name` property of an object called `obj`: `obj.name`. +Finally, update the `text.innerText` assignment to equal the `text` from the `location` object. However, instead of using bracket notation, use dot notation. Here is an example of accessing the `name` property of an object called `obj`: `obj.name`. # --hints-- diff --git a/curriculum/challenges/espanol/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c89e4272512d44fc1c66.md b/curriculum/challenges/espanol/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c89e4272512d44fc1c66.md index 791e3ed9537..171e1353dae 100644 --- a/curriculum/challenges/espanol/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c89e4272512d44fc1c66.md +++ b/curriculum/challenges/espanol/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c89e4272512d44fc1c66.md @@ -7,7 +7,7 @@ dashedName: step-83 # --description-- -Similar to your `buyHealth` function, set `gold` equal to 30 less than its current value. Make sure this is inside your `if` statement. +Similar to your `buyHealth` function, set `gold` equal to `30` less than its current value. Make sure this is inside your `if` statement. # --hints-- diff --git a/curriculum/challenges/german/02-javascript-algorithms-and-data-structures/basic-javascript/subtract-one-number-from-another-with-javascript.md b/curriculum/challenges/german/02-javascript-algorithms-and-data-structures/basic-javascript/subtract-one-number-from-another-with-javascript.md index 263c35d06b5..379d09a7ed9 100644 --- a/curriculum/challenges/german/02-javascript-algorithms-and-data-structures/basic-javascript/subtract-one-number-from-another-with-javascript.md +++ b/curriculum/challenges/german/02-javascript-algorithms-and-data-structures/basic-javascript/subtract-one-number-from-another-with-javascript.md @@ -26,13 +26,13 @@ const myVar = 12 - 6; # --hints-- -Die Variable `difference` sollte den Wert 12 haben. +The variable `difference` should be equal to `12`. ```js assert(difference === 12); ``` -Du solltest nur eine Zahl von 45 abziehen. +You should only subtract one number from `45`. ```js assert(/difference=45-33;?/.test(__helpers.removeWhiteSpace(code))); diff --git a/curriculum/challenges/german/05-back-end-development-and-apis/back-end-development-and-apis-projects/exercise-tracker.md b/curriculum/challenges/german/05-back-end-development-and-apis/back-end-development-and-apis-projects/exercise-tracker.md index 6554c26b0e4..8f8542e5399 100644 --- a/curriculum/challenges/german/05-back-end-development-and-apis/back-end-development-and-apis-projects/exercise-tracker.md +++ b/curriculum/challenges/german/05-back-end-development-and-apis/back-end-development-and-apis-projects/exercise-tracker.md @@ -20,7 +20,7 @@ Wenn du Replit verwendest, dann folge diesen Schritten, um das Projekt einzurich - Daraufhin wird ein `.replit`-Fenster angezeigt. - Wähle `Use run command` aus und klicke die `Done`-Schaltfläche. -Wenn du fertig bist, stelle sicher, dass eine funktionierende Demo deines Projekts irgendwo öffentlich gehostet wird. Gib anschließend die URL in das `Solution Link`-Feld ein. Optional kannst du auch einen Link zum Quellcode deines Projekts in das `GitHub Link`-Feld eingeben. +Wenn du fertig bist, stelle sicher, dass eine funktionierende Demo deines Projekts irgendwo öffentlich gehostet wird. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --instructions-- @@ -411,7 +411,7 @@ Die `description`-Eigenschaft eines beliebigen Objekts im `log` Array, das von ` ```js async(getUserInput) => { const url = getUserInput('url'); - const res = await fetch(url + '/api/users/', { + const res = await fetch(url + '/api/users', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', @@ -458,7 +458,7 @@ Die `duration`-Eigenschaft eines beliebigen Objekts im `log`-Array, das von `GET ```js async(getUserInput) => { const url = getUserInput('url'); - const res = await fetch(url + '/api/users/', { + const res = await fetch(url + '/api/users', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', @@ -505,7 +505,7 @@ Die `date`-Eigenschaft eines beliebigen Objekts im `log`-Array, das von `GET /ap ```js async(getUserInput) => { const url = getUserInput('url'); - const res = await fetch(url + '/api/users/', { + const res = await fetch(url + '/api/users', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', diff --git a/curriculum/challenges/german/05-back-end-development-and-apis/back-end-development-and-apis-projects/file-metadata-microservice.md b/curriculum/challenges/german/05-back-end-development-and-apis/back-end-development-and-apis-projects/file-metadata-microservice.md index 8dd115279da..879d518e43c 100644 --- a/curriculum/challenges/german/05-back-end-development-and-apis/back-end-development-and-apis-projects/file-metadata-microservice.md +++ b/curriculum/challenges/german/05-back-end-development-and-apis/back-end-development-and-apis-projects/file-metadata-microservice.md @@ -20,7 +20,7 @@ Wenn du Replit verwendest, dann folge diesen Schritten, um das Projekt einzurich - Daraufhin wird ein `.replit`-Fenster angezeigt. - Wähle `Use run command` aus und klicke auf die `Done`-Schaltfläche. -Wenn du fertig bist, stelle sicher, dass eine funktionierende Demo deines Projekts irgendwo öffentlich gehostet wird. Gib anschließend die URL dazu in das `Solution Link`-Feld ein. Optional kannst du auch einen Link zum Quellcode deines Projekts in das Feld `GitHub Link` eingeben. +Wenn du fertig bist, stelle sicher, dass eine funktionierende Demo deines Projekts irgendwo öffentlich gehostet wird. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --instructions-- diff --git a/curriculum/challenges/german/05-back-end-development-and-apis/back-end-development-and-apis-projects/request-header-parser-microservice.md b/curriculum/challenges/german/05-back-end-development-and-apis/back-end-development-and-apis-projects/request-header-parser-microservice.md index fe0e0c5feff..89cc03b78be 100644 --- a/curriculum/challenges/german/05-back-end-development-and-apis/back-end-development-and-apis-projects/request-header-parser-microservice.md +++ b/curriculum/challenges/german/05-back-end-development-and-apis/back-end-development-and-apis-projects/request-header-parser-microservice.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --hints-- diff --git a/curriculum/challenges/german/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md b/curriculum/challenges/german/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md index fc265817c5f..df6ef9d0d4b 100644 --- a/curriculum/challenges/german/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md +++ b/curriculum/challenges/german/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. **Note:** Time zones conversion is not a purpose of this project, so assume all sent valid dates will be parsed with `new Date()` as GMT dates. @@ -106,7 +106,7 @@ Your project can handle dates that can be successfully parsed by `new Date(date_ ); ``` -If the input date string is invalid, the api returns an object having the structure `{ error : "Invalid Date" }` +If the input date string is invalid, the API returns an object having the structure `{ error : "Invalid Date" }` ```js (getUserInput) => diff --git a/curriculum/challenges/german/05-back-end-development-and-apis/back-end-development-and-apis-projects/url-shortener-microservice.md b/curriculum/challenges/german/05-back-end-development-and-apis/back-end-development-and-apis-projects/url-shortener-microservice.md index c17668843c9..189902648cb 100644 --- a/curriculum/challenges/german/05-back-end-development-and-apis/back-end-development-and-apis-projects/url-shortener-microservice.md +++ b/curriculum/challenges/german/05-back-end-development-and-apis/back-end-development-and-apis-projects/url-shortener-microservice.md @@ -20,7 +20,7 @@ Wenn du Replit verwendest, folge diesen Schritten, um das Projekt einzurichten: - Daraufhin wird ein `.replit`-Fenster angezeigt. - Wähle `Use run command` aus und klicke auf die `Done`-Schaltfläche. -Wenn du fertig bist, stelle sicher, dass eine funktionierende Demo deines Projekts irgendwo öffentlich gehostet wird. Gib anschließend die URL dazu in das `Solution Link`-Feld ein. Optional kannst du auch einen Link zum Quellcode deines Projekts in das `GitHub Link`-Feld eingeben. +Wenn du fertig bist, stelle sicher, dass eine funktionierende Demo deines Projekts irgendwo öffentlich gehostet wird. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --instructions-- diff --git a/curriculum/challenges/german/05-back-end-development-and-apis/basic-node-and-express/meet-the-node-console.md b/curriculum/challenges/german/05-back-end-development-and-apis/basic-node-and-express/meet-the-node-console.md index 98cee53e8fc..89253110081 100644 --- a/curriculum/challenges/german/05-back-end-development-and-apis/basic-node-and-express/meet-the-node-console.md +++ b/curriculum/challenges/german/05-back-end-development-and-apis/basic-node-and-express/meet-the-node-console.md @@ -20,7 +20,7 @@ Wenn du Replit verwendest, dann folge diesen Schritten, um das Projekt einzurich - Daraufhin wird ein `.replit`-Fenster angezeigt. - Wähle `Use run command` aus und klicke auf die `Done`-Schaltfläche. -Wenn du fertig bist, stelle sicher, dass eine funktionierende Demo deines Projekts an einem öffentlichen Ort gehostet wird. Gib anschließend die URL dazu in das `Solution Link`-Feld ein. +Wenn du fertig bist, stelle sicher, dass eine funktionierende Demo deines Projekts an einem öffentlichen Ort gehostet wird. Then submit the URL to it in the Solution Link field. Während des Entwicklungsprozesses ist es wichtig, überprüfen zu können, was in deinem Code passiert. diff --git a/curriculum/challenges/german/05-back-end-development-and-apis/basic-node-and-express/serve-json-on-a-specific-route.md b/curriculum/challenges/german/05-back-end-development-and-apis/basic-node-and-express/serve-json-on-a-specific-route.md index 59d415ac909..cec91f7f57a 100644 --- a/curriculum/challenges/german/05-back-end-development-and-apis/basic-node-and-express/serve-json-on-a-specific-route.md +++ b/curriculum/challenges/german/05-back-end-development-and-apis/basic-node-and-express/serve-json-on-a-specific-route.md @@ -18,7 +18,7 @@ Liefere das Objekt `{"message": "Hello json"}` im JSON-Format als Antwort, um GE # --hints-- -Der Endpunkt `/json` sollte das JSON-Objekt `{"message": "Hello json"}` liefern +The endpoint `/json` should serve the JSON object `{"message": "Hello json"}` ```js (getUserInput) => diff --git a/curriculum/challenges/german/05-back-end-development-and-apis/managing-packages-with-npm/how-to-use-package.json-the-core-of-any-node.js-project-or-npm-package.md b/curriculum/challenges/german/05-back-end-development-and-apis/managing-packages-with-npm/how-to-use-package.json-the-core-of-any-node.js-project-or-npm-package.md index f1d5ea7a8b4..b2b5293dace 100644 --- a/curriculum/challenges/german/05-back-end-development-and-apis/managing-packages-with-npm/how-to-use-package.json-the-core-of-any-node.js-project-or-npm-package.md +++ b/curriculum/challenges/german/05-back-end-development-and-apis/managing-packages-with-npm/how-to-use-package.json-the-core-of-any-node.js-project-or-npm-package.md @@ -20,7 +20,7 @@ Wenn du Replit verwendest, folge diesen Schritten, um das Projekt einzurichten: - Als nächstes wird ein `.replit`-Fenster angezeigt. - Wähle `Use run command` aus und klicke die `Done`-Schaltfläche. -Wenn du fertig bist, stelle sicher, dass eine funktionierende Demo deines Projekts irgendwo öffentlich gehostet wird. Gib anschließend die URL dazu in das `Solution Link`-Feld ein. +Wenn du fertig bist, stelle sicher, dass eine funktionierende Demo deines Projekts irgendwo öffentlich gehostet wird. Then submit the URL to it in the Solution Link field. Die `package.json`-Datei stellt das Zentrum eines Node.js-Projekts oder npm-Pakets dar. Es speichert Informationen über dein Projekt, ähnlich wie der <head>-Abschnitt eines HTML-Dokuments den Inhalt einer Webseite beschreibt. Es besteht aus einem einzigen JSON-Objekt, in dem Informationen in Schlüssel-Wert-Paaren gespeichert sind. Es gibt dort nur zwei Pflichtfelder: "name" und "version". Es ist jedoch empfehlenswert, zusätzliche Informationen über dein Projekt anzugeben, die für zukünfige Benutzer oder Maintainer nützlich sein könnten. diff --git a/curriculum/challenges/german/05-back-end-development-and-apis/mongodb-and-mongoose/install-and-set-up-mongoose.md b/curriculum/challenges/german/05-back-end-development-and-apis/mongodb-and-mongoose/install-and-set-up-mongoose.md index 054d03ab8a0..f754a13b805 100644 --- a/curriculum/challenges/german/05-back-end-development-and-apis/mongodb-and-mongoose/install-and-set-up-mongoose.md +++ b/curriculum/challenges/german/05-back-end-development-and-apis/mongodb-and-mongoose/install-and-set-up-mongoose.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. In this challenge, you will set up a MongoDB Atlas database and import the required packages to connect to it. diff --git a/curriculum/challenges/german/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md b/curriculum/challenges/german/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md index 21fe152c135..e14beb131fc 100644 --- a/curriculum/challenges/german/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md +++ b/curriculum/challenges/german/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. A template engine enables you to use static template files (such as those written in *Pug*) in your app. At runtime, the template engine replaces variables in a template file with actual values which can be supplied by your server. Then it transforms the template into a static HTML file that is sent to the client. This approach makes it easier to design an HTML page and allows for displaying variables on the page without needing to make an API call from the client. diff --git a/curriculum/challenges/german/06-quality-assurance/quality-assurance-and-testing-with-chai/learn-how-javascript-assertions-work.md b/curriculum/challenges/german/06-quality-assurance/quality-assurance-and-testing-with-chai/learn-how-javascript-assertions-work.md index 8c07ba33cb9..54abf585115 100644 --- a/curriculum/challenges/german/06-quality-assurance/quality-assurance-and-testing-with-chai/learn-how-javascript-assertions-work.md +++ b/curriculum/challenges/german/06-quality-assurance/quality-assurance-and-testing-with-chai/learn-how-javascript-assertions-work.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. # --instructions-- diff --git a/curriculum/challenges/german/06-quality-assurance/quality-assurance-projects/american-british-translator.md b/curriculum/challenges/german/06-quality-assurance/quality-assurance-projects/american-british-translator.md index 7ebf38ca39d..06069d9be10 100644 --- a/curriculum/challenges/german/06-quality-assurance/quality-assurance-projects/american-british-translator.md +++ b/curriculum/challenges/german/06-quality-assurance/quality-assurance-projects/american-british-translator.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --instructions-- diff --git a/curriculum/challenges/german/06-quality-assurance/quality-assurance-projects/issue-tracker.md b/curriculum/challenges/german/06-quality-assurance/quality-assurance-projects/issue-tracker.md index 44101bd2150..37e7218ce1f 100644 --- a/curriculum/challenges/german/06-quality-assurance/quality-assurance-projects/issue-tracker.md +++ b/curriculum/challenges/german/06-quality-assurance/quality-assurance-projects/issue-tracker.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --instructions-- diff --git a/curriculum/challenges/german/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md b/curriculum/challenges/german/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md index f847638bba4..90e2329e195 100644 --- a/curriculum/challenges/german/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md +++ b/curriculum/challenges/german/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --instructions-- diff --git a/curriculum/challenges/german/06-quality-assurance/quality-assurance-projects/personal-library.md b/curriculum/challenges/german/06-quality-assurance/quality-assurance-projects/personal-library.md index 31b48ccb37b..a6abf77e231 100644 --- a/curriculum/challenges/german/06-quality-assurance/quality-assurance-projects/personal-library.md +++ b/curriculum/challenges/german/06-quality-assurance/quality-assurance-projects/personal-library.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --instructions-- diff --git a/curriculum/challenges/german/06-quality-assurance/quality-assurance-projects/sudoku-solver.md b/curriculum/challenges/german/06-quality-assurance/quality-assurance-projects/sudoku-solver.md index 096971fa4d1..ee1c337c9f5 100644 --- a/curriculum/challenges/german/06-quality-assurance/quality-assurance-projects/sudoku-solver.md +++ b/curriculum/challenges/german/06-quality-assurance/quality-assurance-projects/sudoku-solver.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --instructions-- diff --git a/curriculum/challenges/german/08-data-analysis-with-python/data-analysis-with-python-projects/sea-level-predictor.md b/curriculum/challenges/german/08-data-analysis-with-python/data-analysis-with-python-projects/sea-level-predictor.md index 2e13bc36c2f..1b97d1fa053 100644 --- a/curriculum/challenges/german/08-data-analysis-with-python/data-analysis-with-python-projects/sea-level-predictor.md +++ b/curriculum/challenges/german/08-data-analysis-with-python/data-analysis-with-python-projects/sea-level-predictor.md @@ -28,7 +28,7 @@ Du analysierst einen Datensatz über die durchschnittliche Veränderung des glob Benutze die Daten, um folgende Aufgaben abzuschließen: - Verwende Pandas, um die Daten aus `epa-sea-level.csv` zu importieren. -- Verwende matplotlib, um ein Streudiagramm mit der `Year`-Spalte als x-Achse und der `CSIRO Adjusted Sea Level`-Spalte als y-Achse zu erstellen. +- Use matplotlib to create a scatter plot using the `Year` column as the x-axis and the `CSIRO Adjusted Sea Level` column as the y-axis. - Verwende die `linregress` Funktion aus `scipy.stats`, um die Steigerung und den y-Achsenabschnitt der Mittelwertsgerade zu erhalten. Zeichne die Linie der besten Anpassung über das Streudiagramm. Lass die Linie durch das Jahr 2050 verlaufen, um den Meeresspielanstieg im Jahr 2050 vorherzusagen. - Zeichne eine neue Linie der besten Passform nur mit den Daten vom Jahr 2000 bis zum jüngsten Jahr im Datensatz. Lass die Linie auch durch das Jahr 2050 laufen, um den Anstieg des Meeresspiegels im Jahr 2050 vorherzusagen, wenn die Anstiegsrate weiterhin so verläuft wie seit dem Jahr 2000. - Die x-Beschriftung sollte `Year`, die y-Beschriftung sollte `Sea Level (inches)` und der Titel sollte `Rise in Sea Level` lauten. diff --git a/curriculum/challenges/german/09-information-security/information-security-projects/anonymous-message-board.md b/curriculum/challenges/german/09-information-security/information-security-projects/anonymous-message-board.md index 0465bf6a915..15b95c28bb7 100644 --- a/curriculum/challenges/german/09-information-security/information-security-projects/anonymous-message-board.md +++ b/curriculum/challenges/german/09-information-security/information-security-projects/anonymous-message-board.md @@ -22,7 +22,7 @@ Wenn du Replit verwendest, folge diesen Schritten, um das Projekt einzurichten: - Daraufhin wird ein `.replit`-Fenster angezeigt. - Wähle `Use run command` und klicke auf die `Done`-Schaltfläche. -Wenn du fertig bist, stelle sicher, dass eine funktionierende Demo deines Projekts irgendwo öffentlich gehostet wird. Gib dann die URL dazu in das Feld `Solution Link` ein. Optional kannst du auch einen Link zum Quellcode deines Projekts in das Feld `GitHub Link` eingeben. +Wenn du fertig bist, stelle sicher, dass eine funktionierende Demo deines Projekts irgendwo öffentlich gehostet wird. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --instructions-- diff --git a/curriculum/challenges/german/09-information-security/information-security-projects/secure-real-time-multiplayer-game.md b/curriculum/challenges/german/09-information-security/information-security-projects/secure-real-time-multiplayer-game.md index 673ce30a303..c0742c66fe8 100644 --- a/curriculum/challenges/german/09-information-security/information-security-projects/secure-real-time-multiplayer-game.md +++ b/curriculum/challenges/german/09-information-security/information-security-projects/secure-real-time-multiplayer-game.md @@ -20,7 +20,7 @@ Wenn du Replit verwendest, folge diesen Schritten, um das Projekt einzurichten: - Daraufhin wird ein `.replit`-Fenster angezeigt. - Wähle `Use run command` und klicke auf die `Done`-Schaltfläche. -Wenn du fertig bist, stelle sicher, dass eine funktionierende Demo deines Projekts irgendwo öffentlich gehostet wird. Gib dann die URL dazu in das Feld `Solution Link` ein. Optional kannst du auch einen Link zum Quellcode deines Projekts in das Feld `GitHub Link` eingeben. +Wenn du fertig bist, stelle sicher, dass eine funktionierende Demo deines Projekts irgendwo öffentlich gehostet wird. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --instructions-- diff --git a/curriculum/challenges/german/09-information-security/information-security-projects/stock-price-checker.md b/curriculum/challenges/german/09-information-security/information-security-projects/stock-price-checker.md index 3cabb48da17..1444fe128ac 100644 --- a/curriculum/challenges/german/09-information-security/information-security-projects/stock-price-checker.md +++ b/curriculum/challenges/german/09-information-security/information-security-projects/stock-price-checker.md @@ -24,7 +24,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --instructions-- diff --git a/curriculum/challenges/german/09-information-security/information-security-with-helmetjs/install-and-require-helmet.md b/curriculum/challenges/german/09-information-security/information-security-with-helmetjs/install-and-require-helmet.md index 22e8dcc50cd..304a1f2f989 100644 --- a/curriculum/challenges/german/09-information-security/information-security-with-helmetjs/install-and-require-helmet.md +++ b/curriculum/challenges/german/09-information-security/information-security-with-helmetjs/install-and-require-helmet.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Helmet helps you secure your Express apps by setting various HTTP headers. diff --git a/curriculum/challenges/german/10-coding-interview-prep/algorithms/implement-binary-search.md b/curriculum/challenges/german/10-coding-interview-prep/algorithms/implement-binary-search.md index c22b6b8eb0b..3a755f00a83 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/algorithms/implement-binary-search.md +++ b/curriculum/challenges/german/10-coding-interview-prep/algorithms/implement-binary-search.md @@ -10,9 +10,10 @@ dashedName: implement-binary-search Die binäre Suche ist ein **O(log(n))** Effizienz-Algorithmus zum Finden eines Elements innerhalb eines sortierten Arrays. Dieser funktioniert auf folgende Weise: -1. Finde die mittlere `value` des sortierten Arrays. Falls `value == target`, gebe den Wert zurück (gefunden!). +1. Finde die mittlere `value` des sortierten Arrays. If `value == target` return `true` (The value has been found and the search is complete). 1. Falls die mittlere `value < target`, durchsuche im nächsten Schritt nur die rechte Hälfte des Arrays. 1. Falls die mittlere `value > target`, durchsuche im nächsten Schritt nur die linke Hälfte des Arrays. +1. If after searching the whole array the value is not present, return `false` (The array has been searched and the value is not in the array). Wie du siehst, halbierst du so erfolgreich einen Array mit einer Effizienz von log(n). Für diese Herausforderung wollen wir, dass du zeigst, wie du arbeitest – wie du zum Zielwert gelangt bist... welchen Weg du eingeschlagen hast! @@ -20,7 +21,7 @@ Wie du siehst, halbierst du so erfolgreich einen Array mit einer Effizienz von l Schreibe die Funktion `binarySearch`, welche einen binären Suchalgorithmus für einen Array implementiert – dieser soll dann einen Array mit dem von dir verwendeten Weg (jeder Mittelwertvergleich), um den Zielwert im Array zu finden, zurückgeben. -Der Funktion wird ein sortierter Array mit Integern sowie ein Zielwert übergeben. Es wird ein Array zurückgegeben, das (in Reihenfolge) den mittleren Wert enthält, den du bei jeder Halbierung des ursprünglichen Arrays gefunden hast, bis du den Zielwert gefunden hast. Der Zielwert sollte das letzte Element des zurückgegebenen Arrays sein. Falls der Zielwert nicht gefunden wurde, gib den String `Value Not Found` zurück. +Der Funktion wird ein sortierter Array mit Integern sowie ein Zielwert übergeben. Es wird ein Array zurückgegeben, das (in Reihenfolge) den mittleren Wert enthält, den du bei jeder Halbierung des ursprünglichen Arrays gefunden hast, bis du den Zielwert gefunden hast. Der Zielwert sollte das letzte Element des zurückgegebenen Arrays sein. If the value is not found, return the string `Value Not Found`. Beispielsweise sollte `binarySearch([1,2,3,4,5,6,7], 5)` den Array `[4,6,5]` zurückgeben. diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-1-multiples-of-3-and-5.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-1-multiples-of-3-and-5.md index 79ffc31e0c1..4ef4841de24 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-1-multiples-of-3-and-5.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-1-multiples-of-3-and-5.md @@ -1,6 +1,6 @@ --- id: 5900f36e1000cf542c50fe80 -title: 'Aufgabe 1: Vielfaches von 3 und 5' +title: 'Problem 1: Vielfaches von 3 und 5' challengeType: 1 forumTopicId: 301722 dashedName: problem-1-multiples-of-3-and-5 diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-103-special-subset-sums-optimum.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-103-special-subset-sums-optimum.md index bf85eef1f76..c22d35ca01e 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-103-special-subset-sums-optimum.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-103-special-subset-sums-optimum.md @@ -26,7 +26,7 @@ By applying this "rule" we would expect the optimum set for $n = 6$ to be $A = \ Given that A is an optimum special sum set for $n = 7$, find its set string. -**Note:** This problem is related to Problem 105 and Problem 106. +**Hinweis:** Dieses Problem steht im Zusammenhang mit Problem 105 und 106. # --hints-- diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-110-diophantine-reciprocals-ii.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-110-diophantine-reciprocals-ii.md index 9bbeb3dd075..f89b5f65ee0 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-110-diophantine-reciprocals-ii.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-110-diophantine-reciprocals-ii.md @@ -1,6 +1,6 @@ --- id: 5900f3db1000cf542c50feed -title: 'Problem 110: Diophantine Reciprocals II' +title: 'Problem 110: Diophantische Umkehrfunktionen II' challengeType: 1 forumTopicId: 301735 dashedName: problem-110-diophantine-reciprocals-ii @@ -8,19 +8,19 @@ dashedName: problem-110-diophantine-reciprocals-ii # --description-- -In the following equation x, y, and n are positive integers. +In der folgenden Gleichung sind x, y und n positive ganze Zahlen. $$\frac{1}{x} + \frac{1}{y} = \frac{1}{n}$$ It can be verified that when `n` = 1260 there are 113 distinct solutions and this is the least value of `n` for which the total number of distinct solutions exceeds one hundred. -What is the least value of `n` for which the number of distinct solutions exceeds four million? +Was ist der geringste Wert von `n`, für den die Anzahl an unterschiedlichen Lösungen mehr als vier Millionen beträgt? -**Note:** This problem is a much more difficult version of Problem 108 and as it is well beyond the limitations of a brute force approach it requires a clever implementation. +**Hinweis:** Dieses Problem ist eine viel schwierigere Version des Problems 108 und, da es weit über die Grenzen der Brute-Force-Methode hinausgeht, benötigt es eine geschickte Umsetzung. # --hints-- -`diophantineTwo()` should return `9350130049860600`. +`diophantineTwo()` sollte `9350130049860600` zurückgeben. ```js assert.strictEqual(diophantineTwo(), 9350130049860600); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-111-primes-with-runs.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-111-primes-with-runs.md index 7f22fbffb6c..ac40e33815f 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-111-primes-with-runs.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-111-primes-with-runs.md @@ -8,34 +8,34 @@ dashedName: problem-111-primes-with-runs # --description-- -Considering 4-digit primes containing repeated digits it is clear that they cannot all be the same: 1111 is divisible by 11, 2222 is divisible by 22, and so on. But there are nine 4-digit primes containing three ones: +Bei 4-stelligen Primzahlen mit wiederholten Ziffern ist klar, dass sie nicht alle gleich sein können: 1111 ist durch 11 teilbar, 2222 ist durch 22 teilbar, usw. Aber es gibt neun 4-stellige Primzahlen, die drei Einsen enthalten: $$1117, 1151, 1171, 1181, 1511, 1811, 2111, 4111, 8111$$ -We shall say that $M(n, d)$ represents the maximum number of repeated digits for an n-digit prime where d is the repeated digit, $N(n, d)$ represents the number of such primes, and $S(n, d)$ represents the sum of these primes. +Wir sagen, dass $M(n, d)$ die maximale Anzahl wiederholter Ziffern für eine n-stellige Primzahl darstellt, wobei d die wiederholte Ziffer ist, $N(n, d)$ die Anzahl solcher Primzahlen, und $S(n, d)$ die Summe dieser Primzahlen. -So $M(4, 1) = 3$ is the maximum number of repeated digits for a 4-digit prime where one is the repeated digit, there are $N(4, 1) = 9$ such primes, and the sum of these primes is $S(4, 1) = 22275$. It turns out that for d = 0, it is only possible to have $M(4, 0) = 2$ repeated digits, but there are $N(4, 0) = 13$ such cases. +Also ist $M(4, 1) = 3$ die maximale Anzahl der wiederholten Ziffern für eine vierstellige Primzahl, wobei eine die wiederholte Ziffer ist, es gibt $N(4, 1) = 9$ solcher Primzahlen, und die Summe dieser Primzahlen ist $S(4, 1) = 22275$. Es stellt sich heraus, dass es für d = 0 nur $M(4, 0) = 2$ wiederholte Ziffern geben kann, aber es gibt $N(4, 0) = 13$ solcher Fälle. -In the same way we obtain the following results for 4-digit primes. +Auf die gleiche Weise erhalten wir die folgenden Ergebnisse für 4-stellige Primzahlen. -| Digit, d | $M(4, d)$ | $N(4, d)$ | $S(4, d)$ | -| -------- | --------- | --------- | --------- | -| 0 | 2 | 13 | 67061 | -| 1 | 3 | 9 | 22275 | -| 2 | 3 | 1 | 2221 | -| 3 | 3 | 12 | 46214 | -| 4 | 3 | 2 | 8888 | -| 5 | 3 | 1 | 5557 | -| 6 | 3 | 1 | 6661 | -| 7 | 3 | 9 | 57863 | -| 8 | 3 | 1 | 8887 | -| 9 | 3 | 7 | 48073 | +| Ziffer, d | $M(4, d)$ | $N(4, d)$ | $S(4, d)$ | +| --------- | --------- | --------- | --------- | +| 0 | 2 | 13 | 67061 | +| 1 | 3 | 9 | 22275 | +| 2 | 3 | 1 | 2221 | +| 3 | 3 | 12 | 46214 | +| 4 | 3 | 2 | 8888 | +| 5 | 3 | 1 | 5557 | +| 6 | 3 | 1 | 6661 | +| 7 | 3 | 9 | 57863 | +| 8 | 3 | 1 | 8887 | +| 9 | 3 | 7 | 48073 | -For d = 0 to 9, the sum of all $S(4, d)$ is 273700. Find the sum of all $S(10, d)$. +Für d = 0 bis 9 ist die Summe aller $S(4, d)$ 273700. Finde die Summe aller $S(10, d)$. # --hints-- -`primesWithRuns()` should return `612407567715`. +`primesWithRuns()` sollte `612407567715` zurückgeben. ```js assert.strictEqual(primesWithRuns(), 612407567715); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-112-bouncy-numbers.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-112-bouncy-numbers.md index 7599de29978..cc88391f535 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-112-bouncy-numbers.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-112-bouncy-numbers.md @@ -8,9 +8,9 @@ dashedName: problem-112-bouncy-numbers # --description-- -Working from left-to-right if no digit is exceeded by the digit to its left it is called an increasing number; for example, 134468. +Wenn man von links nach rechts arbeitet und keine Ziffer durch die Ziffer links davon übertroffen wird, spricht man von einer aufsteigenden Zahl, zum Beispiel 134468. -Similarly if no digit is exceeded by the digit to its right it is called a decreasing number; for example, 66420. +Ähnlich verhält es sich, wenn keine Ziffer von der Ziffer rechts überschritten wird, wird es eine abnehmende Zahl genannt; zum Beispiel, 66420. We shall call a positive integer that is neither increasing nor decreasing a "bouncy" number; for example, 155349. diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-113-non-bouncy-numbers.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-113-non-bouncy-numbers.md index 868909ef6b2..e05e272a51e 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-113-non-bouncy-numbers.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-113-non-bouncy-numbers.md @@ -1,6 +1,6 @@ --- id: 5900f3dd1000cf542c50fef0 -title: 'Problem 113: Non-bouncy numbers' +title: 'Problem 113: Nicht sprunghafte Zahlen' challengeType: 1 forumTopicId: 301739 dashedName: problem-113-non-bouncy-numbers @@ -8,19 +8,19 @@ dashedName: problem-113-non-bouncy-numbers # --description-- -Working from left-to-right if no digit is exceeded by the digit to its left it is called an increasing number; for example, 134468. +Wenn man von links nach rechts arbeitet und keine Ziffer durch die Ziffer links davon übertroffen wird, spricht man von einer aufsteigenden Zahl, zum Beispiel 134468. -Similarly if no digit is exceeded by the digit to its right it is called a decreasing number; for example, 66420. +Ähnlich verhält es sich, wenn keine Ziffer von der Ziffer rechts daneben übertroffen wird. Man spricht dann von einer absteigenden Zahl, zum Beispiel 66420. We shall call a positive integer that is neither increasing nor decreasing a "bouncy" number; for example, 155349. As n increases, the proportion of bouncy numbers below n increases such that there are only 12951 numbers below one-million that are not bouncy and only 277032 non-bouncy numbers below ${10}^{10}$. -How many numbers below a googol (${10}^{100}$) are not bouncy? +Wie viele Zahlen unterhalb eines Googols (${10}^{100}$) sind nicht sprunghaft? # --hints-- -`nonBouncyNumbers()` should return `51161058134250`. +`nonBouncyNumbers()` sollte `51161058134250` zurückgeben. ```js assert.strictEqual(nonBouncyNumbers(), 51161058134250); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-114-counting-block-combinations-i.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-114-counting-block-combinations-i.md index 3e1b2f85927..51df6281e96 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-114-counting-block-combinations-i.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-114-counting-block-combinations-i.md @@ -1,6 +1,6 @@ --- id: 5900f3e01000cf542c50fef2 -title: 'Problem 114: Counting block combinations I' +title: 'Problem 114: Zählen von Blockkombinationen I' challengeType: 1 forumTopicId: 301740 dashedName: problem-114-counting-block-combinations-i @@ -8,17 +8,17 @@ dashedName: problem-114-counting-block-combinations-i # --description-- -A row measuring seven units in length has red blocks with a minimum length of three units placed on it, such that any two red blocks (which are allowed to be different lengths) are separated by at least one black square. There are exactly seventeen ways of doing this. +Auf einer sieben Einheiten langen Reihe werden rote Blöcke mit einer Mindestlänge von drei Einheiten so platziert, dass zwei beliebige rote Blöcke (die unterschiedlich lang sein dürfen) durch mindestens ein schwarzes Quadrat getrennt sind. Es gibt genau siebzehn Möglichkeiten, dies zu tun. -Possible ways of placing block with a minimum length of three units, on a row with length of seven units +Möglichkeiten der Platzierung von Blöcken mit einer Mindestlänge von drei Einheiten in einer Reihe mit einer Länge von sieben Einheiten -How many ways can a row measuring fifty units in length be filled? +Auf wie viele Arten kann eine Reihe mit einer Länge von fünfzig Einheiten gefüllt werden? -**Note:** Although the example above does not lend itself to the possibility, in general it is permitted to mix block sizes. For example, on a row measuring eight units in length you could use red (3), black (1), and red (4). +**Hinweis:** Obwohl das obige Beispiel keine Möglichkeit bietet, ist es im Allgemeinen erlaubt, Blockgrößen zu mischen. Bei einer Reihe mit einer Länge von acht Einheiten kannst du zum Beispiel rot (3), schwarz (1) und rot (4) verwenden. # --hints-- -`countingBlockOne()` should return `16475640049`. +`countingBlockOne()` sollte `16475640049` zurückgeben. ```js assert.strictEqual(countingBlockOne(), 16475640049); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-115-counting-block-combinations-ii.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-115-counting-block-combinations-ii.md index a659ea34ad1..1419376cee8 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-115-counting-block-combinations-ii.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-115-counting-block-combinations-ii.md @@ -1,6 +1,6 @@ --- id: 5900f3df1000cf542c50fef1 -title: 'Problem 115: Counting block combinations II' +title: 'Problem 115: Zählen von Blockkombinationen II' challengeType: 1 forumTopicId: 301741 dashedName: problem-115-counting-block-combinations-ii @@ -8,23 +8,23 @@ dashedName: problem-115-counting-block-combinations-ii # --description-- -A row measuring `n` units in length has red blocks with a minimum length of `m` units placed on it, such that any two red blocks (which are allowed to be different lengths) are separated by at least one black square. +Auf eine Reihe mit einer Länge von `n` Einheiten werden rote Blöcke mit einer Mindestlänge von `m` Einheiten gelegt, so dass zwei rote Blöcke (die unterschiedlich lang sein dürfen) durch mindestens ein schwarzes Quadrat getrennt sind. -Let the fill-count function, $F(m, n)$, represent the number of ways that a row can be filled. +Die Füllfunktion $F(m, n)$ soll die Anzahl der Möglichkeiten darstellen, wie eine Zeile gefüllt werden kann. -For example, $F(3, 29) = 673135$ and $F(3, 30) = 1089155$. +Zum Beispiel $F(3, 29) = 673135$ und $F(3, 30) = 1089155$. -That is, for m = 3, it can be seen that n = 30 is the smallest value for which the fill-count function first exceeds one million. +Das heißt, für m = 3 ist n = 30 der kleinste Wert, für den die Fill-Count-Funktion erstmals eine Million überschreitet. -In the same way, for m = 10, it can be verified that $F(10, 56) = 880711$ and $F(10, 57) = 1148904$, so n = 57 is the least value for which the fill-count function first exceeds one million. +Auf die gleiche Weise kann für m = 10 nachgewiesen werden, dass $F(10, 56) = 880711$ und $F(10, 57) = 1148904$, also n = 57 der kleinste Wert ist, für den die Fill-Count-Funktion erstmals eine Million überschreitet. -For m = 50, find the least value of `n` for which the fill-count function first exceeds one million. +Finde für m = 50 den kleinsten Wert von `n`, für den die Funktion fill-count zuerst eine Million überschreitet. -**Note:** This is a more difficult version of Problem 114. +**Hinweis:** Dies ist eine schwierigere Version von Problem 114. # --hints-- -`countingBlockTwo()` should return `168`. +`countingBlockTwo()` sollte `168` zurückgeben. ```js assert.strictEqual(countingBlockTwo(), 168); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-116-red-green-or-blue-tiles.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-116-red-green-or-blue-tiles.md index b0b1969a3df..0893b760448 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-116-red-green-or-blue-tiles.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-116-red-green-or-blue-tiles.md @@ -1,6 +1,6 @@ --- id: 5900f3e01000cf542c50fef3 -title: 'Problem 116: Red, green or blue tiles' +title: 'Problem 116: Rote, grüne oder blaue Fliesen' challengeType: 1 forumTopicId: 301742 dashedName: problem-116-red-green-or-blue-tiles @@ -8,7 +8,7 @@ dashedName: problem-116-red-green-or-blue-tiles # --description-- -A row of five black square tiles is to have a number of its tiles replaced with coloured oblong tiles chosen from red (length two), green (length three), or blue (length four). +Bei einer Reihe von fünf schwarzen quadratischen Steinen wird eine bestimmte Anzahl von Spielsteinen durch farbige längliche Spielsteine ersetzt, die entweder rot (Länge zwei), grün (Länge drei) oder blau (Länge vier) sind. If red tiles are chosen there are exactly seven ways this can be done. @@ -16,19 +16,19 @@ If red tiles are chosen there are exactly seven ways this can be done. If green tiles are chosen there are three ways. -Possible ways of placing green oblong on a row with length of five units +Möglichkeiten, das grüne Rechteck in einer Reihe mit einer Länge von fünf Einheiten zu platzieren -And if blue tiles are chosen there are two ways. +Und wenn blaue Steine gewählt werden, gibt es zwei Möglichkeiten. -Possible ways of placing blue oblong on a row with length of five units +Möglichkeiten, das blaue Rechteck in einer Reihe mit einer Länge von fünf Einheiten zu platzieren -Assuming that colors cannot be mixed there are 7 + 3 + 2 = 12 ways of replacing the black tiles in a row measuring five units in length. How many different ways can the black tiles in a row measuring fifty units in length be replaced if colors cannot be mixed and at least one colored tile must be used? +Unter der Annahme, dass Farben nicht gemischt werden können, gibt es 7 + 3 + 2 = 12 Möglichkeiten, die schwarzen Steine in einer Reihe von fünf Einheiten Länge zu ersetzen. Auf wie viele verschiedene Arten können die schwarzen Steine in einer Reihe von fünfzig Einheiten Länge ersetzt werden, wenn die Farben nicht gemischt werden können und mindestens ein farbiger Stein verwendet werden muss? -**Note:** This is related to Problem 117. +**Hinweis:** Dies bezieht sich auf Problem 117. # --hints-- -`redGreenBlueOne()` should return `20492570929`. +`redGreenBlueOne()` sollte `20492570929` zurückgeben. ```js assert.strictEqual(redGreenBlueOne(), 20492570929); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-117-red-green-and-blue-tiles.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-117-red-green-and-blue-tiles.md index 4a4873aac95..7c4a14b26f0 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-117-red-green-and-blue-tiles.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-117-red-green-and-blue-tiles.md @@ -8,17 +8,17 @@ dashedName: problem-117-red-green-and-blue-tiles # --description-- -Using a combination of black square tiles and oblong tiles chosen from: red tiles measuring two units, green tiles measuring three units, and blue tiles measuring four units, it is possible to tile a row measuring five units in length in exactly fifteen different ways. +Mit einer Kombination aus schwarzen quadratischen Steinen und länglichen Steinen, ausgewählt aus roten Steinen mit einer Größe von zwei Einheiten, grünen Steinen mit einer Größe von drei Einheiten und blauen Steinen mit einer Größe von vier Einheiten, ist es möglich, eine Reihe mit einer Länge von fünf Einheiten auf genau fünfzehn verschiedene Arten zu verlegen. -Possible ways of placing red, green and blue oblongs on a row with length of five units +Möglichkeiten, rote, grüne und blaue Rechtecke in einer Reihe mit einer Länge von fünf Einheiten zu platzieren -How many ways can a row measuring fifty units in length be tiled? +Auf wie viele Arten kann eine Reihe mit einer Länge von fünfzig Einheiten übereinander gelegt werden? -**Note**: This is related to Problem 116. +**Hinweis**: Dies hängt mit Problem 116 zusammen. # --hints-- -`redGreenBlueTilesTwo()` should return `100808458960497`. +`redGreenBlueTilesTwo()` sollte `100808458960497` zurückgeben. ```js assert.strictEqual(redGreenBlueTilesTwo(), 100808458960497); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-118-pandigital-prime-sets.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-118-pandigital-prime-sets.md index 195d39136ed..b7eb2495bd1 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-118-pandigital-prime-sets.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-118-pandigital-prime-sets.md @@ -8,13 +8,13 @@ dashedName: problem-118-pandigital-prime-sets # --description-- -Using all of the digits 1 through 9 and concatenating them freely to form decimal integers, different sets can be formed. Interestingly with the set $\\{2, 5, 47, 89, 631\\}$, all of the elements belonging to it are prime. +Wenn man alle Ziffern von 1 bis 9 verwendet und sie frei zu Dezimalzahlen verkettet, können verschiedene Mengen gebildet werden. Interessanterweise sind alle Elemente, die zur Menge $\\{2, 5, 47, 89, 631\\}$ gehören, Primzahlen. -How many distinct sets containing each of the digits one through nine exactly once contain only prime elements? +Wie viele unterschiedliche Mengen, die jede der Ziffern eins bis neun genau einmal enthalten, enthalten nur Primzahlen? # --hints-- -`pandigitalPrimeSets()` should return `44680`. +`pandigitalPrimeSets()` sollte `44680` zurückgeben. ```js assert.strictEqual(pandigitalPrimeSets(), 44680); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-119-digit-power-sum.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-119-digit-power-sum.md index 87bf836b33a..b3e7219da69 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-119-digit-power-sum.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-119-digit-power-sum.md @@ -8,17 +8,17 @@ dashedName: problem-119-digit-power-sum # --description-- -The number 512 is interesting because it is equal to the sum of its digits raised to some power: $5 + 1 + 2 = 8$, and $8^3 = 512$. Another example of a number with this property is $614656 = 28^4$. +Die Zahl 512 ist interessant, weil sie gleich der Summe ihrer Ziffern in einer Potenz ist: $5 + 1 + 2 = 8$, und $8^3 = 512$. Ein weiteres Beispiel für eine Zahl mit dieser Eigenschaft ist $614656 = 28^4$. -We shall define $a_n$ to be the $n-th$ term of this sequence and insist that a number must contain at least two digits to have a sum. +Wir definieren $a_n$ als den $n-th$ Term dieser Folge und bestehen darauf, dass eine Zahl mindestens zwei Ziffern enthalten muss, um eine Summe zu haben. -You are given that $a_2 = 512$ and $a_{10} = 614656$. +Es ist gegeben, dass $a_2 = 512$ und $a_{10} = 614656$. -Find $a_{30}$. +Finde $a_{30}$. # --hints-- -`digitPowerSum()` should return `248155780267521`. +`digitPowerSum()` sollte `248155780267521` zurückgeben. ```js assert.strictEqual(digitPowerSum(), 248155780267521); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-120-square-remainders.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-120-square-remainders.md index d42c224e3db..8142f429a54 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-120-square-remainders.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-120-square-remainders.md @@ -10,13 +10,13 @@ dashedName: problem-120-square-remainders Let `r` be the remainder when ${(a − 1)}^n + {(a + 1)}^n$ is divided by $a^2$. -For example, if $a = 7$ and $n = 3$, then $r = 42: 6^3 + 8^3 = 728 ≡ 42 \\ \text{mod}\\ 49$. And as `n` varies, so too will `r`, but for $a = 7$ it turns out that $r_{max} = 42$. +Wenn zum Beispiel $a = 7$ und $n = 3$, dann ist $r = 42: 6^3 + 8^3 = 728 ≡ 42 \\ \text{mod}\ 49$. Und so wie `n` variiert, so wird auch `r` variieren, aber für $a = 7$ stellt sich heraus, dass $r_{max} = 42$ ist. -For $3 ≤ a ≤ 1000$, find $\sum{r}_{max}$. +Für $3 ≤ a ≤ 1000$, finde $\sum{r}_{max}$. # --hints-- -`squareRemainders()` should return `333082500`. +`squareRemainders()` sollte `333082500` zurückgeben. ```js assert.strictEqual(squareRemainders(), 333082500); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-121-disc-game-prize-fund.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-121-disc-game-prize-fund.md index 0f23b7fdd50..7f208dfd73e 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-121-disc-game-prize-fund.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-121-disc-game-prize-fund.md @@ -8,17 +8,17 @@ dashedName: problem-121-disc-game-prize-fund # --description-- -A bag contains one red disc and one blue disc. In a game of chance a player takes a disc at random and its colour is noted. After each turn the disc is returned to the bag, an extra red disc is added, and another disc is taken at random. +Ein Beutel enthält eine rote Scheibe und eine blaue Scheibe. In einem Glücksspiel zieht ein Spieler eine zufällige Scheibe und deren Farbe wird notiert. Nach jeder Runde wird die Scheibe zurück in den Beutel gelegt, eine zusätzliche rote Scheibe wird hinzugefügt, und eine andere Scheibe wird zufällig entnommen. -The player pays £1 to play and wins if they have taken more blue discs than red discs at the end of the game. +Der Spieler zahlt £1, um zu spielen und gewinnt, wenn am Ende des Spiels mehr blaue als rote Scheiben entnommen wurden. -If the game is played for four turns, the probability of a player winning is exactly 11/120, and so the maximum prize fund the banker should allocate for winning in this game would be £10 before they would expect to incur a loss. Note that any payout will be a whole number of pounds and also includes the original £1 paid to play the game, so in the example given the player actually wins £9. +Wenn das Spiel in vier Runden gespielt wird, liegt die Wahrscheinlichkeit, dass ein Spieler gewinnt, bei genau 11/120, und der maximale Preisfonds, den der Bankier für einen Gewinn in diesem Spiel bereitstellen sollte, würde so 10 £ betragen, bevor ein Verlust erwartet werden würde. Zu beachten ist, dass jede Auszahlung eine ganze Zahl von Pfund ist und auch die ursprünglich für das Spiel gezahlten 1 Pfund einschließt, so dass der Spieler in dem angegebenen Beispiel tatsächlich 9 Pfund gewinnt. -Find the maximum prize fund that should be allocated to a single game in which fifteen turns are played. +Finde die maximale Prämie, die in einem einzigen Spiel zugewiesen werden sollte, in dem 15 Runden gespielt werden. # --hints-- -`discGamePrize()` should return `2269`. +`discGamePrize()` sollte `2269` zurückgeben. ```js assert.strictEqual(discGamePrize(), 2269); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-122-efficient-exponentiation.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-122-efficient-exponentiation.md index 78c29aa7952..bf2a3dde829 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-122-efficient-exponentiation.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-122-efficient-exponentiation.md @@ -12,26 +12,26 @@ The most naive way of computing $n^{15}$ requires fourteen multiplications: $$n × n × \ldots × n = n^{15}$$ -But using a "binary" method you can compute it in six multiplications: +Mit einer "binären" Methode kann man sie jedoch in sechs Multiplikationen berechnen: $$\begin{align} & n × n = n^2\\\\ & n^2 × n^2 = n^4\\\\ & n^4 × n^4 = n^8\\\\ & n^8 × n^4 = n^{12}\\\\ & n^{12} × n^2 = n^{14}\\\\ & n^{14} × n = n^{15} \end{align}$$ -However it is yet possible to compute it in only five multiplications: +Es ist jedoch möglich, ihn in nur fünf Multiplikationen zu berechnen: $$\begin{align} & n × n = n^2\\\\ & n^2 × n = n^3\\\\ & n^3 × n^3 = n^6\\\\ & n^6 × n^6 = n^{12}\\\\ & n^{12} × n^3 = n^{15} \end{align}$$ -We shall define $m(k)$ to be the minimum number of multiplications to compute $n^k$; for example $m(15) = 5$. +Wir definieren $m(k)$ als die minimale Anzahl von Multiplikationen zur Berechnung von $n^k$; zum Beispiel $m(15) = 5$. -For $1 ≤ k ≤ 200$, find $\sum{m(k)}$. +Für $1 ≤ k ≤ 200$, finde $\sum{m(k)}$. # --hints-- -`efficientExponentation()` should return `1582`. +`efficientExponentation()` sollte `1582` zurückgeben. ```js assert.strictEqual(efficientExponentation(), 1582); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-123-prime-square-remainders.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-123-prime-square-remainders.md index 743089b64e3..d9367187ae9 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-123-prime-square-remainders.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-123-prime-square-remainders.md @@ -10,15 +10,15 @@ dashedName: problem-123-prime-square-remainders Let $p_n$ be the $n$th prime: 2, 3, 5, 7, 11, ..., and let $r$ be the remainder when ${(p_n−1)}^n + {(p_n+1)}^n$ is divided by ${p_n}^2$. -For example, when $n = 3, p_3 = 5$, and $4^3 + 6^3 = 280 ≡ 5\\ mod\\ 25$. +Zum Beispiel, wenn $n = 3, p_3 = 5$, und $4^3 + 6^3 = 280 ≡ 5\\ mod\ 25$. -The least value of $n$ for which the remainder first exceeds $10^9$ is 7037. +Der kleinste Wert von $n$, für den der Rest zuerst $10^9$ überschreitet, ist 7037. -Find the least value of $n$ for which the remainder first exceeds $10^{10}$. +Finde den kleinsten Wert von $n$, für den der Rest zuerst $10^{10}$ überschreitet. # --hints-- -`primeSquareRemainders()` should return `21035`. +`primeSquareRemainders()` sollte `21035` zurückgeben. ```js assert.strictEqual(primeSquareRemainders(), 21035); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-124-ordered-radicals.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-124-ordered-radicals.md index 899171a9731..8cfb41d3abe 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-124-ordered-radicals.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-124-ordered-radicals.md @@ -112,11 +112,11 @@ If we calculate $rad(n)$ for $1 ≤ n ≤ 10$, then sort them on $rad(n)$, and s

                                                                                                                                                                  -Let $E(k)$ be the $k$th element in the sorted $n$ column; for example, $E(4) = 8$ and $E(6) = 9$. If $rad(n)$ is sorted for $1 ≤ n ≤ 100000$, find $E(10000)$. +Lasse $E(k)$ das $k$th Element in der geordneten $n$ Spalte sein; zum Beispiel, $E(4) = 8$ und $E(6) = 9$. Wenn $rad(n)$ für $1 ≤ n ≤ 100000$ geordnet ist, findest du $E(10000)$. # --hints-- -`orderedRadicals()` should return `21417`. +`orderedRadicals()` sollte `21417` zurückgeben. ```js assert.strictEqual(orderedRadicals(), 21417); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-125-palindromic-sums.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-125-palindromic-sums.md index eb499c13931..ab191571cf2 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-125-palindromic-sums.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-125-palindromic-sums.md @@ -1,6 +1,6 @@ --- id: 5900f3e91000cf542c50fefc -title: 'Problem 125: Palindromic sums' +title: 'Problem 125: Palindromische Summen' challengeType: 1 forumTopicId: 301752 dashedName: problem-125-palindromic-sums @@ -8,14 +8,14 @@ dashedName: problem-125-palindromic-sums # --description-- -The palindromic number 595 is interesting because it can be written as the sum of consecutive squares: $6^2 + 7^2 + 8^2 + 9^2 + 10^2 + 11^2 + 12^2$. +Die palindromische Zahl 595 ist interessant, weil sie als Summe aufeinander folgender Quadrate geschrieben werden kann: $6^2 + 7^2 + 8^2 + 9^2 + 10^2 + 11^2 + 11^2 + 12^2$. -There are exactly eleven palindromes below one-thousand that can be written as consecutive square sums, and the sum of these palindromes is 4164. Note that $1 = 0^2 + 1^2$ has not been included as this problem is concerned with the squares of positive integers. +Es gibt genau elf Palindrome unter eintausend, die als aufeinanderfolgende Quadratsummen geschrieben werden können, und die Summe dieser Palindrome ist 4164. Man beachte, dass $1 = 0^2 + 1^2$ nicht berücksichtigt wurde, da es sich bei diesem Problem um die Quadrate positiver ganzer Zahlen handelt. -Find the sum of all the numbers less than the `limit` that are both palindromic and can be written as the sum of consecutive squares. +Finde die Summe aller Zahlen, die kleiner als `limit` sind, die beide palindromisch sind und als Summe aufeinanderfolgender Quadrate geschrieben werden können. # --hints-- -`palindromicSums(100000000)` should return `2906969179`. +`palindromicSums(100000000)` sollte `2906969179` zurückgeben. ```js @@ -23,13 +23,13 @@ assert.strictEqual(palindromicSums(100000000), 2906969179); ``` -`palindromicSums(100)` should return `137`. +`palindromicSums(100)` sollte `137` zurückgeben. ```js assert.strictEqual(palindromicSums(100), 137); ``` -`palindromicSums(1000)` should return `4164`. +`palindromicSums(1000)` sollte `4164` zurückgeben. ```js assert.strictEqual(palindromicSums(1000),4164); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-126-cuboid-layers.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-126-cuboid-layers.md index d089c18aff0..cc7eb63f572 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-126-cuboid-layers.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-126-cuboid-layers.md @@ -1,6 +1,6 @@ --- id: 5900f3ea1000cf542c50fefd -title: 'Problem 126: Cuboid layers' +title: 'Problem 126: Quaderförmige Ebenen' challengeType: 1 forumTopicId: 301753 dashedName: problem-126-cuboid-layers @@ -12,19 +12,19 @@ The minimum number of cubes to cover every visible face on a cuboid measuring 3 3x2x1 cuboid covered by twenty-two 1x1x1 cubes -If we add a second layer to this solid it would require forty-six cubes to cover every visible face, the third layer would require seventy-eight cubes, and the fourth layer would require one-hundred and eighteen cubes to cover every visible face. +Fügen wir diesem Körper eine zweite Schicht hinzu, wären sechsundvierzig Würfel erforderlich, um jede sichtbare Fläche zu bedecken, für die dritte Schicht wären achtundsiebzig Würfel erforderlich, und für die vierte Schicht wären einhundertachtzehn Würfel erforderlich, um jede sichtbare Fläche zu bedecken. -However, the first layer on a cuboid measuring 5 x 1 x 1 also requires twenty-two cubes; similarly, the first layer on cuboids measuring 5 x 3 x 1, 7 x 2 x 1, and 11 x 1 x 1 all contain forty-six cubes. +Für die erste Schicht auf einem Quader mit den Maßen 5 x 1 x 1 werden jedoch auch zweiundzwanzig Würfel benötigt; ebenso enthält die erste Schicht auf Quadern mit den Maßen 5 x 3 x 1, 7 x 2 x 1 und 11 x 1 x 1 jeweils sechsundvierzig Würfel. -We shall define $C(n)$ to represent the number of cuboids that contain $n$ cubes in one of its layers. So $C(22) = 2$, $C(46) = 4$, $C(78) = 5$, and $C(118) = 8$. +Wir definieren $C(n)$ als die Anzahl der Quader, die $n$ Würfel in einer ihrer Schichten enthalten. Also $C(22) = 2$, $C(46) = 4$, $C(78) = 5$, und $C(118) = 8$. -It turns out that 154 is the least value of $n$ for which $C(n) = 10$. +Es stellt sich heraus, dass 154 der kleinste Wert von $n$ ist, für den $C(n) = 10$ ist. -Find the least value of $n$ for which $C(n) = 1000$. +Finde den kleinsten Wert von $n$, für den $C(n) = 1000$ ist. # --hints-- -`cuboidLayers()` should return `18522`. +`cuboidLayers()` sollte `18522` zurückgeben. ```js assert.strictEqual(cuboidLayers(), 18522); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-127-abc-hits.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-127-abc-hits.md index 2f7f927858e..13aa0f507a9 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-127-abc-hits.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-127-abc-hits.md @@ -8,29 +8,29 @@ dashedName: problem-127-abc-hits # --description-- -The radical of $n$, $rad(n)$, is the product of distinct prime factors of $n$. For example, $504 = 2^3 × 3^2 × 7$, so $rad(504) = 2 × 3 × 7 = 42$. +The radical of $n$, $rad(n)$, is the product of distinct prime factors of $n$. Zum Beispiel: $504 = 2^3 × 3^2 × 7$, also $rad(504) = 2 × 3 × 7 = 42$. -We shall define the triplet of positive integers (a, b, c) to be an abc-hit if: +Wir definieren das Tripel positiver ganzer Zahlen (a, b, c) als einen abc-Treffer, wenn: 1. $GCD(a, b) = GCD(a, c) = GCD(b, c) = 1$ 2. $a < b$ 3. $a + b = c$ 4. $rad(abc) < c$ -For example, (5, 27, 32) is an abc-hit, because: +Zum Beispiel ist (5, 27, 32) ein abc-Treffer, weil: 1. $GCD(5, 27) = GCD(5, 32) = GCD(27, 32) = 1$ 2. $5 < 27$ 3. $5 + 27 = 32$ 4. $rad(4320) = 30 < 32$ -It turns out that abc-hits are quite rare and there are only thirty-one abc-hits for $c < 1000$, with $\sum{c} = 12523$. +Es stellt sich heraus, dass abc-Treffer recht selten sind und es nur einunddreißig abc-Treffer für $c < 1000$ gibt, mit $\sum{c} = 12523$. -Find $\sum{c}$ for $c < 120000$. +Finde $\sum{c}$ für $c < 120000$. # --hints-- -`abcHits()` should return `18407904`. +`abcHits()` sollte `18407904` zurückgeben. ```js assert.strictEqual(abcHits(), 18407904); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-128-hexagonal-tile-differences.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-128-hexagonal-tile-differences.md index 49d59948762..3a074a9cf8d 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-128-hexagonal-tile-differences.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-128-hexagonal-tile-differences.md @@ -10,17 +10,17 @@ dashedName: problem-128-hexagonal-tile-differences A hexagonal tile with number 1 is surrounded by a ring of six hexagonal tiles, starting at "12 o'clock" and numbering the tiles 2 to 7 in an anti-clockwise direction. -New rings are added in the same fashion, with the next rings being numbered 8 to 19, 20 to 37, 38 to 61, and so on. The diagram below shows the first three rings. +Neue Ringe werden auf die gleiche Weise hinzugefügt, wobei die nächsten Ringe die Nummern 8 bis 19, 20 bis 37, 38 bis 61 usw. tragen. Das folgende Diagramm zeigt die ersten drei Ringe. -three first rings of arranged hexagonal tiles with numbers 1 to 37, and with highlighted tiles 8 and 17 +drei erste Ringe aus angeordneten sechseckigen Steinen mit den Nummern 1 bis 37 und den hervorgehobenen Steinen 8 und 17 By finding the difference between tile $n$ and each of its six neighbours we shall define $PD(n)$ to be the number of those differences which are prime. -For example, working clockwise around tile 8 the differences are 12, 29, 11, 6, 1, and 13. So $PD(8) = 3$. +For example, working clockwise around tile 8 the differences are 12, 29, 11, 6, 1, and 13. Somit ist $PD(8) = 3$. In the same way, the differences around tile 17 are 1, 17, 16, 1, 11, and 10, hence $PD(17) = 2$. -It can be shown that the maximum value of $PD(n)$ is $3$. +Es kann gezeigt werden, dass der Maximalwert von $PD(n)$ $ $3$ ist. If all of the tiles for which $PD(n) = 3$ are listed in ascending order to form a sequence, the 10th tile would be 271. @@ -28,13 +28,13 @@ Find the 2000th tile in this sequence. # --hints-- -`hexagonalTile(10)` should return `271`. +`hexagonalTile(10)` sollte `271` zurückgeben. ```js assert.strictEqual(hexagonalTile(10), 271); ``` -`hexagonalTile(2000)` should return `14516824220`. +`hexagonalTile(2000)` sollte `14516824220` zurückgeben. ```js assert.strictEqual(hexagonalTile(2000), 14516824220); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-129-repunit-divisibility.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-129-repunit-divisibility.md index e7f423f96d5..c7097d98b23 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-129-repunit-divisibility.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-129-repunit-divisibility.md @@ -1,6 +1,6 @@ --- id: 5900f3ef1000cf542c50ff01 -title: 'Problem 129: Repunit divisibility' +title: 'Problem 129: Teilbarkeit von Einheiten' challengeType: 1 forumTopicId: 301756 dashedName: problem-129-repunit-divisibility @@ -8,17 +8,17 @@ dashedName: problem-129-repunit-divisibility # --description-- -A number consisting entirely of ones is called a repunit. We shall define $R(k)$ to be a repunit of length $k$; for example, $R(6) = 111111$. +Eine Zahl, die ausschließlich aus Einsen besteht, nennt man ein Repunit. We shall define $R(k)$ to be a repunit of length $k$; for example, $R(6) = 111111$. -Given that $n$ is a positive integer and $GCD(n, 10) = 1$, it can be shown that there always exists a value, $k$, for which $R(k)$ is divisible by $n$, and let $A(n)$ be the least such value of $k$; for example, $A(7) = 6$ and $A(41) = 5$. +Unter der Voraussetzung, dass $n$ eine positive ganze Zahl ist und $GCD(n, 10) = 1$, kann man zeigen, dass es immer einen Wert $k$ gibt, für den $R(k)$ durch $n$ teilbar ist, und dass $A(n)$ der kleinste solche Wert von $k$ ist; zum Beispiel $A(7) = 6$ und $A(41) = 5$. -The least value of $n$ for which $A(n)$ first exceeds ten is 17. +Der kleinste Wert von $n$, für den $A(n)$ zuerst zehn überschreitet, ist 17. -Find the least value of $n$ for which $A(n)$ first exceeds one-million. +Finde den kleinsten Wert von $n$, für den $A(n)$ zuerst eine Million überschreitet. # --hints-- -`repunitDivisibility()` should return `1000023`. +`repunitDivisibility()` sollte `1000023` zurückgeben. ```js assert.strictEqual(repunitDivisibility(), 1000023); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-130-composites-with-prime-repunit-property.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-130-composites-with-prime-repunit-property.md index 48f7149e5a6..589b913f9c6 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-130-composites-with-prime-repunit-property.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-130-composites-with-prime-repunit-property.md @@ -8,19 +8,19 @@ dashedName: problem-130-composites-with-prime-repunit-property # --description-- -A number consisting entirely of ones is called a repunit. We shall define $R(k)$ to be a repunit of length $k$; for example, $R(6) = 111111$. +Eine Zahl, die ausschließlich aus Einsen besteht, nennt man Repunit. Wir definieren $R(k)$ als Repunit der Länge $k$; zum Beispiel $R(6) = 111111$. -Given that $n$ is a positive integer and $GCD(n, 10) = 1$, it can be shown that there always exists a value, $k$, for which $R(k)$ is divisible by $n$, and let $A(n)$ be the least such value of $k$; for example, $A(7) = 6$ and $A(41) = 5$. +Unter der Voraussetzung, dass $n$ eine positive ganze Zahl ist und $GCD(n, 10) = 1$, kann man zeigen, dass es immer einen Wert $k$ gibt, für den $R(k)$ durch $n$ teilbar ist, und dass $A(n)$ der kleinste solche Wert von $k$ ist; zum Beispiel $A(7) = 6$ und $A(41) = 5$. -You are given that for all primes, $p > 5$, that $p − 1$ is divisible by $A(p)$. For example, when $p = 41, A(41) = 5$, and 40 is divisible by 5. +Es ist gegeben, dass für alle Primzahlen $p > 5$, dass $p - 1$ durch $A(p)$ teilbar ist. Wenn zum Beispiel $p = 41 ist, ist A(41) = 5$, und 40 durch 5 teilbar. -However, there are rare composite values for which this is also true; the first five examples being 91, 259, 451, 481, and 703. +Es gibt jedoch seltene zusammengesetzte Werte, für die dies ebenfalls zutrifft; die ersten fünf Beispiele sind 91, 259, 451, 481 und 703. -Find the sum of the first twenty-five composite values of $n$ for which $GCD(n, 10) = 1$ and $n − 1$ is divisible by $A(n)$. +Finde die Summe der ersten fünfundzwanzig zusammengesetzten Werte von $n$, für die $GCD(n, 10) = 1$ und $n - 1$ durch $A(n)$ teilbar ist. # --hints-- -`compositeRepunit()` should return `149253`. +`compositeRepunit()` sollte `149253` zurückgeben. ```js assert.strictEqual(compositeRepunit(), 149253); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-131-prime-cube-partnership.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-131-prime-cube-partnership.md index 73e7e8e7490..6c534288159 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-131-prime-cube-partnership.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-131-prime-cube-partnership.md @@ -8,17 +8,17 @@ dashedName: problem-131-prime-cube-partnership # --description-- -There are some prime values, $p$, for which there exists a positive integer, $n$, such that the expression $n^3 + n^{2}p$ is a perfect cube. +Es gibt einige Primzahlen $p$, für die es eine positive ganze Zahl $n$ gibt, sodass der Ausdruck $n^3 + n^{2}p$ ein perfekter Würfel ist. -For example, when $p = 19,\\ 8^3 + 8^2 × 19 = {12}^3$. +Zum Beispiel, wenn $p = 19,\\ 8^3 + 8^2 × 19 = {12}^3$. -What is perhaps most surprising is that the value of $n$ is unique for each prime with this property, and there are only four such primes below one hundred. +Was vielleicht am meisten überrascht, ist, dass der Wert von $n$ für jede Primzahl mit dieser Eigenschaft einzigartig ist, und dass es nur vier solcher Primzahlen unter hundert gibt. -How many primes below one million have this remarkable property? +Wie viele Primzahlen unter einer Million haben diese bemerkenswerte Eigenschaft? # --hints-- -`primeCubePartnership()` should return `173`. +`primeCubePartnership()` sollte `173` zurückgeben. ```js assert.strictEqual(primeCubePartnership(), 173); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-132-large-repunit-factors.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-132-large-repunit-factors.md index 5ca7c0760fd..c3c4b789140 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-132-large-repunit-factors.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-132-large-repunit-factors.md @@ -1,6 +1,6 @@ --- id: 5900f3f11000cf542c50ff03 -title: 'Problem 132: Large repunit factors' +title: 'Problem 132: Große Repunit-Faktoren' challengeType: 1 forumTopicId: 301760 dashedName: problem-132-large-repunit-factors @@ -8,15 +8,15 @@ dashedName: problem-132-large-repunit-factors # --description-- -A number consisting entirely of ones is called a repunit. We shall define $R(k)$ to be a repunit of length $k$. +Eine Zahl, die alleinig aus Einsen besteht, wird Repunit genannt. We shall define $R(k)$ to be a repunit of length $k$. -For example, $R(10) = 1111111111 = 11 × 41 × 271 × 9091$, and the sum of these prime factors is 9414. +Zum Beispiel gilt, dass $R(10) = 1111111111 = 11 × 41 × 271 × 9091$ und die Summe dieser Primfaktoren 9414 ist. -Find the sum of the first forty prime factors of $R({10}^9)$. +Finde die Summe der ersten 40 Primfaktoren von $R({10}^9)$. # --hints-- -`largeRepunitFactors()` should return `843296`. +`largeRepunitFactors()` sollte `843296` ausgeben. ```js assert.strictEqual(largeRepunitFactors(), 843296); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-133-repunit-nonfactors.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-133-repunit-nonfactors.md index ee861a14420..c98e7f5adff 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-133-repunit-nonfactors.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-133-repunit-nonfactors.md @@ -8,17 +8,17 @@ dashedName: problem-133-repunit-nonfactors # --description-- -A number consisting entirely of ones is called a repunit. We shall define $R(k)$ to be a repunit of length $k$; for example, $R(6) = 111111$. +Eine Zahl, die ausschließlich aus Einsen besteht, nennt man Repunit. Wir definieren $R(k)$ als Repunit der Länge $k$; zum Beispiel $R(6) = 111111$. -Let us consider repunits of the form $R({10}^n)$. +Wir betrachten Repunits in der Form $R({10}^n)$. -Although $R(10)$, $R(100)$, or $R(1000)$ are not divisible by 17, $R(10000)$ is divisible by 17. Yet there is no value of n for which $R({10}^n)$ will divide by 19. Remarkably, 11, 17, 41, and 73 are the only four primes below one-hundred that can be a factor of $R({10}^n)$. +Obwohl $R(10)$, $R(100)$ oder $R(1000)$ nicht durch 17 teilbar sind, ist $R(10000)$ durch 17 teilbar. Es gibt jedoch keinen Wert von n, für den $R({10}^n)$ durch 19 teilbar wäre. Bemerkenswerterweise sind 11, 17, 41 und 73 die einzigen vier Primzahlen unter Hundert, die ein Faktor von $R({10}^n)$ sein können. -Find the sum of all the primes below one-hundred thousand that will never be a factor of $R({10}^n)$. +Finde die Summe aller Primzahlen unter einhunderttausend, die niemals ein Faktor von $R({10}^n)$ sein wird. # --hints-- -`repunitNonfactors()` should return `453647705`. +`repunitNonfactors()` sollte `453647705` zurückgeben. ```js assert.strictEqual(repunitNonfactors(), 453647705); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-134-prime-pair-connection.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-134-prime-pair-connection.md index d6629ef1579..ebd5e7555c5 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-134-prime-pair-connection.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-134-prime-pair-connection.md @@ -1,6 +1,6 @@ --- id: 5900f3f21000cf542c50ff05 -title: 'Problem 134: Prime pair connection' +title: 'Problem 134: Primzahl-Paar-Verbindungen' challengeType: 1 forumTopicId: 301762 dashedName: problem-134-prime-pair-connection @@ -8,15 +8,15 @@ dashedName: problem-134-prime-pair-connection # --description-- -Consider the consecutive primes $p_1 = 19$ and $p_2 = 23$. It can be verified that 1219 is the smallest number such that the last digits are formed by $p_1$ whilst also being divisible by $p_2$. +Betrachte die aufeinanderfolgenden Primzahlen $p_1 = 19$ und $p_2 = 23$. Es kann bewiesen werden, dass 1219 die kleinste Zahl ist, so dass die letzten Ziffern mit $p_1$ gebildet werden, während sie auch durch $p_2$ teilbar sind. -In fact, with the exception of $p_1 = 3$ and $p_2 = 5$, for every pair of consecutive primes, $p_2 > p_1$, there exist values of $n$ for which the last digits are formed by $p_1$ and $n$ is divisible by $p_2$. Let $S$ be the smallest of these values of $n$. +Tatsächlich gibt es mit Ausnahme von $p_1 = 3$ und $p_2 = 5$ für jedes Paar von aufeinanderfolgenden Primzahlen $p_2 > p_1$ Werte von $n$, für die die letzten Ziffern durch $p_1$ gebildet werden und $n$ durch $p_2$ teilbar ist. Lass $S$ den kleinsten dieser Werte von $n$ sein. -Find $\sum{S}$ for every pair of consecutive primes with $5 ≤ p_1 ≤ 1000000$. +Finde $\sum{S}$ für jedes Paar der aufeinanderfolgenden Primzahlen mit $5 ≤ p_1 ≤ 1000000$. # --hints-- -`primePairConnection()` should return `18613426663617120`. +`primePairConnection()` sollte `18613426663617120` zurückgeben. ```js assert.strictEqual(primePairConnection(), 18613426663617120); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-135-same-differences.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-135-same-differences.md index 3045467d61e..c873eafde34 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-135-same-differences.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-135-same-differences.md @@ -1,6 +1,6 @@ --- id: 5900f3f31000cf542c50ff06 -title: 'Problem 135: Same differences' +title: 'Problem 135: Gleiche Unterschiede' challengeType: 1 forumTopicId: 301763 dashedName: problem-135-same-differences @@ -8,17 +8,17 @@ dashedName: problem-135-same-differences # --description-- -Given the positive integers, $x$, $y$, and $z$, are consecutive terms of an arithmetic progression, the least value of the positive integer, $n$, for which the equation, $x^2 − y^2 − z^2 = n$, has exactly two solutions is $n = 27$: +Da die positiven ganzen Zahlen $x$, $y$ und $z$ aufeinanderfolgende Terme einer arithmetischen Progression sind, ist der kleinste Wert der positiven ganzen Zahl $n$, für den die Gleichung $x^2 - y^2 - z^2 = n$ genau zwei Lösungen hat, $n = 27$: $$34^2 − 27^2 − 20^2 = 12^2 − 9^2 − 6^2 = 27$$ -It turns out that $n = 1155$ is the least value which has exactly ten solutions. +Es stellt sich heraus, dass $n = 1155$ der kleinste Wert ist, der genau zehn Lösungen hat. -How many values of $n$ less than one million have exactly ten distinct solutions? +Wie viele Werte von $n$, unter einer Million, haben genau zehn verschiedene Lösungen? # --hints-- -`sameDifferences()` should return `4989`. +`sameDifferences()` sollte `4989` zurückgeben. ```js assert.strictEqual(sameDifferences(), 4989); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-136-singleton-difference.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-136-singleton-difference.md index d73ff59f63b..f57080ee0c5 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-136-singleton-difference.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-136-singleton-difference.md @@ -1,6 +1,6 @@ --- id: 5900f3f51000cf542c50ff07 -title: 'Problem 136: Singleton difference' +title: 'Problem 136: Singleton Unterschied' challengeType: 1 forumTopicId: 301764 dashedName: problem-136-singleton-difference @@ -8,17 +8,17 @@ dashedName: problem-136-singleton-difference # --description-- -The positive integers, $x$, $y$, and $z$, are consecutive terms of an arithmetic progression. Given that $n$ is a positive integer, the equation, $x^2 − y^2 − z^2 = n$, has exactly one solution when $n = 20$: +Die positiven ganzen Zahlen $x$, $y$ und $z$ sind aufeinanderfolgende Terme einer arithmetischen Progression. Unter der Voraussetzung, dass $n$ eine positive ganze Zahl ist, hat die Gleichung $x^2 - y^2 - z^2 = n$ genau eine Lösung, wenn $n = 20$: $$13^2 − 10^2 − 7^2 = 20$$ -In fact, there are twenty-five values of $n$ below one hundred for which the equation has a unique solution. +In der Tat gibt es fünfundzwanzig Werte von $n$ unter hundert, für die die Gleichung eine eindeutige Lösung hat. -How many values of $n$ less than fifty million have exactly one solution? +Wie viele Werte von $n$ kleiner als fünfzig Millionen haben genau eine Lösung? # --hints-- -`singletonDifference()` should return `2544559`. +`singletonDifference()` sollte `2544559` zurückgeben. ```js assert.strictEqual(singletonDifference(), 2544559); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-137-fibonacci-golden-nuggets.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-137-fibonacci-golden-nuggets.md index b700dba62d0..b003067241c 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-137-fibonacci-golden-nuggets.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-137-fibonacci-golden-nuggets.md @@ -8,16 +8,16 @@ dashedName: problem-137-fibonacci-golden-nuggets # --description-- -Consider the infinite polynomial series $A_{F}(x) = xF_1 + x^2F_2 + x^3F_3 + \ldots$, where $F_k$ is the $k$th term in the Fibonacci sequence: $1, 1, 2, 3, 5, 8, \ldots$; that is, $F_k = F_{k − 1} + F_{k − 2}, F_1 = 1$ and $F_2 = 1$. +Man betrachte die unendliche Polynomreihe $A_{F}(x) = xF_1 + x^2F_2 + x^3F_3 + \ldots$, wobei $F_k$ der $k$-te Term der Fibonacci-Folge ist: $1, 1, 2, 3, 5, 8, \ldots$; das heißt, $F_k = F_{k - 1} + F_{k - 2}, F_1 = 1$ und $F_2 = 1$. -For this problem we shall be interested in values of $x$ for which $A_{F}(x)$ is a positive integer. +Für dieses Problem sind wir an Werten von $x$ interessiert, für die $A_{F}(x)$ eine positive ganze Zahl ist. -Surprisingly +Überraschenderweise $$\begin{align} A_F(\frac{1}{2}) & = (\frac{1}{2}) × 1 + {(\frac{1}{2})}^2 × 1 + {(\frac{1}{2})}^3 × 2 + {(\frac{1}{2})}^4 × 3 + {(\frac{1}{2})}^5 × 5 + \cdots \\\\ & = \frac{1}{2} + \frac{1}{4} + \frac{2}{8} + \frac{3}{16} + \frac{5}{32} + \cdots \\\\ & = 2 \end{align}$$ -The corresponding values of $x$ for the first five natural numbers are shown below. +Die entsprechenden Werte von $x$ für die ersten fünf natürlichen Zahlen sind unten dargestellt. | $x$ | $A_F(x)$ | | --------------------------- | -------- | @@ -33,7 +33,7 @@ Find the 15th golden nugget. # --hints-- -`goldenNugget()` should return `1120149658760`. +`goldenNugget()` sollte `1120149658760` zurückgeben. ```js assert.strictEqual(goldenNugget(), 1120149658760); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-138-special-isosceles-triangles.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-138-special-isosceles-triangles.md index 6391b7523c4..3c5ec39db3c 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-138-special-isosceles-triangles.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-138-special-isosceles-triangles.md @@ -1,6 +1,6 @@ --- id: 5900f3f61000cf542c50ff09 -title: 'Problem 138: Special isosceles triangles' +title: 'Problem 130: Besondere gleichschenklige Dreiecke' challengeType: 1 forumTopicId: 301766 dashedName: problem-138-special-isosceles-triangles @@ -10,17 +10,17 @@ dashedName: problem-138-special-isosceles-triangles Consider the isosceles triangle with base length, $b = 16$, and legs, $L = 17$. -isosceles triangle with edges named as L - two edges with the same length and base of the triangle as b; and height of the triangle - h from the base of the triangle to the angle between L edges +gleichschenkliges Dreieck mit Kanten, die als L bezeichnet werden - zwei Kanten mit der gleichen Länge und der Basis des Dreiecks wie b; und Höhe des Dreiecks - h von der Basis des Dreiecks bis zum Winkel zwischen den L-Kanten -By using the Pythagorean theorem, it can be seen that the height of the triangle, $h = \sqrt{{17}^2 − 8^2} = 15$, which is one less than the base length. +Mit Hilfe des Satzes des Pythagoras kannst du feststellen, dass die Höhe des Dreiecks $h = \sqrt{{17}^2 - 8^2} = 15$ ist, also um eins kleiner als die Basislänge. -With $b = 272$ and $L = 305$, we get $h = 273$, which is one more than the base length, and this is the second smallest isosceles triangle with the property that $h = b ± 1$. +Mit $b = 272$ und $L = 305$ erhalten wir $h = 273$, was eins mehr als die Basislänge ist, und dies ist das zweitkleinste gleichschenklige Dreieck mit der Eigenschaft, dass $h = b ± 1$ gilt. -Find $\sum{L}$ for the twelve smallest isosceles triangles for which $h = b ± 1$ and $b$, $L$ are positive integers. +Finde $\sum{L}$ für die zwölf kleinsten gleichschenkligen Dreiecke, für die $h = b ± 1$ gilt und $b$, $L$ positive ganze Zahlen sind. # --hints-- -`isoscelesTriangles()` should return `1118049290473932`. +`isoscelesTriangles()` sollte `1118049290473932` ausgeben. ```js assert.strictEqual(isoscelesTriangles(), 1118049290473932); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-157-solving-the-diophantine-equation.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-157-solving-the-diophantine-equation.md index aa5e8185547..9d69671128c 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-157-solving-the-diophantine-equation.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-157-solving-the-diophantine-equation.md @@ -1,6 +1,6 @@ --- id: 5900f4091000cf542c50ff1c -title: 'Problem 157: Solving the diophantine equation' +title: 'Problem 157: Lösen der Diophantischen Gleichung' challengeType: 1 forumTopicId: 301788 dashedName: problem-157-solving-the-diophantine-equation diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-180-rational-zeros-of-a-function-of-three-variables.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-180-rational-zeros-of-a-function-of-three-variables.md index 7a9fc7d7c66..b83f73da691 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-180-rational-zeros-of-a-function-of-three-variables.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-180-rational-zeros-of-a-function-of-three-variables.md @@ -1,6 +1,6 @@ --- id: 5900f4201000cf542c50ff33 -title: 'Aufgabe 180: Rationale Nullstellen einer Funktion von drei Variablen' +title: 'Problem 180: Rationale Nullstellen einer Funktion von drei Variablen' challengeType: 1 forumTopicId: 301816 dashedName: problem-180-rational-zeros-of-a-function-of-three-variables diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-2-even-fibonacci-numbers.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-2-even-fibonacci-numbers.md index 633abb997fc..87dac06f5bb 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-2-even-fibonacci-numbers.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-2-even-fibonacci-numbers.md @@ -1,6 +1,6 @@ --- id: 5900f36e1000cf542c50fe81 -title: 'Aufgabe 2: Gerade Fibonacci-Zahlen' +title: 'Problem 2: Gerade Fibonacci-Zahlen' challengeType: 1 forumTopicId: 301838 dashedName: problem-2-even-fibonacci-numbers diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-21-amicable-numbers.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-21-amicable-numbers.md index df19c7d7c20..e2f2f93440a 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-21-amicable-numbers.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-21-amicable-numbers.md @@ -12,37 +12,37 @@ Let d(`n`) be defined as the sum of proper divisors of `n` (numbers less than `n If d(`a`) = `b` and d(`b`) = `a`, where `a` ≠ `b`, then `a` and `b` are an amicable pair and each of `a` and `b` are called amicable numbers. -For example, the proper divisors of 220 are 1, 2, 4, 5, 10, 11, 20, 22, 44, 55 and 110; therefore d(220) = 284. The proper divisors of 284 are 1, 2, 4, 71 and 142; so d(284) = 220. +Zum Beispiel sind die richtigen Teiler von 220 1, 2, 4, 5, 10, 11, 20, 22, 44, 55 und 110; daher ist d(220) = 284. Die richtigen Teiler von 284 sind 1, 2, 4, 71 und 142; also ist d(284) = 220. -Evaluate the sum of all the amicable numbers under `n`. +Berechne die Summe aller gütigen Zahlen unter `n`. # --hints-- -`sumAmicableNum(1000)` should return a number. +`sumAmicableNum(1000)` sollte eine Zahl zurückgeben. ```js assert(typeof sumAmicableNum(1000) === 'number'); ``` -`sumAmicableNum(1000)` should return 504. +`sumAmicableNum(1000)` sollte 504 zurückgeben. ```js assert.strictEqual(sumAmicableNum(1000), 504); ``` -`sumAmicableNum(2000)` should return 2898. +`sumAmicableNum(2000)` sollte 2898 zurückgeben. ```js assert.strictEqual(sumAmicableNum(2000), 2898); ``` -`sumAmicableNum(5000)` should return 8442. +`sumAmicableNum(5000)` sollte 8442 zurückgeben. ```js assert.strictEqual(sumAmicableNum(5000), 8442); ``` -`sumAmicableNum(10000)` should return 31626. +`sumAmicableNum(10000)` sollte 31626 zurückgeben. ```js assert.strictEqual(sumAmicableNum(10000), 31626); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-22-names-scores.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-22-names-scores.md index 4c8df4383a7..de346b3ec3a 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-22-names-scores.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-22-names-scores.md @@ -8,33 +8,33 @@ dashedName: problem-22-names-scores # --description-- -Using `names`, an array defined in the background containing over five-thousand first names, begin by sorting it into alphabetical order. Then working out the alphabetical value for each name, multiply this value by its alphabetical position in the list to obtain a name score. +Using `names`, an array defined in the background containing over five-thousand first names, begin by sorting it into alphabetical order. Anschließend wird der alphabetische Wert für jeden Namen berechnet und mit der alphabetischen Position in der Liste multipliziert, um eine Punktzahl für den Namen zu erhalten. -For example, when the list is sorted into alphabetical order, COLIN, which is worth 3 + 15 + 12 + 9 + 14 = 53, is the 938th name in the list. So, COLIN would obtain a score of 938 × 53 = 49714. +For example, when the list is sorted into alphabetical order, COLIN, which is worth 3 + 15 + 12 + 9 + 14 = 53, is the 938th name in the list. COLIN würde also eine Punktzahl von 938 × 53 = 49714 erhalten. What is the total of all the name scores in the array? # --hints-- -`namesScores(test1)` should return a number. +`namesScores(test1)` sollte eine Zahl zurückgeben. ```js assert(typeof namesScores(test1) === 'number'); ``` -`namesScores(test1)` should return 791. +`namesScores(test1)` sollte 791 ergeben. ```js assert.strictEqual(namesScores(test1), 791); ``` -`namesScores(test2)` should return 1468. +`namesScores(test2)` sollte 1468 zurückgeben. ```js assert.strictEqual(namesScores(test2), 1468); ``` -`namesScores(names)` should return 871198282. +`namesScores(names)` sollte 871198282 zurückgeben. ```js assert.strictEqual(namesScores(names), 871198282); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-23-non-abundant-sums.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-23-non-abundant-sums.md index cc7079af8c4..d6e07ee38bf 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-23-non-abundant-sums.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-23-non-abundant-sums.md @@ -1,6 +1,6 @@ --- id: 5900f3831000cf542c50fe96 -title: 'Problem 23: Non-abundant sums' +title: 'Problem 23: Nicht-abundante Summen' challengeType: 1 forumTopicId: 301873 dashedName: problem-23-non-abundant-sums @@ -8,7 +8,7 @@ dashedName: problem-23-non-abundant-sums # --description-- -A perfect number is a number for which the sum of its proper divisors is exactly equal to the number. For example, the sum of the proper divisors of 28 would be 1 + 2 + 4 + 7 + 14 = 28, which means that 28 is a perfect number. +A perfect number is a number for which the sum of its proper divisors is exactly equal to the number. Die Summe der richtigen Teiler von 28 wäre zum Beispiel 1 + 2 + 4 + 7 + 14 = 28, was bedeutet, dass 28 eine perfekte Zahl ist. A number `n` is called deficient if the sum of its proper divisors is less than `n` and it is called abundant if this sum exceeds `n`. @@ -18,31 +18,31 @@ Find the sum of all positive integers <= `n` which cannot be written as the s # --hints-- -`sumOfNonAbundantNumbers(10000)` should return a number. +`sumOfNonAbundantNumbers(10000)` sollte eine Zahl zurückgeben. ```js assert(typeof sumOfNonAbundantNumbers(10000) === 'number'); ``` -`sumOfNonAbundantNumbers(10000)` should return 3731004. +`sumOfNonAbundantNumbers(10000)` sollte 3731004 zurückgeben. ```js assert(sumOfNonAbundantNumbers(10000) === 3731004); ``` -`sumOfNonAbundantNumbers(15000)` should return 4039939. +`sumOfNonAbundantNumbers(15000)` sollte 4039939 zurückgeben. ```js assert(sumOfNonAbundantNumbers(15000) === 4039939); ``` -`sumOfNonAbundantNumbers(20000)` should return 4159710. +`sumOfNonAbundantNumbers(20000)` sollte 4159710 zurückgeben. ```js assert(sumOfNonAbundantNumbers(20000) === 4159710); ``` -`sumOfNonAbundantNumbers(28123)` should return 4179871. +`sumOfNonAbundantNumbers(28123)` sollte 4179871 zurückgeben. ```js assert(sumOfNonAbundantNumbers(28123) === 4179871); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-24-lexicographic-permutations.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-24-lexicographic-permutations.md index 91572e2dd40..e4dde43ff11 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-24-lexicographic-permutations.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-24-lexicographic-permutations.md @@ -1,6 +1,6 @@ --- id: 5900f3841000cf542c50fe97 -title: 'Problem 24: Lexicographic permutations' +title: 'Problem 24: Lexikographische Permutationen' challengeType: 1 forumTopicId: 301885 dashedName: problem-24-lexicographic-permutations @@ -8,39 +8,39 @@ dashedName: problem-24-lexicographic-permutations # --description-- -A permutation is an ordered arrangement of objects. For example, 3124 is one possible permutation of the digits 1, 2, 3 and 4. If all of the permutations are listed numerically or alphabetically, we call it lexicographic order. The lexicographic permutations of 0, 1 and 2 are: +Eine Permutation ist eine geordnete Anordnung von Objekten. Zum Beispiel ist 3124 eine mögliche Permutation der Ziffern 1, 2, 3 und 4. Wenn alle Permutationen numerisch oder alphabetisch aufgelistet sind, nennen wir sie lexikographisch. Die lexikographischen Permutationen von 0, 1 und 2 sind: -
                                                                                                                                                                  012   021   102   120   201   210
                                                                                                                                                                  +
                                                                                                                                                                  012 021 102 120 201 210
                                                                                                                                                                  -What is the `n`th lexicographic permutation of the digits 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9? +Was ist die `n`-te lexikographische Permutation der Ziffern 0, 1, 2, 3, 4, 5, 6, 7, 8 und 9? # --hints-- -`lexicographicPermutations(699999)` should return a number. +`lexicographicPermutations(699999)` sollte eine Zahl zurückgeben. ```js assert(typeof lexicographicPermutations(699999) === 'number'); ``` -`lexicographicPermutations(699999)` should return 1938246570. +`lexicographicPermutations(699999)` sollte 1938246570 zurückgeben. ```js assert(lexicographicPermutations(699999) == 1938246570); ``` -`lexicographicPermutations(899999)` should return 2536987410. +`lexicographicPermutations(899999)` sollte 2536987410 zurückgeben. ```js assert(lexicographicPermutations(899999) == 2536987410); ``` -`lexicographicPermutations(900000)` should return 2537014689. +`lexicographicPermutations(900000)` sollte 2537014689 zurückgeben. ```js assert(lexicographicPermutations(900000) == 2537014689); ``` -`lexicographicPermutations(999999)` should return 2783915460. +`lexicographicPermutations(999999)` sollte 2783915460 zurückgeben. ```js assert(lexicographicPermutations(999999) == 2783915460); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-25-1000-digit-fibonacci-number.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-25-1000-digit-fibonacci-number.md index 25d18d786ef..ebdad1aa143 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-25-1000-digit-fibonacci-number.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-25-1000-digit-fibonacci-number.md @@ -1,6 +1,6 @@ --- id: 5900f3851000cf542c50fe98 -title: 'Problem 25: 1000-digit Fibonacci number' +title: 'Problem 25: 1000-stellige Fibonacci Nummer' challengeType: 1 forumTopicId: 301897 dashedName: problem-25-1000-digit-fibonacci-number @@ -8,45 +8,45 @@ dashedName: problem-25-1000-digit-fibonacci-number # --description-- -The Fibonacci sequence is defined by the recurrence relation: +Die Fibonacci Sequenz wird durch die Wiederholungsbeziehung definiert: -
                                                                                                                                                                  Fn = Fn−1 + Fn−2, where F1 = 1 and F2 = 1.
                                                                                                                                                                  +
                                                                                                                                                                  Fn = Fn−1 + Fn−2, wobei F1 = 1 and F2 = 1.
                                                                                                                                                                  -Hence the first 12 terms will be: +Die ersten 12 Begriffe lauten demnach:
                                                                                                                                                                  F1 = 1
                                                                                                                                                                  F2 = 1
                                                                                                                                                                  F3 = 2
                                                                                                                                                                  F4 = 3
                                                                                                                                                                  F5 = 5
                                                                                                                                                                  F6 = 8
                                                                                                                                                                  F7 = 13
                                                                                                                                                                  F8 = 21
                                                                                                                                                                  F9 = 34
                                                                                                                                                                  F10 = 55
                                                                                                                                                                  F11 = 89
                                                                                                                                                                  F12 = 144
                                                                                                                                                                  -The 12th term, F12, is the first term to contain three digits. +Der 12. Term, F12, ist der erste Term, der drei Ziffern enthält. -What is the index of the first term in the Fibonacci sequence to contain `n` digits? +Was ist der Index des ersten Begriffs in der Fibonacci-Folge, der `n` Ziffern enthält? # --hints-- -`digitFibonacci(5)` should return a number. +`digitFibonacci(5)` sollte eine Zahl zurückgeben. ```js assert(typeof digitFibonacci(5) === 'number'); ``` -`digitFibonacci(5)` should return 21. +`digitFibonacci(5)` sollte 21 zurückgeben. ```js assert.strictEqual(digitFibonacci(5), 21); ``` -`digitFibonacci(10)` should return 45. +`digitFibonacci(10)` sollte 45 zurückgeben. ```js assert.strictEqual(digitFibonacci(10), 45); ``` -`digitFibonacci(15)` should return 69. +`digitFibonacci(15)` sollte 69 zurückgeben. ```js assert.strictEqual(digitFibonacci(15), 69); ``` -`digitFibonacci(20)` should return 93. +`digitFibonacci(20)` sollte 93 zurückgeben. ```js assert.strictEqual(digitFibonacci(20), 93); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-26-reciprocal-cycles.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-26-reciprocal-cycles.md index 580ba5807a3..69b00a1d180 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-26-reciprocal-cycles.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-26-reciprocal-cycles.md @@ -1,6 +1,6 @@ --- id: 5900f3861000cf542c50fe99 -title: 'Problem 26: Reciprocal cycles' +title: 'Problem 26: Reziproke Zyklen' challengeType: 1 forumTopicId: 301908 dashedName: problem-26-reciprocal-cycles @@ -8,41 +8,41 @@ dashedName: problem-26-reciprocal-cycles # --description-- -A unit fraction contains 1 in the numerator. The decimal representation of the unit fractions with denominators 2 to 10 are given: +Ein Einheitsbruch enthält 1 im Zähler. Die Dezimaldarstellung der Einheitsbrüche mit den Nennern 2 bis 10 ist gegeben: -
                                                                                                                                                                  1/2 = 0.5
                                                                                                                                                                  1/3 = 0.(3)
                                                                                                                                                                  1/4 = 0.25
                                                                                                                                                                  1/5 = 0.2
                                                                                                                                                                  1/6 = 0.1(6)
                                                                                                                                                                  1/7 = 0.(142857)
                                                                                                                                                                  1/8 = 0.125
                                                                                                                                                                  1/9 = 0.(1)
                                                                                                                                                                  1/10 = 0.1
                                                                                                                                                                  +
                                                                                                                                                                  1/2 = 0.5
                                                                                                                                                                  1/3 = 0.(3)
                                                                                                                                                                  1/4 = 0.25
                                                                                                                                                                  1/5 = 0.2
                                                                                                                                                                  1/6 = 0.1(6)
                                                                                                                                                                  1/7 = 0.(142857)
                                                                                                                                                                  1/8 = 0.125
                                                                                                                                                                  1/9 = 0.(1)
                                                                                                                                                                  1/10 = 0.1
                                                                                                                                                                  -Where 0.1(6) means 0.166666..., and has a 1-digit recurring cycle. It can be seen that 1/7 has a 6-digit recurring cycle. +Dabei bedeutet 0,1(6) 0,166666... und hat einen 1-stelligen wiederkehrenden Zyklus. Er zeigt, dass 1/7 einen 6-stelligen wiederkehrenden Zyklus hat. -Find the value of `d` < `n` for which 1/d contains the longest recurring cycle in its decimal fraction part. +Finde den Wert von `d` < `n`, für den 1/d den längsten wiederkehrenden Zyklus in seinem Dezimalbruchteil enthält. # --hints-- -`reciprocalCycles(700)` should return a number. +`reciprocalCycles(700)` sollte eine Zahl zurückgeben. ```js assert(typeof reciprocalCycles(700) === 'number'); ``` -`reciprocalCycles(700)` should return 659. +`reciprocalCycles(700)` sollte 659 zurückgeben. ```js assert(reciprocalCycles(700) == 659); ``` -`reciprocalCycles(800)` should return 743. +`reciprocalCycles(800)` sollte 743 zurückgeben. ```js assert(reciprocalCycles(800) == 743); ``` -`reciprocalCycles(900)` should return 887. +`reciprocalCycles(900)` sollte 887 zurückgeben. ```js assert(reciprocalCycles(900) == 887); ``` -`reciprocalCycles(1000)` should return 983. +`reciprocalCycles(1000)` sollte 983 zurückgeben. ```js assert(reciprocalCycles(1000) == 983); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-27-quadratic-primes.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-27-quadratic-primes.md index e7c8ebe01eb..8c48f3cb97b 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-27-quadratic-primes.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-27-quadratic-primes.md @@ -1,6 +1,6 @@ --- id: 5900f3871000cf542c50fe9a -title: 'Problem 27: Quadratic primes' +title: 'Problem 27: Quadratische Primzahlen' challengeType: 1 forumTopicId: 301919 dashedName: problem-27-quadratic-primes @@ -8,51 +8,51 @@ dashedName: problem-27-quadratic-primes # --description-- -Euler discovered the remarkable quadratic formula: +Euler entdeckte die bemerkenswerte quadratische Formel:
                                                                                                                                                                  $n^2 + n + 41$
                                                                                                                                                                  -It turns out that the formula will produce 40 primes for the consecutive integer values $0 \\le n \\le 39$. However, when $n = 40, 40^2 + 40 + 41 = 40(40 + 1) + 41$ is divisible by 41, and certainly when $n = 41, 41^2 + 41 + 41$ is clearly divisible by 41. +Er stellt sich heraus, dass die Formel 40 Primzahlen für die aufeinanderfolgenden ganzzahligen Werte $0 \\le n \\le 39$ ergibt. Wenn $n = 40 ist, ist jedoch 40^2 + 40 + 41 = 40(40 + 1) + 41$ durch 41 teilbar, und wenn $n = 41 ist, ist 41^2 + 41 + 41$ eindeutig durch 41 teilbar. -The incredible formula $n^2 - 79n + 1601$ was discovered, which produces 80 primes for the consecutive values $0 \\le n \\le 79$. The product of the coefficients, −79 and 1601, is −126479. +Die unglaubliche Formel $n^2 - 79n + 1601$ wurde entdeckt, die 80 Primzahlen für die aufeinanderfolgenden Werte $0 \\le n \\le 79$ liefert. Das Produkt der Koeffizienten -79 und 1601 ist -126479. -Considering quadratics of the form: +Betrachtet man Quadratzahlen der Form:
                                                                                                                                                                  - $n^2 + an + b$, where $|a| < range$ and $|b| \le range$
                                                                                                                                                                  - where $|n|$ is the modulus/absolute value of $n$
                                                                                                                                                                  + $n^2 + an + b$, wobei $|a| < range$ and $|b| \le range$
                                                                                                                                                                  + wobei $|n|$ der Modulus/Absolutwert von $n$ ist
                                                                                                                                                                  e.g. $|11| = 11$ and $|-4| = 4$
                                                                                                                                                                  -Find the product of the coefficients, $a$ and $b$, for the quadratic expression that produces the maximum number of primes for consecutive values of $n$, starting with $n = 0$. +Finde das Produkt der Koeffizienten $a$ und $b$ für den quadratischen Ausdruck, der die maximale Anzahl von Primzahlen für aufeinanderfolgende Werte von $n$, beginnend mit $n = 0$, ergibt. # --hints-- -`quadraticPrimes(200)` should return a number. +`quadraticPrimes(200)` sollte eine Zahl zurückgeben. ```js assert(typeof quadraticPrimes(200) === 'number'); ``` -`quadraticPrimes(200)` should return -4925. +`quadraticPrimes(200)` sollte -4925 zurückgeben. ```js assert(quadraticPrimes(200) == -4925); ``` -`quadraticPrimes(500)` should return -18901. +`quadraticPrimes(500)` sollte -18901 zurückgeben. ```js assert(quadraticPrimes(500) == -18901); ``` -`quadraticPrimes(800)` should return -43835. +`quadraticPrimes(800)` sollte -43835 zurückgeben. ```js assert(quadraticPrimes(800) == -43835); ``` -`quadraticPrimes(1000)` should return -59231. +`quadraticPrimes(1000)` sollte -59231 zurückgeben. ```js assert(quadraticPrimes(1000) == -59231); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-28-number-spiral-diagonals.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-28-number-spiral-diagonals.md index eee50073f68..7f8581a473a 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-28-number-spiral-diagonals.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-28-number-spiral-diagonals.md @@ -1,6 +1,6 @@ --- id: 5900f3881000cf542c50fe9b -title: 'Problem 28: Number spiral diagonals' +title: 'Problem 28: Anzahl der spiralen Diagonalen' challengeType: 1 forumTopicId: 301930 dashedName: problem-28-number-spiral-diagonals @@ -8,47 +8,47 @@ dashedName: problem-28-number-spiral-diagonals # --description-- -Starting with the number 1 and moving to the right in a clockwise direction a 5 by 5 spiral is formed as follows: +Beginnend mit der Zahl 1 und im Uhrzeigersinn nach rechts wird eine 5-mal-5-Spirale wie folgt gebildet:
                                                                                                                                                                  21
                                                                                                                                                                  22 23 24
                                                                                                                                                                  25

                                                                                                                                                                  - 20  
                                                                                                                                                                  7
                                                                                                                                                                   8  
                                                                                                                                                                  9
                                                                                                                                                                  10
                                                                                                                                                                  - 19  6  
                                                                                                                                                                  1
                                                                                                                                                                   2 11
                                                                                                                                                                  - 18  
                                                                                                                                                                  5
                                                                                                                                                                   4  
                                                                                                                                                                  3
                                                                                                                                                                  12
                                                                                                                                                                  + 20
                                                                                                                                                                  7
                                                                                                                                                                  8
                                                                                                                                                                  9
                                                                                                                                                                  10
                                                                                                                                                                  + 19 6
                                                                                                                                                                  1
                                                                                                                                                                  2 11
                                                                                                                                                                  + 18
                                                                                                                                                                  5
                                                                                                                                                                  4
                                                                                                                                                                  3
                                                                                                                                                                  12
                                                                                                                                                                  17
                                                                                                                                                                  16 15 14
                                                                                                                                                                  13

                                                                                                                                                                  -It can be verified that the sum of the numbers on the diagonals is 101. +Er kann überprüft werden, dass die Summe der Zahlen auf den Diagonalen 101 ist. -What is the sum of the numbers on the diagonals in an `n` by `n` spiral formed in the same way? +Wie hoch ist die Summe der Zahlen auf den Diagonalen einer `n` mal `n`-Spirale, die auf die gleiche Weise gebildet wird? # --hints-- -`spiralDiagonals(101)` should return a number. +`spiralDiagonals(101)` sollte eine Zahl zurückgeben. ```js assert(typeof spiralDiagonals(101) === 'number'); ``` -`spiralDiagonals(101)` should return 692101. +`spiralDiagonals(101)` sollte 692101 zurückgeben. ```js assert(spiralDiagonals(101) == 692101); ``` -`spiralDiagonals(303)` should return 18591725. +`spiralDiagonals(303)` sollte 18591725 zurückgeben. ```js assert(spiralDiagonals(303) == 18591725); ``` -`spiralDiagonals(505)` should return 85986601. +`spiralDiagonals(505)` sollte 85986601 zurückgeben. ```js assert(spiralDiagonals(505) == 85986601); ``` -`spiralDiagonals(1001)` should return 669171001. +`spiralDiagonals(1001)` sollte 669171001 zurückgeben. ```js assert(spiralDiagonals(1001) == 669171001); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-29-distinct-powers.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-29-distinct-powers.md index 4b8f00162ee..1054d0adc61 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-29-distinct-powers.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-29-distinct-powers.md @@ -8,7 +8,7 @@ dashedName: problem-29-distinct-powers # --description-- -Consider all integer combinations of $a^b$ for 2 ≤ a ≤ 5 and 2 ≤ b ≤ 5: +Betrachte alle ganzzahligen Kombinationen von $a^b$ für 2 ≤ a ≤ 5 und 2 ≤ b ≤ 5:
                                                                                                                                                                  22=4, 23=8, 24=16, 25=32
                                                                                                                                                                  @@ -17,41 +17,41 @@ Consider all integer combinations of $a^b$ for 2 ≤ a ≤ 5 and 2 ≤ b ≤ 5: 52=25, 53=125, 54=625, 55=3125
                                                                                                                                                                  -If they are then placed in numerical order, with any repeats removed, we get the following sequence of 15 distinct terms: +Wenn man sie dann in numerischer Reihenfolge anordnet und Wiederholungen entfernt, erhält man die folgende Sequenz von 15 verschiedenen Begriffen:
                                                                                                                                                                  4, 8, 9, 16, 25, 27, 32, 64, 81, 125, 243, 256, 625, 1024, 3125
                                                                                                                                                                  -How many distinct terms are in the sequence generated by $a^b$ for 2 ≤ `a` ≤ `n` and 2 ≤ `b` ≤ `n`? +Wie viele verschiedene Begriffe sind in der durch $a^b$ erzeugten Sequenz für 2 ≤ `a` ≤ `n` und 2 ≤ `b` ≤ `n`? # --hints-- -`distinctPowers(15)` should return a number. +`distinctPowers(15)` sollte eine Zahl zurückgeben. ```js assert(typeof distinctPowers(15) === 'number'); ``` -`distinctPowers(15)` should return 177. +`distinctPowers(15)` sollte 177 zurückgeben. ```js assert.strictEqual(distinctPowers(15), 177); ``` -`distinctPowers(20)` should return 324. +`distinctPowers(20)` sollte 324 ergeben. ```js assert.strictEqual(distinctPowers(20), 324); ``` -`distinctPowers(25)` should return 519. +`distinctPowers(25)` sollte 519 zurückgeben. ```js assert.strictEqual(distinctPowers(25), 519); ``` -`distinctPowers(30)` should return 755. +`distinctPowers(30)` sollte 755 zurückgeben. ```js assert.strictEqual(distinctPowers(30), 755); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-30-digit-n-powers.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-30-digit-n-powers.md index 1e7472bce84..45b61278c01 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-30-digit-n-powers.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-30-digit-n-powers.md @@ -8,7 +8,7 @@ dashedName: problem-30-digit-n-powers # --description-- -Surprisingly there are only three numbers that can be written as the sum of fourth powers of their digits: +Überraschenderweise gibt es nur drei Zahlen, die sich als Summe von vierten Potenzen ihrer Ziffern schreiben lassen:
                                                                                                                                                                  1634 = 14 + 64 + 34 + 44
                                                                                                                                                                  @@ -18,37 +18,37 @@ Surprisingly there are only three numbers that can be written as the sum of four As 1 = 14 is not a sum it is not included. -The sum of these numbers is 1634 + 8208 + 9474 = 19316. +Die Summe dieser Zahlen ist 1634 + 8208 + 9474 = 19316. -Find the sum of all the numbers that can be written as the sum of `n` powers of their digits. +Finde die Summe aller Zahlen, die sich als Summe von `n` Potenzen ihrer Ziffern schreiben lassen. # --hints-- -`digitnPowers(2)` should return a number. +`digitnPowers(2)` sollte eine Zahl zurückgeben. ```js assert(typeof digitnPowers(2) === 'number'); ``` -`digitnPowers(2)` should return 0. +`digitnPowers(2)` sollte 0 zurückgeben. ```js assert(digitnPowers(2) == 0); ``` -`digitnPowers(3)` should return 1301. +`digitnPowers(3)` sollte 1301 zurückgeben. ```js assert(digitnPowers(3) == 1301); ``` -`digitnPowers(4)` should return 19316. +`digitnPowers(4)` sollte 19316 zurückgeben. ```js assert(digitnPowers(4) == 19316); ``` -`digitnPowers(5)` should return 443839. +`digitnPowers(5)` sollte 443839 zurückgeben. ```js assert(digitnPowers(5) == 443839); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-31-coin-sums.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-31-coin-sums.md index ae4372cd69f..c2c65eb9c7e 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-31-coin-sums.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-31-coin-sums.md @@ -1,6 +1,6 @@ --- id: 5900f38b1000cf542c50fe9e -title: 'Problem 31: Coin sums' +title: 'Problem 31: Münzsummen' challengeType: 1 forumTopicId: 301965 dashedName: problem-31-coin-sums @@ -8,43 +8,43 @@ dashedName: problem-31-coin-sums # --description-- -In England the currency is made up of pound, £, and pence, p, and there are eight coins in general circulation: +In England besteht die Währung aus Pfund, £, und Pence, p, und es sind acht Münzen im Umlauf:
                                                                                                                                                                  1p, 2p, 5p, 10p, 20p, 50p, £1 (100p) and £2 (200p).
                                                                                                                                                                  -It is possible to make £2 in the following way: +Er kann £2 auf folgende Weise herstellen:
                                                                                                                                                                  1×£1 + 1×50p + 2×20p + 1×5p + 1×2p + 3×1p
                                                                                                                                                                  -How many different ways can `n` pence be made using any number of coins? +Wie viele verschiedene Möglichkeiten gibt es, `n` Pence aus einer beliebigen Anzahl von Münzen zu erhalten? # --hints-- -`coinSums(50)` should return a number. +`coinSums(50)` sollte eine Zahl zurückgeben. ```js assert(typeof coinSums(50) === 'number'); ``` -`coinSums(50)` should return 451. +`coinSums(50)` sollte 451 zurückgeben. ```js assert(coinSums(50) == 451); ``` -`coinSums(100)` should return 4563. +`coinSums(100)` sollte 4563 zurückgeben. ```js assert(coinSums(100) == 4563); ``` -`coinSums(150)` should return 21873. +`coinSums(150)` sollte 21873 zurückgeben. ```js assert(coinSums(150) == 21873); ``` -`coinSums(200)` should return 73682. +`coinSums(200)` sollte 73682 zurückgeben. ```js assert(coinSums(200) == 73682); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-32-pandigital-products.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-32-pandigital-products.md index 5fe7d0495c5..849aac9f202 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-32-pandigital-products.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-32-pandigital-products.md @@ -8,47 +8,47 @@ dashedName: problem-32-pandigital-products # --description-- -We shall say that an `n`-digit number is pandigital if it makes use of all the digits 1 to `n` exactly once; for example, the 5-digit number, 15234, is 1 through 5 pandigital. +Wir sagen, dass eine `n`-stellige Zahl pandigital ist, wenn sie alle Ziffern 1 bis `n` genau einmal verwendet; zum Beispiel ist die 5-stellige Zahl 15234 von 1 bis 5 pandigital. -The product 7254 is unusual, as the identity, 39 × 186 = 7254, containing multiplicand, multiplier, and product is 1 through 9 pandigital. +Das Produkt 7254 ist ungewöhnlich, da die Identität 39 × 186 = 7254, die Multiplikand, Multiplikator und Produkt enthält, 1 bis 9 pandigital ist. -Find the sum of all products whose multiplicand/multiplier/product identity can be written as a 1 through `n` pandigital. +Finde die Summe aller Produkte, deren Multiplikand/Multiplikator/Produkt-Identität als 1 durch `n` pandigital geschrieben werden kann. -**Hint:** Some products can be obtained in more than one way so be sure to only include it once in your sum. +**Hinweis:** Einige Produkte können auf mehr als eine Weise erhalten werden, also achte darauf darauf, dass du sie nur einmal in deine Summe miteinbeziehst. # --hints-- -`pandigitalProducts(4)` should return a number. +`pandigitalProducts(4)` sollte eine Zahl zurückgeben. ```js assert(typeof pandigitalProducts(4) === 'number'); ``` -`pandigitalProducts(4)` should return `12`. +`pandigitalProducts(4)` sollte `12` zurückgeben. ```js assert.strictEqual(pandigitalProducts(4), 12); ``` -`pandigitalProducts(6)` should return `162`. +`pandigitalProducts(6)` sollte `162` zurückgeben. ```js assert.strictEqual(pandigitalProducts(6), 162); ``` -`pandigitalProducts(7)` should return `0`. +`pandigitalProducts(7)` sollte `0` zurückgeben. ```js assert.strictEqual(pandigitalProducts(7), 0); ``` -`pandigitalProducts(8)` should return `13458`. +`pandigitalProducts(8)` sollte `13458` zurückgeben. ```js assert.strictEqual(pandigitalProducts(8), 13458); ``` -`pandigitalProducts(9)` should return `45228`. +`pandigitalProducts(9)` sollte `45228` zurückgeben. ```js assert.strictEqual(pandigitalProducts(9), 45228); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-341-golombs-self-describing-sequence.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-341-golombs-self-describing-sequence.md index f3ebbd9cdd0..6027ef3b7bf 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-341-golombs-self-describing-sequence.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-341-golombs-self-describing-sequence.md @@ -1,6 +1,6 @@ --- id: 5900f4c11000cf542c50ffd3 -title: 'Problem 341: Golomb''s self-describing sequence' +title: 'Problem 341: selbstbeschreibende Golomb-Folge' challengeType: 1 forumTopicId: 302000 dashedName: problem-341-golombs-self-describing-sequence diff --git a/curriculum/challenges/german/10-coding-interview-prep/take-home-projects/build-a-nightlife-coordination-app.md b/curriculum/challenges/german/10-coding-interview-prep/take-home-projects/build-a-nightlife-coordination-app.md index a6671adb9f2..8ced3c236fb 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/take-home-projects/build-a-nightlife-coordination-app.md +++ b/curriculum/challenges/german/10-coding-interview-prep/take-home-projects/build-a-nightlife-coordination-app.md @@ -22,7 +22,7 @@ Here are the specific user stories you should implement for this project: **Hint:** Try using the Yelp API to find venues in the cities your users search for. If you use Yelp's API, be sure to mention so in your app. -Wenn du fertig bist, stelle sicher, dass dein Projekt öffentlich zugänglich gehostet ist. Gib dann die URL in das `Solution Link`-Feld ein. Füge optional einen Link zum Quellcode deines Projekts in das `GitHub Link`-Feld ein. +Wenn du fertig bist, stelle sicher, dass dein Projekt öffentlich zugänglich gehostet ist. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --solutions-- diff --git a/curriculum/challenges/german/10-coding-interview-prep/take-home-projects/build-a-voting-app.md b/curriculum/challenges/german/10-coding-interview-prep/take-home-projects/build-a-voting-app.md index c5e1f8c05dd..e70b3566764 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/take-home-projects/build-a-voting-app.md +++ b/curriculum/challenges/german/10-coding-interview-prep/take-home-projects/build-a-voting-app.md @@ -28,7 +28,7 @@ Here are the specific user stories you should implement for this project: **User Story:** As an authenticated user, if you don't like the options on a poll, you can create a new option. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --solutions-- diff --git a/curriculum/challenges/german/10-coding-interview-prep/take-home-projects/build-an-image-search-abstraction-layer.md b/curriculum/challenges/german/10-coding-interview-prep/take-home-projects/build-an-image-search-abstraction-layer.md index 47cee2ababe..4c4540d7fce 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/take-home-projects/build-an-image-search-abstraction-layer.md +++ b/curriculum/challenges/german/10-coding-interview-prep/take-home-projects/build-an-image-search-abstraction-layer.md @@ -18,7 +18,7 @@ Here are the specific user stories you should implement for this project: **User Story:** You can get a list of the most recently submitted search strings. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --solutions-- diff --git a/curriculum/challenges/german/10-coding-interview-prep/take-home-projects/chart-the-stock-market.md b/curriculum/challenges/german/10-coding-interview-prep/take-home-projects/chart-the-stock-market.md index b291dbdbea4..aa20a51e06e 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/take-home-projects/chart-the-stock-market.md +++ b/curriculum/challenges/german/10-coding-interview-prep/take-home-projects/chart-the-stock-market.md @@ -20,7 +20,7 @@ Here are the specific user stories you should implement for this project: **User Story:** You can see changes in real-time when any other user adds or removes a stock. For this you will need to use Web Sockets. -Wenn du fertig bist, stelle sicher, dass dein Projekt öffentlich zugänglich gehostet ist. Gib dann die URL in das `Solution Link`-Feld ein. Füge optional einen Link zum Quellcode deines Projekts in das `GitHub Link`-Feld ein. +Wenn du fertig bist, stelle sicher, dass dein Projekt öffentlich zugänglich gehostet ist. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --solutions-- diff --git a/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/elements-and-tags-question-a.md b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/elements-and-tags-question-a.md new file mode 100644 index 00000000000..f4b05b12871 --- /dev/null +++ b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/elements-and-tags-question-a.md @@ -0,0 +1,54 @@ +--- +id: 637f4e0e72c65bc8e73dfe1e +videoId: LGQuIIv2RVA +title: Elements and Tags Question A +challengeType: 15 +dashedName: elements-and-tags-question-a +--- + +# --description-- + +Almost all elements on an HTML page are just pieces of content wrapped in opening and closing HTML tags. + +Opening tags tell the browser this is the start of an HTML element. They are comprised of a keyword enclosed in angle brackets `<>`. For example, an opening paragraph tag looks like this: `

                                                                                                                                                                  `. + +Closing tags tell the browser where an element ends. They are almost the same as opening tags; the only difference is that they have a forward slash before the keyword. For example, a closing paragraph tag looks like this: `

                                                                                                                                                                  `. + +A full paragraph element looks like this: + +element diagram + +You can think of elements as containers for content. The opening and closing tags tell the browser what content the element contains. The browser can then use that information to determine how it should interpret and format the content. + +There are some HTML elements that do not have a closing tag. These elements often look like this: `
                                                                                                                                                                  ` or ``, but some can also be used without the closing forward slash such as `
                                                                                                                                                                  ` or ``. These are known as self-closing tags or empty elements because they don’t wrap any content. You will encounter a few of these in later lessons, but for the most part, elements will have both opening and closing tags. + +HTML has a vast list of predefined tags that you can use to create all kinds of different elements. It is important to use the correct tags for content. Using the correct tags can have a big impact on two aspects of your sites: how they are ranked in search engines; and how accessible they are to users who rely on assistive technologies, like screen readers, to use the internet. + +Using the correct elements for content is called semantic HTML. You will explore this in much more depth later on in the curriculum. + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s [Introduction to HTML video](https://www.youtube.com/watch?v=LGQuIIv2RVA&list=PL4-IK0AVhVjM0xE0K2uZRvsM7LkIhsPT-) + +## --text-- + +What are HTML tags? + +## --answers-- + +HTML tags tell the browser what content an element contains. + +--- + +HTML tags tell the browser when to load its content. + +--- + +HTML tags tell the browser what content the next element contains. + + +## --video-solution-- + +1 diff --git a/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/elements-and-tags-question-b.md b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/elements-and-tags-question-b.md new file mode 100644 index 00000000000..9e8720616fb --- /dev/null +++ b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/elements-and-tags-question-b.md @@ -0,0 +1,50 @@ +--- +id: 637f4e1672c65bc8e73dfe1f +videoId: LGQuIIv2RVA +title: Elements and Tags Question B +challengeType: 15 +dashedName: elements-and-tags-question-b +--- + +# --description-- + +Almost all elements on an HTML page are just pieces of content wrapped in opening and closing HTML tags. + +Opening tags tell the browser this is the start of an HTML element. They are comprised of a keyword enclosed in angle brackets <>. For example, an opening paragraph tag looks like this: `

                                                                                                                                                                  `. + +Closing tags tell the browser where an element ends. They are almost the same as opening tags; the only difference is that they have a forward slash before the keyword. For example, a closing paragraph tag looks like this: `

                                                                                                                                                                  `. + +A full paragraph element looks like this: + +element diagram + +You can think of elements as containers for content. The opening and closing tags tell the browser what content the element contains. The browser can then use that information to determine how it should interpret and format the content. + +There are some HTML elements that do not have a closing tag. These elements often look like this: `
                                                                                                                                                                  ` or ``, but some can also be used without the closing forward slash such as `
                                                                                                                                                                  ` or ``. These are known as self-closing tags or empty elements because they don’t wrap any content. You will encounter a few of these in later lessons, but for the most part, elements will have both opening and closing tags. + +HTML has a vast list of predefined tags that you can use to create all kinds of different elements. It is important to use the correct tags for content. Using the correct tags can have a big impact on two aspects of your sites: how they are ranked in search engines; and how accessible they are to users who rely on assistive technologies, like screen readers, to use the internet. + +Using the correct elements for content is called semantic HTML. You will explore this in much more depth later on in the curriculum. + +# --question-- + +## --text-- + +What are the three parts of most HTML elements? + +## --answers-- + +An opening tag, self closing tag, and content. + +--- + +An opening tag, closing tag, and content. + +--- + +An opening tag, closing tag, and attribute. + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/html-boilerplate-question-a.md b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/html-boilerplate-question-a.md new file mode 100644 index 00000000000..d563ebf0ac3 --- /dev/null +++ b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/html-boilerplate-question-a.md @@ -0,0 +1,55 @@ +--- +id: 637f4e1c72c65bc8e73dfe20 +videoId: V8UAEoOvqFg +title: HTML Boilerplate Question A +challengeType: 15 +dashedName: html-boilerplate-question-a +--- + +# --description-- + +To demonstrate an HTML boilerplate, you first need an HTML file to work with. + +Create a new folder on your computer and name it `html-boilerplate`. Within that folder create a new file and name it `index.html`. + +You’re probably already familiar with a lot of different types of files, for example doc, pdf, and image files. + +To let the computer know you want to create an HTML file, you need to append the filename with the `.html` extension as you have done when creating the `index.html` file. + +It is worth noting that you named your HTML file index. You should always name the HTML file that will contain the homepage of your websites `index.html`. This is because web servers will by default look for an index.html page when users land on your websites - and not having one will cause big problems. + +## The DOCTYPE + +Every HTML page starts with a doctype declaration. The doctype’s purpose is to tell the browser what version of HTML it should use to render the document. The latest version of HTML is HTML5, and the doctype for that version is simply ``. + +The doctypes for older versions of HTML were a bit more complicated. For example, this is the doctype declaration for HTML4: + +```html + +``` + +However, you probably won’t ever want to be using an older version of HTML, and so you’ll always use ``. + +Open the `index.html` file created earlier in your text editor and add `` to the very first line. + +# --question-- +## --text-- + +What is the purpose of the `DOCTYPE` declaration? + +## --answers-- + +It tells the browser which version of HTML to use to render the document. + +--- + +It tells the browser that this document uses JavaScript. + +--- + +It tells the browser the title of the document. + + +## --video-solution-- + +1 diff --git a/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/html-boilerplate-question-b.md b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/html-boilerplate-question-b.md new file mode 100644 index 00000000000..7a528432239 --- /dev/null +++ b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/html-boilerplate-question-b.md @@ -0,0 +1,47 @@ +--- +id: 637f4e2872c65bc8e73dfe21 +videoId: V8UAEoOvqFg +title: HTML Boilerplate Question B +challengeType: 15 +dashedName: html-boilerplate-question-b +--- + +# --description-- + +After you declare the doctype, you need to provide an `` element. This is what’s known as the root element of the document, meaning that every other element in the document will be a descendant of it. + +This becomes more important later on when you learn about manipulating HTML with JavaScript. For now, just know that the `html` element should be included on every HTML document. + +Back in the `index.html` file, let’s add the `` element by typing out its opening and closing tags, like so: + +```html + + + +``` + +## What is the lang attribute? +`lang` specifies the language of the text content in that element. This attribute is primarily used for improving accessibility of the webpage. It allows assistive technologies, for example screen readers, to adapt according to the language and invoke correct pronunciation. + +# --question-- + +## --text-- + +What is the `html` element? + +## --answers-- + +It is the root element in the document and tells the browser which version of HTML it should use. + +--- + +It is the root element in the document and all other elements should descend from it. + +--- + +It is the root element in the document and all other elements should come after it. + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/html-boilerplate-question-c.md b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/html-boilerplate-question-c.md new file mode 100644 index 00000000000..76ceb2841e5 --- /dev/null +++ b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/html-boilerplate-question-c.md @@ -0,0 +1,66 @@ +--- +id: 637f4e2f72c65bc8e73dfe22 +videoId: LGQuIIv2RVA +title: HTML Boilerplate Question C +challengeType: 15 +dashedName: html-boilerplate-question-c +--- + +# --description-- + +The `` element is where you put important meta-information about your webpages, and stuff required for your webpages to render correctly in the browser. Inside the ``, you should not use any element that displays content on the webpage. + +## The Charset Meta Element +You should always have the `meta` tag for the charset encoding of the webpage in the head element: ``. + +Setting the encoding is very important because it ensures that the webpage will display special symbols and characters from different languages correctly in the browser. + +## Title Element +Another element you should always include in the head of an HTML document is the `title` element: + +```html +My First Webpage +``` + +The `title` element is used to give webpages a human-readable title which is displayed in your webpage’s browser tab. + +If you didn’t include a `title` element, the webpage’s title would default to its file name. In your case that would be `index.html`, which isn’t very meaningful for users; this would make it very difficult to find your webpage if the user has many browser tabs open. + +There are many more elements that can go within the `head` of an HTML document. However, for now it’s only crucial to know about the two elements you have covered here. You will introduce more elements that go into the `head` throughout the rest of the curriculum. + +Back in `index.html` file, let’s add a `head` element with a `charset` `meta` element and a `title` within it. The head element goes within the HTML element and should always be the first element under the opening `` tag: + + +```html + + + + + + My First Webpage + + +``` + +# --question-- + +## --text-- + +What is the purpose of the `head` element? + +## --answers-- + +The `head` element is used to display all elements that are displayed on the webpage. + +--- + +The `head` element is used to display important information about your webpage and is used to render web pages correctly with `meta` elements. + +--- + +The `head` element is used to display the header content on top of the webpage. + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/html-boilerplate-question-d.md b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/html-boilerplate-question-d.md new file mode 100644 index 00000000000..302b6a95d44 --- /dev/null +++ b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/html-boilerplate-question-d.md @@ -0,0 +1,48 @@ +--- +id: 637f4e3672c65bc8e73dfe23 +videoId: V8UAEoOvqFg +title: HTML Boilerplate Question D +challengeType: 15 +dashedName: html-boilerplate-question-d +--- + +# --description-- + +The final element needed to complete the HTML boilerplate is the `` element. This is where all the content that will be displayed to users will go - the text, images, lists, links, and so on. + +To complete the boilerplate, add a `body` element to the `index.html` file. The `body` element also goes within the `html` element and is always below the `head` element, like so: + +# --question-- + +## --assignment-- + +Watch and follow along to Kevin Powell’s brilliant Building your first web page video above. + +--- + +Build some muscle memory by deleting the contents of the `index.html` file and trying to write out all the boilerplate again from memory. Don’t worry if you have to peek at the lesson content the first few times if you get stuck. Just keep going until you can do it a couple of times from memory. + +--- + +Run your boilerplate through this [HTML validator](https://www.freeformatter.com/html-validator.html). Validators ensure your markup is correct and are an excellent learning tool, as they provide feedback on syntax errors you may be making often and aren’t aware of, such as missing closing tags and extra spaces in your HTML. + +## --text-- + +What is the purpose of the `body` element? + +## --answers-- + +This is where all important information about the webpage is displayed such as the `title` and `meta` tags. + +--- + +This is where you tell the browser how to render the webpage correctly. + +--- + +This is where all content will be displayed on the page such images, text, and links. + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-a.md b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-a.md new file mode 100644 index 00000000000..aa20f137e89 --- /dev/null +++ b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-a.md @@ -0,0 +1,42 @@ +--- +id: 6374f208de18c50e48ba767b +videoId: LGQuIIv2RVA +title: Introduction To HTML and CSS Question A +challengeType: 15 +dashedName: introduction-to-html-and-css-question-a +--- + +# --description-- + +HTML and CSS are two languages that work together to create everything that you see when you look at something on the internet. HTML is the raw data that a webpage is built out of. All the text, links, cards, lists, and buttons are created in HTML. CSS is what adds style to those plain elements. HTML puts information on a webpage, and CSS positions that information, gives it color, changes the font, and makes it look great! + +Many helpful resources out there keep referring to HTML and CSS as programming languages, but if you want to get technical, labeling them as such is not quite accurate. This is because they are only concerned with presenting information. They are not used to program logic. JavaScript, which you will learn in the next section, is a programming language because it’s used to make webpages do things. Yet, there is quite a lot you can do with just HTML and CSS, and you will definitely need them both. Throughout our curriculum, the following lessons focus on giving you the tools you need to succeed once you reach JavaScript content. + +# --question-- + +## --assignment-- + +Read the HTML vs CSS vs JavaScript article. It is a quick overview of the relationships between HTML, CSS, and JavaScript. + +## --text-- + +Which of the following statements is true? + +## --answers-- + +CSS is used to create the basic structure of a webpage, and HTML is used to add style. + +--- + +HTML is used to create the basic structure of a webpage, and CSS is used to add style. + +--- + +HTML and CSS are used to add style to a webpage, and JavaScript is used to create the basic structure. + + +## --video-solution-- + +2 + + diff --git a/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-b.md b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-b.md new file mode 100644 index 00000000000..cd9cf900330 --- /dev/null +++ b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-b.md @@ -0,0 +1,37 @@ +--- +id: 6376327e2724a688c04636e3 +videoId: LGQuIIv2RVA +title: Introduction To HTML and CSS Question B +challengeType: 15 +dashedName: introduction-to-html-and-css-question-b +--- + +# --description-- + + +HTML and CSS are two languages that work together to create everything that you see when you look at something on the internet. HTML is the raw data that a webpage is built out of. All the text, links, cards, lists, and buttons are created in HTML. CSS is what adds style to those plain elements. HTML puts information on a webpage, and CSS positions that information, gives it color, changes the font, and makes it look great! + +Many helpful resources out there keep referring to HTML and CSS as programming languages, but if you want to get technical, labeling them as such is not quite accurate. This is because they are only concerned with presenting information. They are not used to program logic. JavaScript, which you will learn in the next section, is a programming language because it’s used to make webpages do things. Yet, there is quite a lot you can do with just HTML and CSS, and you will definitely need them both. Throughout our curriculum, the following lessons focus on giving you the tools you need to succeed once you reach JavaScript content. + +# --question-- + +## --text-- + +Between HTML and CSS, which should you use to add paragraphs of text on a webpage? + +## --answers-- + +CSS + +--- + +JavaScript + +--- + +HTML + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-c.md b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-c.md new file mode 100644 index 00000000000..eb759394680 --- /dev/null +++ b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-c.md @@ -0,0 +1,34 @@ +--- +id: 637633162724a688c04636e4 +videoId: LGQuIIv2RVA +title: Introduction To HTML and CSS Question C +challengeType: 15 +dashedName: introduction-to-html-and-css-question-c +--- + +# --description-- + +HTML and CSS are two languages that work together to create everything that you see when you look at something on the internet. HTML is the raw data that a webpage is built out of. All the text, links, cards, lists, and buttons are created in HTML. CSS is what adds style to those plain elements. HTML puts information on a webpage, and CSS positions that information, gives it color, changes the font, and makes it look great! + +Many helpful resources out there keep referring to HTML and CSS as programming languages, but if you want to get technical, labeling them as such is not quite accurate. This is because they are only concerned with presenting information. They are not used to program logic. JavaScript, which you will learn in the next section, is a programming language because it’s used to make webpages do things. Yet, there is quite a lot you can do with just HTML and CSS, and you will definitely need them both. Throughout our curriculum, the following lessons focus on giving you the tools you need to succeed once you reach JavaScript content. +# --question-- + +## --text-- + +Between HTML and CSS, which should you use to change the font and background color of a button? + +## --answers-- + +You should use CSS to change the background color and font of a button. + +--- + +You should use JavaScript to change the background color and font of a button. + +--- + +You should use HTML to change the background color and font of a button. + +## --video-solution-- + +1 diff --git a/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-d.md b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-d.md new file mode 100644 index 00000000000..9e9ee049b75 --- /dev/null +++ b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-d.md @@ -0,0 +1,35 @@ +--- +id: 637633672724a688c04636e5 +videoId: LGQuIIv2RVA +title: Introduction To HTML and CSS Question D +challengeType: 15 +dashedName: introduction-to-html-and-css-question-d +--- + +# --description-- + +HTML and CSS are two languages that work together to create everything that you see when you look at something on the internet. HTML is the raw data that a webpage is built out of. All the text, links, cards, lists, and buttons are created in HTML. CSS is what adds style to those plain elements. HTML puts information on a webpage, and CSS positions that information, gives it color, changes the font, and makes it look great! + +Many helpful resources out there keep referring to HTML and CSS as programming languages, but if you want to get technical, labeling them as such is not quite accurate. This is because they are only concerned with presenting information. They are not used to program logic. JavaScript, which you will learn in the next section, is a programming language because it’s used to make webpages do things. Yet, there is quite a lot you can do with just HTML and CSS, and you will definitely need them both. Throughout our curriculum, the following lessons focus on giving you the tools you need to succeed once you reach JavaScript content. + +# --question-- + +## --text-- + +What is the difference between HTML, CSS, and JavaScript? + +## --answers-- + +HTML is for creating interactive elements, CSS is for the look and feel, and JavaScript is for creating the structure of a webpage. + +--- + +CSS is for the look and feel, JavaScript is for creating interactive elements, and HTML is for creating the structure of a webpage. + +--- + +JavaScript is for the look and feel, CSS is for creating the structure, and HTML is for creating interactive elements of a webpage. + +## --video-solution-- + +2 diff --git a/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/links-and-images-question-a.md b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/links-and-images-question-a.md new file mode 100644 index 00000000000..b4d237448f3 --- /dev/null +++ b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/links-and-images-question-a.md @@ -0,0 +1,66 @@ +--- +id: 637f704072c65bc8e73dfe36 +videoId: tsEQgGjSmkM +title: Links and Images Question A +challengeType: 15 +dashedName: links-and-images-question-a +--- + +# --description-- + +To get some practice using links and images throughout this lesson you need an HTML project to work with. + +- Create a new directory named `odin-links-and-images`. + +- Within that directory, create a new file named `index.html`. + +- Fill in the usual HTML boilerplate. + +- Finally, add the following `h1` to the `body`: `

                                                                                                                                                                  Homepage

                                                                                                                                                                  ` + +## Anchor Elements +To create a link in HTML, you use the anchor element. An anchor element is defined by wrapping the text or another HTML element you want to be a link with an `` tag. Add the following to the `body` of the `index.html` page you created and open it in the browser: + +```html +click me +``` + +You may have noticed that clicking this link doesn’t do anything. This is because an anchor tag on its own won’t know where you want to link to. You have to tell it a destination to go to. You do this by using an HTML attribute. + +An HTML attribute gives additional information to an HTML element and always goes in the element’s opening tag. An attribute is usually made up of two parts: a name, and a value; however, not all attributes require a value. In your case, you need to add a `href` (hyperlink reference) attribute to the opening anchor tag. The value of the `href` attribute is the destination you want your link to go to. + +Add the following `href` attribute to the anchor element you created previously and try clicking it again, don’t forget to refresh the browser so the new changes can be applied. + +```html +click me +``` + +By default, any text wrapped with an anchor tag without a `href` attribute will look like plain text. If the `href` attribute is present, the browser will give the text a blue color and underline it to signify it is a link. + +It’s worth noting you can use anchor tags to link to any kind of resource on the internet, not just other HTML documents. You can link to videos, pdf files, images, and so on, but for the most part, you will be linking to other HTML documents. + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s HTML Links video above. + +## --text-- + +What HTML tag is used to create a link? + +## --answers-- + +`` + +--- + +`

                                                                                                                                                                  ` + +--- + +`

                                                                                                                                                                    ` + +## --video-solution-- + +1 diff --git a/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/links-and-images-question-b.md b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/links-and-images-question-b.md new file mode 100644 index 00000000000..164fb01214f --- /dev/null +++ b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/links-and-images-question-b.md @@ -0,0 +1,55 @@ +--- +id: 637f703572c65bc8e73dfe35 +videoId: tsEQgGjSmkM +title: Links and Images Question B +challengeType: 15 +dashedName: links-and-images-question-b +--- + +# --description-- + +To get some practice using links and images throughout this lesson you need an HTML project to work with. + +- Create a new directory named odin-links-and-images. + +- Within that directory, create a new file named index.html. + +- Fill in the usual HTML boilerplate. + +- finally, add the following h1 to the body: `

                                                                                                                                                                    Homepage

                                                                                                                                                                    ` + +## Anchor Elements +To create a link in HTML, you use the anchor element. An anchor element is defined by wrapping the text or another HTML element you want to be a link with an `
                                                                                                                                                                    ` tag. Add the following to the body of the index.html page you created and open it in the browser: + +```html +click me +``` + +You may have noticed that clicking this link doesn’t do anything. This is because an anchor tag on its own won’t know where you want to link to. You have to tell it a destination to go to. You do this by using an HTML attribute. An HTML attribute gives additional information to an HTML element and always goes in the element’s opening tag. An attribute is usually made up of two parts: a name, and a value; however, not all attributes require a value. In your case, you need to add a href (hyperlink reference) attribute to the opening anchor tag. The value of the href attribute is the destination you want your link to go to. Add the following href attribute to the anchor element you created previously and try clicking it again, don’t forget to refresh the browser so the new changes can be applied. + +```html +click me +``` + +By default, any text wrapped with an anchor tag without a `href` attribute will look like plain text. If the `href` attribute is present, the browser will give the text a blue color and underline it to signify it is a link. It’s worth noting you can use anchor tags to link to any kind of resource on the internet, not just other HTML documents. You can link to videos, pdf files, images, and so on, but for the most part, you will be linking to other HTML documents. + +# --question-- +## --text-- + +What is an attribute? +## --answers-- + +An HTML attribute gives additional information to an HTML element and always goes in the element’s closing tag. + +--- + +An HTML attribute is used to tell the browser what the element contains. + +--- + +An HTML attribute gives additional information to an HTML element and always goes in the element’s opening tag. + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/links-and-images-question-c.md b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/links-and-images-question-c.md new file mode 100644 index 00000000000..c8a3913d77e --- /dev/null +++ b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/links-and-images-question-c.md @@ -0,0 +1,56 @@ +--- +id: 637f703072c65bc8e73dfe34 +videoId: tsEQgGjSmkM +title: Links and Images Question C +challengeType: 15 +dashedName: links-and-images-question-c +--- + +# --description-- + +To get some practice using links and images throughout this lesson you need an HTML project to work with. + +- Create a new directory named odin-links-and-images. + +- Within that directory, create a new file named index.html. + +- Fill in the usual HTML boilerplate. + +- finally, add the following h1 to the body: `

                                                                                                                                                                    Homepage

                                                                                                                                                                    ` + +## Anchor Elements +To create a link in HTML, you use the anchor element. An anchor element is defined by wrapping the text or another HTML element you want to be a link with an `` tag. Add the following to the body of the index.html page you created and open it in the browser: + +```html +click me +``` + +You may have noticed that clicking this link doesn’t do anything. This is because an anchor tag on its own won’t know where you want to link to. You have to tell it a destination to go to. You do this by using an HTML attribute. An HTML attribute gives additional information to an HTML element and always goes in the element’s opening tag. An attribute is usually made up of two parts: a name, and a value; however, not all attributes require a value. In your case, you need to add a href (hyperlink reference) attribute to the opening anchor tag. The value of the href attribute is the destination you want your link to go to. Add the following href attribute to the anchor element you created previously and try clicking it again, don’t forget to refresh the browser so the new changes can be applied. + +```html +click me +``` + +By default, any text wrapped with an anchor tag without a `href` attribute will look like plain text. If the `href` attribute is present, the browser will give the text a blue color and underline it to signify it is a link. It’s worth noting you can use anchor tags to link to any kind of resource on the internet, not just other HTML documents. You can link to videos, pdf files, images, and so on, but for the most part, you will be linking to other HTML documents. + +# --question-- + +## --text-- + +What attribute tells links where to go to? + +## --answers-- + +`src` + +--- + +`href` + +--- + +`link` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/links-and-images-question-d.md b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/links-and-images-question-d.md new file mode 100644 index 00000000000..2b6a665eb87 --- /dev/null +++ b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/links-and-images-question-d.md @@ -0,0 +1,112 @@ +--- +id: 637f702872c65bc8e73dfe33 +videoId: ta3Oxx7Yqbo +title: Links and Images Question D +challengeType: 15 +dashedName: links-and-images-question-d +--- + +# --description-- + + +Generally, there are two kinds of links you will create: + +- Links to pages on other websites on the internet + +- Links to pages located on your own websites + + +## Absolute Links +Links to pages on other websites on the internet are called absolute links. A typical absolute link will be made up of the following parts: `protocol://domain/path`. An absolute link will always contain the protocol and domain of the destination. + +You’ve already seen an absolute link in action. The link you created to The Odin Project’s About page earlier was an absolute link as it contains the protocol and domain. + +`https://www.theodinproject.com/about` + +## Relative Links +Links to other pages within your own website are called relative links. Relative links do not include the domain name, since it is another page on the same site, it assumes the domain name will be the same as the page you created the link on. + +Relative links only include the file path to the other page, relative to the page you are creating the link on. This is quite abstract, let’s see this in action using an example. + +Within the `odin-links-and-images` directory, create another HTML file named `about.html` and paste the following code into it: + +```html + + + + + Odin Links and Images + + + +

                                                                                                                                                                    About Page

                                                                                                                                                                    + + +``` + +Back in the index page, add the following anchor element to create a link to the about page: + +```html + +

                                                                                                                                                                    Homepage

                                                                                                                                                                    + click me + + About + +``` + +Open the index file in a browser and click on the about link to make sure it is all wired together correctly. Clicking the link should go to the about page you just created. + +This works because the index and about page are in the same directory. That means you can simply use its name (`about.html`) as the link’s href value. + +But you will usually want to organize your website directories a little better. Normally you would only have the `index.html` at the root directory and all other HTML files in their own directory. + +Create a directory named `pages` within the `odin-links-and-images` directory and move the `about.html` file into this new directory. + +Refresh the index page in the browser and then click on the about link. It will now be broken. This is because the location of the about page file has changed. + +To fix this, you just need to update the about link `href` value to include the `pages/` directory since that is the new location of the about file relative to the index file. + +```html + +

                                                                                                                                                                    Homepage

                                                                                                                                                                    + About + +``` + +Refresh the index page in the browser and try clicking the about link again, it should now be back in working order. + +In many cases, this will work just fine; however, you can still run into unexpected issues with this approach. Prepending `./` before the link will in most cases prevent such issues. By adding `./` you are specifying to your code that it should start looking for the file/directory relative to the **current** directory. + +```html + +

                                                                                                                                                                    Homepage

                                                                                                                                                                    + About + +``` + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s HTML File Structure video above. + +## --text-- + +What is the difference between an absolute and a relative link? + +## --answers-- + +An absolute link is a link to another page on the current website. A relative link is a link to another website. + +--- + +An absolute link is a link to another website. A relative link is a link another page on the current website. + +--- + +There is no difference between absolute and relative links. + +## --video-solution-- + +2 diff --git a/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/links-and-images-question-e.md b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/links-and-images-question-e.md new file mode 100644 index 00000000000..a935ae3262a --- /dev/null +++ b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/links-and-images-question-e.md @@ -0,0 +1,98 @@ +--- +id: 637f702372c65bc8e73dfe32 +videoId: 0xoztJCHpbQ +title: Links and Images Question E +challengeType: 15 +dashedName: links-and-images-question-e +--- + +# --description-- + +Websites would be fairly boring if they could only display text. Luckily HTML provides a wide variety of elements for displaying all sorts of different media. The most widely used of these is the image element. + +To display an image in HTML you use the `` element. Unlike the other elements you have encountered, the `` element is self-closing. Empty, self-closing HTML elements do not need a closing tag. + +Instead of wrapping content with an opening and closing tag, it embeds an image into the page using a `src` attribute which tells the browser where the image file is located. The `src` attribute works much like the `href` attribute for anchor tags. It can embed an image using both absolute and relative paths. + +For example, using an absolute path you can display an image located on The Odin Project site: + + + +To use images that you have on your own websites, you can use a relative path. + +- Create a new directory named `images` within the `odin-links-and-images` project. + +- Next, download [this image](https://unsplash.com/photos/Mv9hjnEUHR4/download?force=true&w=640) and move it into the `images` directory you just created. + +- Rename the image to `dog.jpg`. + +Finally add the image to the `index.html` file: + +```html + +

                                                                                                                                                                    Homepage

                                                                                                                                                                    + click me + + About + + + +``` + +Save the `index.html` file and open it in a browser to view Charles in all his glory. + + +## Parent Directories + +What if you want to use the dog image in the about page? You would first have to go up one level out of the pages directory into its parent directory so you could then access the images directory. + +To go to the parent directory you need to use two dots in the relative filepath like this: `../.` Let’s see this in action, within the body of the `about.html` file, add the following image below the heading you added earlier: + +```html + +``` + +To break this down: + +- First, you are going to the parent directory of the pages directory which is `odin-links-and-images`. + +- Then, from the parent directory, you can go into the `images` directory. + +- Finally, you can access the `dog.jpg` file. + +Using the metaphor we used earlier, using `../` in a filepath is kind of like stepping out from the room you are currently in to the main hallway so you can go to another room. + +## `Alt` attribute + +Besides the `src` attribute, every image element should also have an `alt` (alternative text) attribute. + +The `alt` attribute is used to describe an image. It will be used in place of the image if it cannot be loaded. It is also used with screen readers to describe what the image is to visually impaired users. + +This is how the The Odin Project logo example you used earlier looks with an `alt` attribute included: + + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s HTML Images Video above. + +## --text-- + +Which tag is used to display an image? + +## --answers-- + +`` + +--- + +`` + +--- + +`` + +## --video-solution-- + +3 diff --git a/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/links-and-images-question-f.md b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/links-and-images-question-f.md new file mode 100644 index 00000000000..ba4eb809e5d --- /dev/null +++ b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/links-and-images-question-f.md @@ -0,0 +1,94 @@ +--- +id: 637f701c72c65bc8e73dfe31 +videoId: 0xoztJCHpbQ +title: Links and Images Question F +challengeType: 15 +dashedName: links-and-images-question-f +--- + +# --description-- + +Websites would be fairly boring if they could only display text. Luckily HTML provides a wide variety of elements for displaying all sorts of different media. The most widely used of these is the image element. + +To display an image in HTML you use the `` element. Unlike the other elements you have encountered, the `` element is self-closing. Empty, self-closing HTML elements do not need a closing tag. + +Instead of wrapping content with an opening and closing tag, it embeds an image into the page using a src attribute which tells the browser where the image file is located. The src attribute works much like the href attribute for anchor tags. It can embed an image using both absolute and relative paths. + +For example, using an absolute path you can display an image located on The Odin Project site: + + + +To use images that you have on your own websites, you can use a relative path. + +- Create a new directory named `images` within the `odin-links-and-images` project. + +- Next, download [this image](https://unsplash.com/photos/Mv9hjnEUHR4/download?force=true&w=640) and move it into the images directory you just created. + +- Rename the image to `dog.jpg`. + +Finally add the image to the `index.html` file: + +```html + +

                                                                                                                                                                    Homepage

                                                                                                                                                                    +
                                                                                                                                                                    click me + + About + + + +``` + +Save the `index.html` file and open it in a browser to view Charles in all his glory. + + +## Parent Directories + +What if you want to use the dog image in the about page? You would first have to go up one level out of the pages directory into its parent directory so you could then access the images directory. + +To go to the parent directory you need to use two dots in the relative filepath like this: `../.` Let’s see this in action, within the body of the `about.html` file, add the following image below the heading you added earlier: + +```html + +``` + +To break this down: + +- First, you are going to the parent directory of the pages directory which is `odin-links-and-images`. + +- Then, from the parent directory, you can go into the `images` directory. + +- Finally, you can access the `dog.jpg` file. + +Using the metaphor we used earlier, using `../` in a filepath is kind of like stepping out from the room you are currently in to the main hallway so you can go to another room. + +## Alt attribute + +Besides the src attribute, every image element should also have an alt (alternative text) attribute. + +The alt attribute is used to describe an image. It will be used in place of the image if it cannot be loaded. It is also used with screen readers to describe what the image is to visually impaired users. + +This is how the The Odin Project logo example you used earlier looks with an alt attribute included: + + +# --question-- + +## --text-- + +What two attributes do images always need to have? + +## --answers-- + +`href` and `alt` + +--- + +`name` and `href` + +--- + +`alt` and `src` + +## --video-solution-- + +3 diff --git a/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/links-and-images-question-g.md b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/links-and-images-question-g.md new file mode 100644 index 00000000000..d1a6fcd4406 --- /dev/null +++ b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/links-and-images-question-g.md @@ -0,0 +1,94 @@ +--- +id: 637f701572c65bc8e73dfe30 +videoId: 0xoztJCHpbQ +title: Links and Images Question G +challengeType: 15 +dashedName: links-and-images-question-g +--- + +# --description-- + +Websites would be fairly boring if they could only display text. Luckily HTML provides a wide variety of elements for displaying all sorts of different media. The most widely used of these is the image element. + +To display an image in HTML you use the `` element. Unlike the other elements you have encountered, the `` element is self-closing. Empty, self-closing HTML elements do not need a closing tag. + +Instead of wrapping content with an opening and closing tag, it embeds an image into the page using a src attribute which tells the browser where the image file is located. The src attribute works much like the href attribute for anchor tags. It can embed an image using both absolute and relative paths. + +For example, using an absolute path you can display an image located on The Odin Project site: + + + +To use images that you have on your own websites, you can use a relative path. + +- Create a new directory named `images` within the `odin-links-and-images` project. + +- Next, download [this image](https://unsplash.com/photos/Mv9hjnEUHR4/download?force=true&w=640) and move it into the images directory you just created. + +- Rename the image to `dog.jpg`. + +Finally add the image to the `index.html` file: + +```html + +

                                                                                                                                                                    Homepage

                                                                                                                                                                    + click me + + About + + + +``` + +Save the `index.html` file and open it in a browser to view Charles in all his glory. + + +## Parent Directories + +What if you want to use the dog image in the about page? You would first have to go up one level out of the pages directory into its parent directory so you could then access the images directory. + +To go to the parent directory you need to use two dots in the relative filepath like this: `../.` Let’s see this in action, within the body of the `about.html` file, add the following image below the heading you added earlier: + +```html + +``` + +To break this down: + +- First, you are going to the parent directory of the pages directory which is `odin-links-and-images`. + +- Then, from the parent directory, you can go into the `images` directory. + +- Finally, you can access the `dog.jpg` file. + +Using the metaphor we used earlier, using `../` in a filepath is kind of like stepping out from the room you are currently in to the main hallway so you can go to another room. + +## Alt attribute + +Besides the src attribute, every image element should also have an alt (alternative text) attribute. + +The alt attribute is used to describe an image. It will be used in place of the image if it cannot be loaded. It is also used with screen readers to describe what the image is to visually impaired users. + +This is how the The Odin Project logo example you used earlier looks with an alt attribute included: + + +# --question-- + +## --text-- + +How do you access a parent directory in a filepath? + +## --answers-- + +`../` + +--- + +`./` + +--- + +`.../` + +## --video-solution-- + +1 diff --git a/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/links-and-images-question-h.md b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/links-and-images-question-h.md new file mode 100644 index 00000000000..cfd73fcfbc1 --- /dev/null +++ b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/links-and-images-question-h.md @@ -0,0 +1,98 @@ +--- +id: 637f700b72c65bc8e73dfe2f +videoId: 0xoztJCHpbQ +title: Links and Images Question H +challengeType: 15 +dashedName: links-and-images-question-h +--- + +# --description-- + +Websites would be fairly boring if they could only display text. Luckily HTML provides a wide variety of elements for displaying all sorts of different media. The most widely used of these is the image element. + +To display an image in HTML you use the `` element. Unlike the other elements you have encountered, the `` element is self-closing. Empty, self-closing HTML elements do not need a closing tag. + +Instead of wrapping content with an opening and closing tag, it embeds an image into the page using a src attribute which tells the browser where the image file is located. The src attribute works much like the href attribute for anchor tags. It can embed an image using both absolute and relative paths. + +For example, using an absolute path you can display an image located on The Odin Project site: + + + +To use images that you have on your own websites, you can use a relative path. + +- Create a new directory named `images` within the `odin-links-and-images` project. + +- Next, download [this image](https://unsplash.com/photos/Mv9hjnEUHR4/download?force=true&w=640) and move it into the images directory you just created. + +- Rename the image to `dog.jpg`. + +Finally add the image to the `index.html` file: + +```html + +

                                                                                                                                                                    Homepage

                                                                                                                                                                    + click me + + About + + + +``` + +Save the `index.html` file and open it in a browser to view Charles in all his glory. + + +## Parent Directories + +What if you want to use the dog image in the about page? You would first have to go up one level out of the pages directory into its parent directory so you could then access the images directory. + +To go to the parent directory you need to use two dots in the relative filepath like this: `../.` Let’s see this in action, within the body of the `about.html` file, add the following image below the heading you added earlier: + +```html + +``` + +To break this down: + +- First, you are going to the parent directory of the pages directory which is `odin-links-and-images`. + +- Then, from the parent directory, you can go into the `images` directory. + +- Finally, you can access the `dog.jpg` file. + +Using the metaphor we used earlier, using `../` in a filepath is kind of like stepping out from the room you are currently in to the main hallway so you can go to another room. + +## Alt attribute + +Besides the src attribute, every image element should also have an alt (alternative text) attribute. + +The alt attribute is used to describe an image. It will be used in place of the image if it cannot be loaded. It is also used with screen readers to describe what the image is to visually impaired users. + +This is how the The Odin Project logo example you used earlier looks with an alt attribute included: + + +# --question-- + +## --assignment-- + +Read about the four main image formats that can be used on the web. + +## --text-- + +What are the four main image formats that you can use for images on the web? + +## --answers-- + +TIFF, GIF, PNG, and SVG. + +--- + +JPG, PNG, GIF, and SVG. + +--- + +JPG, PDF, SVG, and GIF. + +## --video-solution-- + +2 diff --git a/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/project-create-a-recipe-page.md b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/project-create-a-recipe-page.md new file mode 100644 index 00000000000..657a3f6e32d --- /dev/null +++ b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/project-create-a-recipe-page.md @@ -0,0 +1,204 @@ +--- +id: 6391d1a4f7ac71efd0621380 +title: Build a Recipe Page Project +challengeType: 14 +dashedName: project-create-a-recipe-page +--- + +# --description-- + +The website will consist of a main index page which will have links to a few recipes. The website won’t look very pretty by the time you’ve finished. + +**User Stories:** + +1. Your recipe page should contain a `DOCTYPE` tag. +1. Your recipe page should include an `html` element with a `head` and `body` element as children. +1. You should have a `title` element within the `head` element with the text `The Odin Recipes`. +1. You should see an `h1` element that has the text `Creamy Chocolate Fudge`. +1. You should see an image with the url `*placeholder-fcc-cdn*` with a fitting `alt` text. +1. There should be an `h2` element with the text `Description` under the image. +1. You should see a couple of paragraphs under `Description` that describe the recipe. +1. There should be an `h2` element with the text `Ingredients` +1. Under the `Ingredients` heading there should be an unordered list with the ingredients needed for the recipe. +1. Under the list of ingredients add another heading called `Steps`. +1. You should see an ordered list with a couple of steps needed to complete the recipe. +1. Under the steps there should be an `h2` element with the text `More Recipes` +1. You should see a couple of links to other recipes inside an unordered list which has a couple of list items with anchor elements within. +1. These anchor elements should have `href` attribute with the value set to `#` + +# --hints-- + +You should have a `DOCTYPE` tag. + +```js +assert(code.match(//gi)); +``` + +You should have a `html` element with `head` and `body` element. + +```js +const html = document.querySelectorAll('html')[0]; +const head = document.querySelectorAll('html > head')[0]; +const body = document.querySelectorAll('html > body')[0]; + +assert(html && head && body); +``` + +You should have a `title` element within the `head` element that contains the text `The Odin Recipes`. + +```js +assert(document.querySelectorAll('HEAD > TITLE')[0].innerText == 'The Odin Recipes'); +``` + +You should have a `h1` element within your `body` element that contains the text `Creamy Chocolate Fudge`. + +```js +assert(document.querySelectorAll('BODY > H1')[0].innerText == 'Creamy Chocolate Fudge'); +``` + +You should have an image with the url `*placeholder-fcc-cdn*` with an `alt` attribute that has a fitting text. + +```js +const img = document.querySelectorAll('IMG')[0]; + +assert(img && img.alt !='' && img.src === 'https://i.imgur.com/p0J5baJ.jpg') +``` + +You should have an `h2` element with the text `Description`. + +```js +const h2 = document.querySelectorAll('H2')[0]; + +assert(h2.innerText == 'Description'); +``` + +You should have at least two `p` elements describing the recipe. + +```js +const paragraphs = document.querySelectorAll('P'); + +assert(paragraphs.length > 1); +``` + +You should have an `h2` element with the text `Ingredients`. + +```js +const h2 = document.querySelectorAll('H2')[1]; + +assert(h2.innerText == 'Ingredients'); +``` + +You should have an unordered list `
                                                                                                                                                                      ` with some ingredients as the list items `
                                                                                                                                                                    • `. + +```js +const unorderedList = document.querySelectorAll('UL')[0]; +const listItems = document.querySelectorAll('UL > LI'); + +assert(unorderedList && listItems && listItems.length > 1); +``` + +You should have an `h2` element with the text `Steps`. + +```js +const h2 = document.querySelectorAll('H2')[2]; + +assert(h2.innerText == 'Steps'); +``` + +You should have a `
                                                                                                                                                                        ` with the the steps as the list items `
                                                                                                                                                                      1. `. + +```js +const orderedList = document.querySelectorAll('OL')[0]; +const listItems = document.querySelectorAll('OL > LI'); + +assert(orderedList && listItems && listItems.length > 1); +``` + +You should have an `h2` element with the text `More Recipes`. + +```js +const h2 = document.querySelectorAll('H2')[3]; + +assert(h2.innerText == 'More Recipes'); +``` + +You should have an unordered list `
                                                                                                                                                                          ` element with list items `
                                                                                                                                                                        • ` that contain `` tags which lead to other recipes. + +```js +const unorderedList = document.querySelectorAll('UL')[1]; +const listItems = unorderedList.querySelectorAll('LI'); + +const allAreListItems = unorderedList.children.length == listItems.length; + +const containsAnchors = [...listItems].every(function(listItem) { + return listItem.querySelector("a") !== null; +}); + +assert(unorderedList && allAreListItems && containsAnchors && listItems.length > 1); +``` + +Your anchor tags linking to the recipes should have a `href` attribute with the value set to `#` + +```js +const anchorTags = document.querySelectorAll("a"); + +const allAnchorsHaveHrefHash = [...anchorTags].every(function(anchorTag) { + return anchorTag.hasAttribute("href") && anchorTag.getAttribute("href") === "#"; +}); + +assert(allAnchorsHaveHrefHash && anchorTags.length > 0); +``` + +# --seed-- + +## --seed-contents-- + +```html + +``` + +```css + +``` + +## --solutions-- + +```html + + + + The Odin Recipes + + +

                                                                                                                                                                          Creamy Chocolate Fudge

                                                                                                                                                                          + A delicious chocolate fudge dessert +

                                                                                                                                                                          Description

                                                                                                                                                                          +

                                                                                                                                                                          This recipe is for a rich and creamy chocolate fudge that is sure to satisfy your sweet tooth. It's perfect for a special occasion or as a tasty treat for any time of the year.

                                                                                                                                                                          +

                                                                                                                                                                          This recipe is easy to follow and only requires a few simple ingredients. With just a few steps, you'll be able to create a delicious dessert that everyone will love.

                                                                                                                                                                          +

                                                                                                                                                                          Ingredients

                                                                                                                                                                          +
                                                                                                                                                                            +
                                                                                                                                                                          • 1 cup sugar
                                                                                                                                                                          • +
                                                                                                                                                                          • 1/2 cup unsalted butter
                                                                                                                                                                          • +
                                                                                                                                                                          • 1/4 cup milk
                                                                                                                                                                          • +
                                                                                                                                                                          • 1/4 cup cocoa powder
                                                                                                                                                                          • +
                                                                                                                                                                          • 1/4 cup chocolate chips
                                                                                                                                                                          • +
                                                                                                                                                                          • 1/4 tsp salt
                                                                                                                                                                          • +
                                                                                                                                                                          • 1 tsp vanilla extract
                                                                                                                                                                          • +
                                                                                                                                                                          +

                                                                                                                                                                          Steps

                                                                                                                                                                          +
                                                                                                                                                                            +
                                                                                                                                                                          1. In a medium saucepan, melt the butter over medium heat.
                                                                                                                                                                          2. +
                                                                                                                                                                          3. Add the sugar, milk, cocoa powder, and salt to the saucepan and stir until well combined.
                                                                                                                                                                          4. +
                                                                                                                                                                          5. Bring the mixture to a boil, stirring constantly, and then reduce the heat to low and simmer for 5 minutes.
                                                                                                                                                                          6. +
                                                                                                                                                                          7. Remove the saucepan from the heat and stir in the chocolate chips and vanilla extract until the chocolate is melted and the mixture is smooth.
                                                                                                                                                                          8. +
                                                                                                                                                                          9. Pour the fudge into a greased 8-inch square pan and let it cool completely before cutting into squares.
                                                                                                                                                                          10. +
                                                                                                                                                                          +

                                                                                                                                                                          More Recipes

                                                                                                                                                                          +
                                                                                                                                                                          + + +``` diff --git a/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-a.md b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-a.md new file mode 100644 index 00000000000..f4625eb7e31 --- /dev/null +++ b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-a.md @@ -0,0 +1,65 @@ +--- +id: 637f4e3e72c65bc8e73dfe24 +videoId: kcHKFZBVtf4 +title: Understand Ordered and Unordered List Question A +challengeType: 15 +dashedName: understand-ordered-and-unordered-list-question-a +--- + +# --description-- + +If you want to have a list of items where the order doesn’t matter, like a shopping list of items that can be bought in any order, then you can use an unordered list. + +Unordered lists are created using the `
                                                                                                                                                                            ` element, and each item within the list is created using the list item element `
                                                                                                                                                                          • `. + +Each list item in an unordered list begins with a bullet point: + + + +If you instead want to create a list of items where the order does matter, like step-by-step instructions for a recipe, or your top 10 favorite TV shows, then you can use an ordered list. + +Ordered lists are created using the `
                                                                                                                                                                              ` element. Each individual item in them is again created using the list item element `
                                                                                                                                                                            1. `. However, each list item in an ordered list begins with a number instead: + + + +# --question-- + +## --assignment-- + +Watch the first three minutes of Kevin Powell's video on Ordered and Unordered lists above. + +--- + +Make an unordered shopping list of your favorite foods. + +--- + +Make an ordered list of todo’s you need to get done today. + +--- + +Make an unordered list of places you’d like to visit someday. + +--- + +Make an ordered list of your all time top 5 favorite video games or movies. + +## --text-- + +What HTML tag is used to create an unordered list? + +## --answers-- + +`
                                                                                                                                                                            2. ` + +--- + +`
                                                                                                                                                                                ` + +--- + +`
                                                                                                                                                                                  ` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-b.md b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-b.md new file mode 100644 index 00000000000..4c6822fc504 --- /dev/null +++ b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-b.md @@ -0,0 +1,45 @@ +--- +id: 637f4e4672c65bc8e73dfe25 +videoId: LGQuIIv2RVA +title: Understand Ordered and Unordered List Question B +challengeType: 15 +dashedName: understand-ordered-and-unordered-list-question-b +--- + +# --description-- + +If you want to have a list of items where the order doesn’t matter, like a shopping list of items that can be bought in any order, then you can use an unordered list. + +Unordered lists are created using the `
                                                                                                                                                                                    ` element, and each item within the list is created using the list item element `
                                                                                                                                                                                  • `. + +Each list item in an unordered list begins with a bullet point: + + + +If you instead want to create a list of items where the order does matter, like step-by-step instructions for a recipe, or your top 10 favorite TV shows, then you can use an ordered list. + +Ordered lists are created using the `
                                                                                                                                                                                      ` element. Each individual item in them is again created using the list item element `
                                                                                                                                                                                    1. `. However, each list item in an ordered list begins with a number instead: + + + +# --question-- + +## --text-- + +What HTML tag is used to create an ordered list? + +## --answers-- + +`
                                                                                                                                                                                        ` + +--- + +`
                                                                                                                                                                                      1. ` + +--- + +`
                                                                                                                                                                                          ` + +## --video-solution-- + +1 diff --git a/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-c.md b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-c.md new file mode 100644 index 00000000000..c766990ca22 --- /dev/null +++ b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-c.md @@ -0,0 +1,45 @@ +--- +id: 637f4e5172c65bc8e73dfe26 +videoId: LGQuIIv2RVA +title: Understand Ordered and Unordered List Question C +challengeType: 15 +dashedName: understand-ordered-and-unordered-list-question-c +--- + +# --description-- + +If you want to have a list of items where the order doesn’t matter, like a shopping list of items that can be bought in any order, then you can use an unordered list. + +Unordered lists are created using the `
                                                                                                                                                                                            ` element, and each item within the list is created using the list item element `
                                                                                                                                                                                          • `. + +Each list item in an unordered list begins with a bullet point: + + + +If you instead want to create a list of items where the order does matter, like step-by-step instructions for a recipe, or your top 10 favorite TV shows, then you can use an ordered list. + +Ordered lists are created using the `
                                                                                                                                                                                              ` element. Each individual item in them is again created using the list item element `
                                                                                                                                                                                            1. `. However, each list item in an ordered list begins with a number instead: + + + +# --question-- + +## --text-- + +What HTML tag is used to create list items within both unordered and ordered lists? + +## --answers-- + +`
                                                                                                                                                                                                ` + +--- + +`
                                                                                                                                                                                              1. ` + +--- + +`
                                                                                                                                                                                                  ` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/working-with-text-question-a.md b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/working-with-text-question-a.md new file mode 100644 index 00000000000..8698b62aca8 --- /dev/null +++ b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/working-with-text-question-a.md @@ -0,0 +1,60 @@ +--- +id: 637f4e5872c65bc8e73dfe27 +videoId: yqcd-XkxZNM +title: Working With Text Question A +challengeType: 15 +dashedName: working-with-text-question-a +--- + +# --description-- + +What would you expect the following text to output on an HTML page? + +```html + + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor + incididunt ut labore et dolore magna aliqua. + + Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris + nisi ut aliquip ex ea commodo consequat. + +``` + +It looks like two paragraphs of text, and so you might expect it to display in that way. However that is not the case, as you can see in the output below: + + + +When the browser encounters new lines like this in your HTML, it will compress them down into one single space. The result of this compression is that all of the text is clumped together into one long line. + +If you want to create paragraphs in HTML, you need to use the paragraph element, which will add a newline after each of your paragraphs. A paragraph element is defined by wrapping text content with a `

                                                                                                                                                                                                  ` tag. + +Changing our example from before to use paragraph elements fixes the issue: + + + +# --question-- + +## --assignment-- + +Watch and follow along to Kevin Powell’s HTML Paragraph and Headings Video above. + +## --text-- + +How do you create a paragraph in HTML? + +## --answers-- + +`

                                                                                                                                                                                                  This is a paragraph

                                                                                                                                                                                                  ` + +--- + +`

                                                                                                                                                                                                  This is a paragraph

                                                                                                                                                                                                  ` + +--- + +`This is a paragraph` + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/working-with-text-question-b.md b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/working-with-text-question-b.md new file mode 100644 index 00000000000..a74d8d11452 --- /dev/null +++ b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/working-with-text-question-b.md @@ -0,0 +1,40 @@ +--- +id: 637f4e5f72c65bc8e73dfe28 +videoId: yqcd-XkxZNM +title: Working With Text Question B +challengeType: 15 +dashedName: working-with-text-question-b +--- + +# --description-- + +Headings are different from other HTML text elements: they are displayed larger and bolder than other text to signify that they are headings. + +There are 6 different levels of headings starting from `

                                                                                                                                                                                                  ` to `

                                                                                                                                                                                                  `. The number within a heading tag represents that heading’s level. The largest and most important heading is `h1`, while `h6` is the tiniest heading at the lowest level. + +Headings are defined much like paragraphs. For example, to create an `h1` heading, we wrap our heading text in a `

                                                                                                                                                                                                  ` tag. + + + +Using the correct level of heading is important as levels provide a hierarchy to the content. An `h1` heading should always be used for the heading of the overall page, and the lower level headings should be used as the headings for content in smaller sections of the page. + +# --question-- +## --text-- + +How many different levels of headings are there and what is the difference between them? + +## --answers-- + +There are 5 different levels of headings. `h5` is the smallest and least important heading, and `h1` is the largest and most important heading. + +--- + +There are 6 different levels of headings. `h6` is the largest and most important heading, and `h1` is the smallest and least important heading. + +--- + +There are 6 different levels of headings. `h1` is the largest and most important heading, and `h6` is the smallest and least important heading. + +## --video-solution-- + +3 diff --git a/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/working-with-text-question-c.md b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/working-with-text-question-c.md new file mode 100644 index 00000000000..6ccf0e06658 --- /dev/null +++ b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/working-with-text-question-c.md @@ -0,0 +1,47 @@ +--- +id: 637f4e6672c65bc8e73dfe29 +videoId: gW6cBZLUk6M +title: Working With Text Question C +challengeType: 15 +dashedName: working-with-text-question-c +--- + +# --description-- + +The `` element makes text bold. It also semantically marks text as important; this affects tools, like screen readers, that users with visual impairments will rely on to use your website. The tone of voice on some screen readers will change to communicate the importance of the text within a `strong` element. To define a `strong` element you wrap text content in a `` tag. + +You can use `strong` on its own: + + + +But you will probably find yourself using the `strong` element much more in combination with other text elements, like this: + + + +Sometimes you will want to make text bold without giving it an important meaning. You’ll learn how to do that in the CSS lessons later in the curriculum. + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s HTML Bold and Italic Text Video above. + +## --text-- + +What element should you use to make text bold and important? + +## --answers-- + +`This is an important message` + +--- + +`

                                                                                                                                                                                                  This is an important message

                                                                                                                                                                                                  ` + +--- + +`This is an important message` + +## --video-solution-- + +3 diff --git a/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/working-with-text-question-d.md b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/working-with-text-question-d.md new file mode 100644 index 00000000000..d6647f9a7ea --- /dev/null +++ b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/working-with-text-question-d.md @@ -0,0 +1,39 @@ +--- +id: 637f4e6e72c65bc8e73dfe2a +videoId: gW6cBZLUk6M +title: Working With Text Question D +challengeType: 15 +dashedName: working-with-text-question-d +--- + +# --description-- + +The `em` element makes text italic. It also semantically places emphasis on the text, which again may affect things like screen readers. To define an emphasized element you wrap text content in a `` tag. + +To use `em` on its own: + + +Again, like the `strong` element, you will find yourself mostly using the `em` element with other text elements: + + + +# --question-- +## --text-- + +What element should you use to make text italicized to add emphasis? + +## --answers-- + +`This is an italic message` + +--- + +`This is an italic message` + +--- + +`This is an italic message` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/working-with-text-question-e.md b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/working-with-text-question-e.md new file mode 100644 index 00000000000..d022a6331e9 --- /dev/null +++ b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/working-with-text-question-e.md @@ -0,0 +1,66 @@ +--- +id: 637f4e7972c65bc8e73dfe2b +videoId: gW6cBZLUk6M +title: Working With Text Question E +challengeType: 15 +dashedName: working-with-text-question-e +--- + +# --description-- + +You may have noticed that in all the examples in this lesson you indent any elements that are within other elements. This is known as nesting elements. + +When you nest elements within other elements, you create a parent and child relationship between them. The nested elements are the children and the element they are nested within is the parent. + +In the following example, the `body` element is the parent and the `p` is the child: + +```html + + + + +

                                                                                                                                                                                                  Lorem ipsum dolor sit amet.

                                                                                                                                                                                                  + + +``` + +Just as in human relationships, HTML parent elements can have many children. Elements at the same level of nesting are considered to be siblings. + +For example, the two `p` elements in the following code are siblings, since they are both children of the `body` tag and are at the same level of nesting as each other: + +```html + + + + +

                                                                                                                                                                                                  Lorem ipsum dolor sit amet.

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Ut enim ad minim veniam.

                                                                                                                                                                                                  + + +``` + +You use indentation to make the level of nesting clear and readable for yourselves and other developers who will work with your HTML in the future. It is recommended to indent any child elements by two spaces. + +The parent, child, and sibling relationships between elements will become much more important later when you start styling your HTML with CSS and adding behavior with JavaScript. For now, however, it is just important to know the distinction between how elements are related and the terminology used to describe their relationships. + +# --question-- + +## --text-- + +What relationship do two elements have if they are at the same level of nesting? + +## --answers-- + +The elements are each other's parents. + +--- + +The elements are each other's children. + +--- + +The elements are siblings. + +## --video-solution-- + +3 diff --git a/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/working-with-text-question-f.md b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/working-with-text-question-f.md new file mode 100644 index 00000000000..2ace3f4e36d --- /dev/null +++ b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/working-with-text-question-f.md @@ -0,0 +1,67 @@ +--- +id: 637f4e8072c65bc8e73dfe2c +videoId: gW6cBZLUk6M +title: Working With Text Question F +challengeType: 15 +dashedName: working-with-text-question-f +--- + +# --description-- + +You may have noticed that in all the examples in this lesson you indent any elements that are within other elements. This is known as nesting elements. + +When you nest elements within other elements, you create a parent and child relationship between them. The nested elements are the children and the element they are nested within is the parent. + +In the following example, the body element is the parent and the paragraph is the child: + +```html + + + + +

                                                                                                                                                                                                  Lorem ipsum dolor sit amet.

                                                                                                                                                                                                  + + +``` + +Just as in human relationships, HTML parent elements can have many children. Elements at the same level of nesting are considered to be siblings. + +For example, the two paragraphs in the following code are siblings, since they are both children of the body tag and are at the same level of nesting as each other: + +```html + + + + +

                                                                                                                                                                                                  Lorem ipsum dolor sit amet.

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Ut enim ad minim veniam.

                                                                                                                                                                                                  + + +``` + +You use indentation to make the level of nesting clear and readable for yourselves and other developers who will work with your HTML in the future. It is recommended to indent any child elements by two spaces. + +The parent, child, and sibling relationships between elements will become much more important later when you start styling your HTML with CSS and adding behavior with JavaScript. For now, however, it is just important to know the distinction between how elements are related and the terminology used to describe their relationships. + +# --question-- + +## --text-- + +What relationship does an element have with any nested element within it? + +## --answers-- + +The element within the other element is called the parent element. + +--- + +The element within the other element is called the child element. + +--- + +The element within the other element is called the sibling element. + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/working-with-text-question-g.md b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/working-with-text-question-g.md new file mode 100644 index 00000000000..fe83f0ef062 --- /dev/null +++ b/curriculum/challenges/german/10-coding-interview-prep/the-odin-project/working-with-text-question-g.md @@ -0,0 +1,49 @@ +--- +id: 637f4e8772c65bc8e73dfe2d +videoId: gW6cBZLUk6M +title: Working With Text Question G +challengeType: 15 +dashedName: working-with-text-question-g +--- + +# --description-- + +HTML comments are not visible to the browser; they allow us to comment on your code so that other developers or your future selves can read them and get some context about something that might not be clear in the code. + +Writing an HTML comment is simple: You just enclose the comment with ``tags. For example: + +```html +

                                                                                                                                                                                                  View the html to see the hidden comments

                                                                                                                                                                                                  + + + +

                                                                                                                                                                                                  Some paragraph text

                                                                                                                                                                                                  + + +``` + +# --question-- + +## --assignment-- + +To get some practice working with text in HTML, create a plain blog article page which uses different headings, uses paragraphs, and has some text in the paragraphs bolded and italicized. You can use [Lorem Ipsum](https://loremipsum.io) to generate dummy text, in place of real text as you build your sites. + +## --text-- + +How do you create HTML comments? + +## --answers-- + +`/* This is an HTML comment */` + +--- + +`` + +--- + +`<-- This is an HTML comment --!>` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d1ac33c68d27dcda5796.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d1ac33c68d27dcda5796.md index a07fa582a50..cdd348db03a 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d1ac33c68d27dcda5796.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d1ac33c68d27dcda5796.md @@ -14,13 +14,25 @@ Rotate the `.back-mountain` element by `45deg` clockwise. Then, give it a `left` You should use the `transform` property to rotate the element. ```js -assert.notEmpty(new __helpers.CSSHelp(document).getStyle('.back-mountain')?.transform); +const backMountain = new __helpers.CSSHelp(document).getStyle('.back-mountain'); + +if (backMountain?.transform) { + assert.notEmpty(backMountain?.transform); +} else { + assert.notEmpty(backMountain?.rotate); +} ``` You should give `.back-mountain` a `transform` of `--fcc-expected--`, but found `--fcc-actual--`. ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.back-mountain')?.transform, 'rotate(45deg)'); +const backMountain = new __helpers.CSSHelp(document).getStyle('.back-mountain'); + +if (backMountain?.transform) { + assert.equal(backMountain?.transform, 'rotate(45deg)'); +} else { + assert.equal(backMountain?.rotate, '45deg'); +} ``` You should give `.back-mountain` a `left` property. diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d229b0e542520cd91c685.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d229b0e542520cd91c685.md index 489c0b1e673..003b9709c0e 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d229b0e542520cd91c685.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d229b0e542520cd91c685.md @@ -14,13 +14,25 @@ To make the penguin's feet look more _penguiny_, rotate the left foot by `80deg` You should give `.foot.left` a `transform` of `rotate(80deg)`. ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.foot.left').getPropVal('transform', true), 'rotate(80deg)'); +const leftFoot = new __helpers.CSSHelp(document).getStyle('.foot.left'); + +if (leftFoot?.transform) { + assert.equal(leftFoot.getPropVal('transform', true), 'rotate(80deg)'); +} else { + assert.equal(leftFoot.getPropVal('rotate', true), '80deg'); +} ``` You should give `.foot.right` a `transform` of `rotate(-80deg)`. ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.foot.right').getPropVal('transform', true), 'rotate(-80deg)'); +const rightFoot = new __helpers.CSSHelp(document).getStyle('.foot.right'); + +if (rightFoot?.transform) { + assert.equal(rightFoot.getPropVal('transform', true), 'rotate(-80deg)'); +} else { + assert.equal(rightFoot.getPropVal('rotate', true), '-80deg'); +} ``` # --seed-- diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2d4e80400325ff89664a.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2d4e80400325ff89664a.md index 5d6a74585f8..6ae5fb05350 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2d4e80400325ff89664a.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2d4e80400325ff89664a.md @@ -14,7 +14,14 @@ To keep the linear gradient on the correct side of the penguin's left arm, first You should give `.arm.left` a `transform` of `rotate(130deg) scaleX(-1)`. ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.arm.left').getPropVal('transform', true), 'rotate(130deg)scaleX(-1)'); +const leftArm = new __helpers.CSSHelp(document).getStyle('.arm.left'); + +if (leftArm?.rotate && leftArm?.transform) { + assert.equal(leftArm.getPropVal('rotate', true), '130deg'); + assert.equal(leftArm.getPropVal('transform', true), 'scaleX(-1)'); +} else { + assert.equal(leftArm.getPropVal('transform', true), 'rotate(130deg)scaleX(-1)'); +} ``` # --seed-- @@ -281,7 +288,6 @@ body { top: 35%; left: 5%; transform-origin: top left; - } --fcc-editable-region-- diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2ebc81ba81271460850d.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2ebc81ba81271460850d.md index 1a3b8e3cf6b..7b8d308ed34 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2ebc81ba81271460850d.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2ebc81ba81271460850d.md @@ -14,7 +14,13 @@ Rotate the right arm by `45deg` counterclockwise. You should give `.arm.right` a `transform` of `rotate(-45deg)`. ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.arm.right')?.getPropVal('transform', true), 'rotate(-45deg)'); +const rightArm = new __helpers.CSSHelp(document).getStyle('.arm.right'); + +if (rightArm?.transform) { + assert.equal(rightArm?.getPropVal('transform', true), 'rotate(-45deg)'); +} else { + assert.equal(rightArm?.getPropVal('rotate', true), '-45deg'); +} ``` # --seed-- @@ -287,7 +293,6 @@ body { .arm.right { top: 0%; right: -5%; - } --fcc-editable-region-- diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d32c7fa21f32aaa91d499.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d32c7fa21f32aaa91d499.md index e69b8ec5ec3..74235426b56 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d32c7fa21f32aaa91d499.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d32c7fa21f32aaa91d499.md @@ -14,7 +14,16 @@ Within the first waypoint, rotate to `110deg`, and retain the scaling of the lef You should give the `10%` waypoint a `transform` of `rotate(110deg) scaleX(-1)`. ```js -assert([...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '10%')?.style?.transform?.replace(/\s+/g, '') === 'rotate(110deg)scaleX(-1)'); +const wave10Percent = [...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '10%'); +const rotateProp = wave10Percent?.style?.rotate?.replace(/\s+/g, ''); +const transformProp = wave10Percent?.style?.transform?.replace(/\s+/g, ''); + +if (rotateProp && transformProp) { + assert(rotateProp === '110deg'); + assert(transformProp === 'scaleX(-1)'); +} else { + assert(transformProp === 'rotate(110deg)scaleX(-1)'); +} ``` # --seed-- diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d333b738e3c2b5d58b095.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d333b738e3c2b5d58b095.md index 8616f720202..ac97b33ea2a 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d333b738e3c2b5d58b095.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d333b738e3c2b5d58b095.md @@ -14,7 +14,16 @@ Within the second waypoint, rotate to `130deg`, and retain the scaling of the le You should give the `20%` waypoint a `transform` of `rotate(130deg) scaleX(-1)`. ```js -assert([...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '20%')?.style?.transform?.replace(/\s+/g, '') === 'rotate(130deg)scaleX(-1)'); +const wave20Percent = [...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '20%'); +const transformProp = wave20Percent?.style?.transform?.replace(/\s+/g, ''); +const rotateProp = wave20Percent?.style?.rotate?.replace(/\s+/g, ''); + +if (rotateProp && transformProp) { + assert(rotateProp === '130deg'); + assert(transformProp === 'scaleX(-1)'); +} else { + assert(transformProp === 'rotate(130deg)scaleX(-1)'); +} ``` # --seed-- diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d337765b9f02c10e93722.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d337765b9f02c10e93722.md index 5a7f861b8cb..fd1c9193d00 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d337765b9f02c10e93722.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d337765b9f02c10e93722.md @@ -14,13 +14,31 @@ For the third and fourth waypoints, repeat the `transform` pattern once more. You should give the `30%` waypoint a `transform` of `rotate(110deg) scaleX(-1)`. ```js -assert([...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '30%')?.style?.transform?.replace(/\s+/g, '') === 'rotate(110deg)scaleX(-1)'); +const wave30Percent = [...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '30%'); +const transformProp = wave30Percent?.style?.transform?.replace(/\s+/g, ''); +const rotateProp = wave30Percent?.style?.rotate?.replace(/\s+/g, ''); + +if (rotateProp && transformProp) { + assert(rotateProp === '110deg'); + assert(transformProp === 'scaleX(-1)'); +} else { + assert(transformProp === 'rotate(110deg)scaleX(-1)'); +} ``` You should give the `40%` waypoint a `transform` of `rotate(130deg) scaleX(-1)`. ```js -assert([...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '40%')?.style?.transform?.replace(/\s+/g, '') === 'rotate(130deg)scaleX(-1)'); +const wave40Percent = [...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '40%'); +const transformProp = wave40Percent?.style?.transform?.replace(/\s+/g, ''); +const rotateProp = wave40Percent?.style?.rotate?.replace(/\s+/g, ''); + +if (rotateProp && transformProp) { + assert(rotateProp === '130deg'); + assert(transformProp === 'scaleX(-1)'); +} else { + assert(transformProp === 'rotate(130deg)scaleX(-1)'); +} ``` # --seed-- 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 b501fd21674..9a543d29ead 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 @@ -16,11 +16,11 @@ gradient-type( ); ``` -In the example, `color1` is solid at the top, `color2` is solid at the bottom, and in between it transitions evenly from one to the next. In `.bb1a`, add a gradient of type `linear-gradient` to the `background` property with `--building-color1` as the first color and `--window-color1` as the second. +In the example, `color1` is solid at the top, `color2` is solid at the bottom, and in between it transitions evenly from one to the next. In `.bb1a`, add a `background` property below the `background-color` property. Set it as a gradient of type `linear-gradient` that uses `--building-color1` as the first color and `--window-color1` as the second. # --hints-- -You should apply a `background` to `.bb1a`. +You should apply a `background` to `.bb1a` right after the `background-color`. ```js assert(new __helpers.CSSHelp(document).getStyle('.bb1a')?.background); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa2407b521be39a3de7be1.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa2407b521be39a3de7be1.md index 0665814f242..91034271b22 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa2407b521be39a3de7be1.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa2407b521be39a3de7be1.md @@ -45,7 +45,7 @@ assert(document.querySelector('a').getAttribute('target') === '_blank');

                                                                                                                                                                                                  Cat Photos

                                                                                                                                                                                                  --fcc-editable-region-- -

                                                                                                                                                                                                  See more cat photos in our gallery.

                                                                                                                                                                                                  +

                                                                                                                                                                                                  See more cat photos in our gallery.

                                                                                                                                                                                                  --fcc-editable-region-- A cute orange cat lying on its back. diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2abbe7d18d49a1e0e1c8.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2abbe7d18d49a1e0e1c8.md index 4526afe38b1..750166024ce 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2abbe7d18d49a1e0e1c8.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2abbe7d18d49a1e0e1c8.md @@ -39,13 +39,15 @@ assert(document.querySelector('h1')?.innerText === 'Nutrition Facts'); --fcc-editable-region-- - - - Nutrition Label - - - + + + Nutrition Label + + + + + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2d4150fe0d4cbd0f2628.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2d4150fe0d4cbd0f2628.md index 11b8188cc98..272ccd55ffc 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2d4150fe0d4cbd0f2628.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2d4150fe0d4cbd0f2628.md @@ -43,14 +43,16 @@ assert(document.querySelector('p')?.innerText === '8 servings per container'); --fcc-editable-region-- - - - Nutrition Label - - -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  - + + + Nutrition Label + + + +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  + + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34948891834dd77655a6.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34948891834dd77655a6.md index c1b590d4f0f..2ae877fe385 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34948891834dd77655a6.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34948891834dd77655a6.md @@ -43,15 +43,17 @@ assert(document.querySelectorAll('p')?.[1]?.innerText === 'Serving size 2/3 cup --fcc-editable-region-- - - - Nutrition Label - - -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  - + + + Nutrition Label + + + +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  + + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34ecc1091b4fd5a8a484.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34ecc1091b4fd5a8a484.md index 76f425c598b..4abe85efccd 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34ecc1091b4fd5a8a484.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34ecc1091b4fd5a8a484.md @@ -49,16 +49,18 @@ assert(links.find(link => link?.getAttribute('href') === 'https://fonts.googleap --fcc-editable-region-- - - - Nutrition Label - - -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  - + + + Nutrition Label + + + + +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f357957e370510f21ea16.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f357957e370510f21ea16.md index ad1b189bed0..d66790fd30c 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f357957e370510f21ea16.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f357957e370510f21ea16.md @@ -32,17 +32,19 @@ assert(new __helpers.CSSHelp(document).getStyle('body')?.fontFamily === '"Open S ```html - - - Nutrition Label - - - - -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f378014c2da526a109c81.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f378014c2da526a109c81.md index 52a336e0522..82f736ff482 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f378014c2da526a109c81.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f378014c2da526a109c81.md @@ -30,17 +30,19 @@ assert(new __helpers.CSSHelp(document).getStyle('html')?.fontSize === '16px'); ```html - - - Nutrition Label - - - - -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38279e5c3d53692ea441.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38279e5c3d53692ea441.md index baa624f44ae..4d110ad7abf 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38279e5c3d53692ea441.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38279e5c3d53692ea441.md @@ -37,18 +37,20 @@ assert(children?.every(child => child?.parentElement?.classList?.contains('label ```html - - - Nutrition Label - - - + + + + Nutrition Label + + + + --fcc-editable-region-- - -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  - + +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38cabc64e3556f98cc1a.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38cabc64e3556f98cc1a.md index 6564869c8f2..6ff4e43992b 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38cabc64e3556f98cc1a.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38cabc64e3556f98cc1a.md @@ -32,19 +32,21 @@ assert(new __helpers.CSSHelp(document).getStyle('.label')?.border === '2px solid ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3949f58e12577dcefb00.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3949f58e12577dcefb00.md index 9f08de011e6..e436f20dcdf 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3949f58e12577dcefb00.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3949f58e12577dcefb00.md @@ -26,19 +26,21 @@ assert(new __helpers.CSSHelp(document).getStyle('.label')?.width === '270px'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f39d7da41b15851fa3fb9.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f39d7da41b15851fa3fb9.md index f273bf9a263..ca537494642 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f39d7da41b15851fa3fb9.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f39d7da41b15851fa3fb9.md @@ -30,19 +30,21 @@ assert(new __helpers.CSSHelp(document).getStyle('.label')?.padding === '0px 7px' ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3b091162165948e1cb33.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3b091162165948e1cb33.md index 63304b702e4..694a4e9ff3d 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3b091162165948e1cb33.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3b091162165948e1cb33.md @@ -32,19 +32,21 @@ assert(new __helpers.CSSHelp(document).getStyle('*')?.boxSizing === 'border-box' ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3cafd794015aa9547a6d.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3cafd794015aa9547a6d.md index cb116abcc95..84ea6cab71b 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3cafd794015aa9547a6d.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3cafd794015aa9547a6d.md @@ -32,19 +32,21 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')?.fontWeight === '800'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3d9e59db4b5b8e960762.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3d9e59db4b5b8e960762.md index 43f69ec85a5..fe53466124c 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3d9e59db4b5b8e960762.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3d9e59db4b5b8e960762.md @@ -24,19 +24,21 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')?.textAlign === 'center'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e1b7233ee5c7595771f.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e1b7233ee5c7595771f.md index a0c09b066dc..0c437fb4e88 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e1b7233ee5c7595771f.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e1b7233ee5c7595771f.md @@ -24,19 +24,21 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')?.margin === '-4px 0px'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e4af8008c5d494d3afe.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e4af8008c5d494d3afe.md index 557d646bca5..ebe48de3985 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e4af8008c5d494d3afe.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e4af8008c5d494d3afe.md @@ -30,19 +30,21 @@ assert(new __helpers.CSSHelp(document).getStyle('p')?.margin === '0px'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3ed16592445e57941aec.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3ed16592445e57941aec.md index 56ea0615281..53f6d70c156 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3ed16592445e57941aec.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3ed16592445e57941aec.md @@ -44,21 +44,23 @@ assert(document.querySelector('.divider')?.previousElementSibling?.localName === ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  --fcc-editable-region-- - + ``` diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f405b89a7ec5f8e2d11f4.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f405b89a7ec5f8e2d11f4.md index 84de4ac6133..f8e43c0a290 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f405b89a7ec5f8e2d11f4.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f405b89a7ec5f8e2d11f4.md @@ -36,20 +36,22 @@ assert(new __helpers.CSSHelp(document).getStyle('.divider')?.margin === '2px 0px ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f40b01f680e608d360ed4.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f40b01f680e608d360ed4.md index e042aec127b..a99470dfe4c 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f40b01f680e608d360ed4.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f40b01f680e608d360ed4.md @@ -26,20 +26,22 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')?.letterSpacing === '0.15px ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4172e9eec061d6456221.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4172e9eec061d6456221.md index 85ae83fbe5d..c1d537f2472 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4172e9eec061d6456221.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4172e9eec061d6456221.md @@ -32,22 +32,24 @@ assert(!document.querySelector('p')?.classList?.contains('bold')); ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  --fcc-editable-region-- - + ``` diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f41c979787462e76dab90.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f41c979787462e76dab90.md index 2d4397eb7ad..ee8e51fcb97 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f41c979787462e76dab90.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f41c979787462e76dab90.md @@ -44,20 +44,22 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f423cf65d5864132a0956.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f423cf65d5864132a0956.md index 6c9291bfe88..2d06458ce2f 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f423cf65d5864132a0956.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f423cf65d5864132a0956.md @@ -24,22 +24,24 @@ assert(document.querySelector('h1')?.classList?.contains('bold')); ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  --fcc-editable-region-- - + ``` diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f42a021625f656101ef93.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f42a021625f656101ef93.md index 11cdbeaca13..64189f1570a 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f42a021625f656101ef93.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f42a021625f656101ef93.md @@ -9,7 +9,7 @@ dashedName: step-22 Horizontal spacing between equally important elements can increase the readability of your text. -Wrap the text `2/3 cup (55g)` in a `span` element, and give it a `class` attribute set to `right`. +Wrap the text `2/3 cup (55g)` in a `span` element. # --hints-- @@ -19,12 +19,6 @@ You should create a new `span` element. assert(document.querySelector('span')); ``` -Your new `span` element should have the `class` attribute set to `right`. - -```js -assert(document.querySelector('span')?.classList?.contains('right')); -``` - Your `span` element should have the text `2/3 cup (55g)`. ```js @@ -44,22 +38,24 @@ assert(document.querySelectorAll('p')?.[1]?.innerText === 'Serving size 2/3 cup ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  --fcc-editable-region-- - + ``` diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4bfb9de4a16703b56eb6.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4bfb9de4a16703b56eb6.md index a827ed632ca..686336b2dca 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4bfb9de4a16703b56eb6.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4bfb9de4a16703b56eb6.md @@ -7,22 +7,20 @@ dashedName: step-23 # --description-- -The `float` property is used to place an element on the left or right of its container, allowing other content (such as text) to wrap around it. - -Create a new `.right` selector and set the `float` property to `right`. +Now we can add the horizontal spacing using `flex`. In your `p` selector, add a `display` property set to `flex` and a `justify-content` property set to `space-between`. # --hints-- -You should create a new `.right` selector. +Your `p` selector should have a `display` property set to `flex`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.right')); +assert(new __helpers.CSSHelp(document).getStyle('p')?.display === 'flex'); ``` -Your `.right` selector should have a `float` property set to `right`. +Your `p` selector should have a `justify-content` property set to `space-between`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.right')?.float === 'right'); +assert(new __helpers.CSSHelp(document).getStyle('p')?.justifyContent === 'space-between'); ``` # --seed-- @@ -32,20 +30,22 @@ assert(new __helpers.CSSHelp(document).getStyle('.right')?.float === 'right'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + ``` @@ -75,9 +75,11 @@ h1 { letter-spacing: 0.15px } +--fcc-editable-region-- p { margin: 0; } +--fcc-editable-region-- .divider { border-bottom: 1px solid #888989; @@ -87,8 +89,4 @@ p { .bold { font-weight: 800; } - ---fcc-editable-region-- - ---fcc-editable-region-- ``` diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ce9d877b668417c0c42.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ce9d877b668417c0c42.md index c613e7f30f1..4c960b72196 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ce9d877b668417c0c42.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ce9d877b668417c0c42.md @@ -40,22 +40,24 @@ assert(children?.[3]?.localName === 'p'); ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  --fcc-editable-region-- - + ``` @@ -87,6 +89,8 @@ h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -97,8 +101,4 @@ p { .bold { font-weight: 800; } - -.right { - float: right; -} ``` diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4dde9d72e3694cb9ee3b.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4dde9d72e3694cb9ee3b.md index d7c0c3f1f41..ea61500923f 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4dde9d72e3694cb9ee3b.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4dde9d72e3694cb9ee3b.md @@ -39,22 +39,24 @@ assert(style?.letterSpacing === '0.15px'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + ``` @@ -88,6 +90,8 @@ h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -98,8 +102,4 @@ p { .bold { font-weight: 800; } - -.right { - float: right; -} ``` diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ec58334106a4170c2a8.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ec58334106a4170c2a8.md index 2fd85ad3563..6830eadac2c 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ec58334106a4170c2a8.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ec58334106a4170c2a8.md @@ -7,7 +7,7 @@ dashedName: step-26 # --description-- -Create a new `div` element below your `header` element, and give it a `class` attribute set to `divider lg`. +Create a new `div` element below your `header` element, and give it a `class` attribute set to `divider large`. # --hints-- @@ -23,12 +23,12 @@ Your new `div` element should come after your `header` element. assert(document.querySelector('.label')?.lastElementChild?.localName === 'div'); ``` -Your new `div` element should have the `class` attribute set to `divider lg`. +Your new `div` element should have the `class` attribute set to `divider large`. ```js const div = document.querySelector('.label')?.lastElementChild; assert(div?.classList?.contains('divider')); -assert(div?.classList?.contains('lg')); +assert(div?.classList?.contains('large')); ``` # --seed-- @@ -38,25 +38,27 @@ assert(div?.classList?.contains('lg')); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  --fcc-editable-region-- --fcc-editable-region-- -
                                                                                                                                                                                                  - +
                                                                                                                                                                                                  + ``` @@ -88,6 +90,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -98,8 +102,4 @@ p { .bold { font-weight: 800; } - -.right { - float: right; -} ``` diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4f9e4a40566b776a8f38.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4f9e4a40566b776a8f38.md index 5b5d116e022..4fd89a7f1fa 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4f9e4a40566b776a8f38.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4f9e4a40566b776a8f38.md @@ -7,32 +7,32 @@ dashedName: step-27 # --description-- -Create a new `.lg` selector and give it a `height` property set to `10px`. Also create an `.lg, .md` selector and set the `background-color` property to `black`. +Create a new `.large` selector and give it a `height` property set to `10px`. Also create an `.large, .medium` selector and set the `background-color` property to `black`. # --hints-- -You should have a new `.lg` selector. +You should have a new `.large` selector. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg')); +assert(new __helpers.CSSHelp(document).getStyle('.large')); ``` -Your `.lg` selector should have a `height` property set to `10px`. +Your `.large` selector should have a `height` property set to `10px`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg')?.height === '10px'); +assert(new __helpers.CSSHelp(document).getStyle('.large')?.height === '10px'); ``` -You should have a new `.lg, .md` selector. +You should have a new `.large, .medium` selector. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')); +assert(new __helpers.CSSHelp(document).getStyle('.large, .medium')); ``` -Your `.lg, .md` selector should have a `background-color` property set to `black`. +Your `.large, .medium` selector should have a `background-color` property set to `black`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')?.backgroundColor === 'black'); +assert(new __helpers.CSSHelp(document).getStyle('.large, .medium')?.backgroundColor === 'black'); ``` # --seed-- @@ -42,23 +42,25 @@ assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')?.backgroundColor === ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + ``` @@ -90,6 +92,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -101,10 +105,6 @@ p { font-weight: 800; } -.right { - float: right; -} - --fcc-editable-region-- --fcc-editable-region-- 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 cb4e9e632be..3cd612969e5 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 @@ -7,16 +7,16 @@ dashedName: step-28 # --description-- -You may notice there is still a small border at the bottom of your `.lg` element. To reset this, give your `.lg, .md` selector a `border` property set to `0`. +You may notice there is still a small border at the bottom of your `.large` element. To reset this, give your `.large, .medium` selector a `border` property set to `0`. -Note: the `md`(medium) class will be utilized in step 37 for the thinner bars of the nutrition label. +Note: the `medium`(medium) class will be utilized in step 37 for the thinner bars of the nutrition label. # --hints-- -Your `.lg, .md` selector should have a `border` property set to `0`. +Your `.large, .medium` selector should have a `border` property set to `0`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')?.borderWidth === '0px'); +assert(new __helpers.CSSHelp(document).getStyle('.large, .medium')?.borderWidth === '0px'); ``` # --seed-- @@ -26,23 +26,25 @@ assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')?.borderWidth === '0p ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + ``` @@ -74,6 +76,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -85,16 +89,12 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } --fcc-editable-region-- -.lg, .md { +.large, .medium { background-color: black; } --fcc-editable-region-- diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51257a8a516d80b6c743.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51257a8a516d80b6c743.md index cc1b6599b46..47197f64ccc 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51257a8a516d80b6c743.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51257a8a516d80b6c743.md @@ -7,7 +7,7 @@ dashedName: step-29 # --description-- -Create a new `div` below your `.lg` element and give it a `class` attribute set to `calories-info`. +Create a new `div` below your `.large` element and give it a `class` attribute set to `calories-info`. # --hints-- @@ -23,10 +23,10 @@ Your new `div` should have a `class` attribute set to `calories-info`. assert(document.querySelector('.label')?.lastElementChild?.classList?.contains('calories-info')); ``` -Your new `div` should come after the `.lg` element. +Your new `div` should come after the `.large` element. ```js -assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('lg')); +assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('large')); ``` # --seed-- @@ -36,26 +36,28 @@ assert(document.querySelector('.label')?.lastElementChild?.previousElementSiblin ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  --fcc-editable-region-- --fcc-editable-region-- -
                                                                                                                                                                                                  - +
                                                                                                                                                                                                  + ``` @@ -87,6 +89,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -98,15 +102,11 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51e4e5b24a6e80eccce1.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51e4e5b24a6e80eccce1.md index 669238c0f8d..216ede999bb 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51e4e5b24a6e80eccce1.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51e4e5b24a6e80eccce1.md @@ -7,27 +7,39 @@ dashedName: step-30 # --description-- -Within your `.calories-info` element, create a `p` element. Give that `p` element a `class` attribute set to `bold sm-text`, and the text `Amount per serving`. +Within your `.calories-info` element, create a `div` element. Give that `div` element a `class` attribute set to `left-container`. Within the newly created `div` element, create a `h2` element with the text `Amount per serving`. Give the `h2` element a `class` attribute set to `bold small-text`. # --hints-- -You should create a new `p` element within your `.calories-info` element. +You should create a new `div` element within your `.calories-info` element. ```js -assert(document.querySelector('.calories-info')?.children?.[0]?.localName === 'p'); +assert(document.querySelector('.calories-info')?.children?.[0]?.localName === 'div'); ``` -Your new `p` element should have a `class` attribute set to `bold sm-text`. +Your new `div` element should have a `class` attribute set to `left-container`. ```js -assert(document.querySelector('.calories-info')?.children?.[0]?.classList.contains('bold')); -assert(document.querySelector('.calories-info')?.children?.[0]?.classList.contains('sm-text')); +assert(document.querySelector('.calories-info')?.children?.[0]?.classList.contains('left-container')); ``` -Your new `p` element should have the text `Amount per serving`. +You should create a new `h2` element within your `.left-container` element. ```js -assert(document.querySelector('.calories-info')?.children?.[0]?.innerText === 'Amount per serving'); +assert(document.querySelector('.left-container')?.children?.[0]?.localName === 'h2'); +``` + +Your new `h2` element should have a `class` attribute set to `bold small-text`. + +```js +assert(document.querySelector('.left-container')?.children?.[0]?.classList.contains('bold')); +assert(document.querySelector('.left-container')?.children?.[0]?.classList.contains('small-text')); +``` + +Your new `h2` element should have the text `Amount per serving`. + +```js +assert(document.querySelector('.left-container')?.children?.[0]?.innerText === 'Amount per serving'); ``` # --seed-- @@ -37,28 +49,30 @@ assert(document.querySelector('.calories-info')?.children?.[0]?.innerText === 'A ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  ---fcc-editable-region-- -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  --fcc-editable-region-- +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  - +--fcc-editable-region-- +
                                                                                                                                                                                                  + ``` @@ -90,6 +104,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -101,15 +117,11 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md index e1e10c1c30f..9fb0777d991 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md @@ -9,20 +9,20 @@ dashedName: step-31 The `rem` unit stands for `root em`, and is relative to the font size of the `html` element. -Create an `.sm-text` selector and set the `font-size` to `0.85rem`, which would calculate to be roughly `13.6px` (remember that you set your `html` to have a `font-size` of `16px`). +Create an `.small-text` selector and set the `font-size` to `0.85rem`, which would calculate to be roughly `13.6px` (remember that you set your `html` to have a `font-size` of `16px`). # --hints-- -You should have an `.sm-text` selector. +You should have an `.small-text` selector. ```js -assert(new __helpers.CSSHelp(document).getStyle('.sm-text')); +assert(new __helpers.CSSHelp(document).getStyle('.small-text')); ``` -Your `.sm-text` selector should have a `font-size` property set to `0.85rem`. +Your `.small-text` selector should have a `font-size` property set to `0.85rem`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.sm-text')?.fontSize === '0.85rem'); +assert(new __helpers.CSSHelp(document).getStyle('.small-text')?.fontSize === '0.85rem'); ``` # --seed-- @@ -32,26 +32,30 @@ assert(new __helpers.CSSHelp(document).getStyle('.sm-text')?.fontSize === '0.85r ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  - +
                                                                                                                                                                                                  + ``` @@ -83,6 +87,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -94,15 +100,11 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5486b8fd4b71633f69b0.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5486b8fd4b71633f69b0.md index 17a0c4e20f7..78579fdb8b3 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5486b8fd4b71633f69b0.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5486b8fd4b71633f69b0.md @@ -1,51 +1,50 @@ --- id: 615f5486b8fd4b71633f69b0 -title: Step 32 +title: Step 33 challengeType: 0 -dashedName: step-32 +dashedName: step-33 --- # --description-- -Below your `.sm-text` element, create a new `h1` element with the text `Calories 230`. Wrap the `230` portion of the text in a `span` element with the `class` set to `right`. +Below your `.small-text` element, create a new `p` element with the text `Calories`. Also below the `.left-container` element, create a new `span` element with the text `230`. # --hints-- -You should have a new `h1` element within your `.calories-info` element. +You should have a new `p` element within your `.calories-info` element. ```js -assert(document.querySelector('.calories-info')?.querySelector('h1')) +assert(document.querySelector('.calories-info')?.querySelector('p')) ``` -Your `h1` element should come after your `.sm-text` element. +You should have a new `span` element within your `.calories-info` element. ```js -assert(document.querySelector('.sm-text')?.nextElementSibling?.localName === 'h1'); +assert(document.querySelector('.calories-info')?.querySelector('span')) ``` -Your `h1` element should have the text `Calories 230`. +Your `p` element should come after your `.small-text` element. ```js -// the float: right property does weird things to the inner text. -assert(document.querySelector('.calories-info')?.lastElementChild?.innerText.match(/Calories[\s|\n]*230/)); +assert(document.querySelector('.small-text')?.nextElementSibling?.localName === 'p'); ``` -You should create a `span` element within your new `h1` element. +Your `p` element should have the text `Calories`. ```js -assert(document.querySelector('.calories-info')?.lastElementChild?.querySelector('span')); +assert(document.querySelector('.left-container')?.lastElementChild?.innerText === 'Calories'); ``` -Your `span` element should have the `class` set to `right`. +Your `span` element should come after your `.left-container` element. ```js -assert(document.querySelector('.calories-info')?.lastElementChild?.querySelector('span')?.classList?.contains('right')); +assert(document.querySelector('.left-container')?.nextElementSibling?.localName ==='span'); ``` Your `span` element should have the text `230`. ```js -assert(document.querySelector('.calories-info')?.lastElementChild?.querySelector('span')?.innerText === '230'); +assert(document.querySelector('.calories-info')?.lastElementChild?.innerText === '230'); ``` # --seed-- @@ -55,28 +54,32 @@ assert(document.querySelector('.calories-info')?.lastElementChild?.querySelector ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

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

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  ---fcc-editable-region--
                                                                                                                                                                                                  - +--fcc-editable-region-- +
                                                                                                                                                                                                  + ``` @@ -108,6 +111,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -119,20 +124,20 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } + +.calories-info h2 { + margin: 0; +} ``` diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f575b50b91e72af079480.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f575b50b91e72af079480.md index dc4bfa350cf..14f20ffb784 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f575b50b91e72af079480.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f575b50b91e72af079480.md @@ -1,29 +1,41 @@ --- id: 615f575b50b91e72af079480 -title: Schritt 33 +title: Step 35 challengeType: 0 -dashedName: step-33 +dashedName: step-35 --- # --description-- -Create a new `.calories-info h1` selector setting the top and bottom margin to `-5px`, and the left and right margin to `-2px`. +Create a new `.left-container p` selector setting the top and bottom margin to `-5px`, and the left and right margin to `-2px`. Also set the `font-size` to `2em` and `font-weight` to `700`. # --hints-- -You should have a new `.calories-info h1` selector. +You should have a new `.left-container p` selector. ```js -assert(new __helpers.CSSHelp(document).getStyle('.calories-info h1')); +assert(new __helpers.CSSHelp(document).getStyle('.left-container p')); ``` -Your new `.calories-info h1` selector should have a `margin` property set to `-5px -2px`. +Your new `.left-container p` selector should have a `margin` property set to `-5px -2px`. ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marginTop, '-5px'); -assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marginBottom, '-5px'); -assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marginLeft, '-2px'); -assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marginRight, '-2px'); +assert.equal(new __helpers.CSSHelp(document).getStyle('.left-container p')?.marginTop, '-5px'); +assert.equal(new __helpers.CSSHelp(document).getStyle('.left-container p')?.marginBottom, '-5px'); +assert.equal(new __helpers.CSSHelp(document).getStyle('.left-container p')?.marginLeft, '-2px'); +assert.equal(new __helpers.CSSHelp(document).getStyle('.left-container p')?.marginRight, '-2px'); +``` + +Your new `.left-container p` selector should have a `font-size` property set to `2em`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.left-container p')?.fontSize === '2em'); +``` + +Your new `.left-container p` selector should have a `font-weight` property set to `700`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.left-container p')?.fontWeight === '700'); ``` # --seed-- @@ -33,27 +45,32 @@ assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marg ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Calories

                                                                                                                                                                                                  + 230
                                                                                                                                                                                                  - +
                                                                                                                                                                                                  + ``` @@ -85,6 +102,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -96,23 +115,29 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + --fcc-editable-region-- --fcc-editable-region-- diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5af373a68e744a3c5a76.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5af373a68e744a3c5a76.md index f53ef470cf7..b833b5f471e 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5af373a68e744a3c5a76.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5af373a68e744a3c5a76.md @@ -1,13 +1,13 @@ --- id: 615f5af373a68e744a3c5a76 -title: Step 34 +title: Step 36 challengeType: 0 -dashedName: step-34 +dashedName: step-36 --- # --description-- -Create a `.calories-info span` selector and set the `font-size` to `1.2em`. +Create a `.calories-info span` selector, set its `font-size` to `2.4em` and `font-weight` to `700`. # --hints-- @@ -17,10 +17,16 @@ You should create a `.calories-info span` selector. assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')); ``` -Your `.calories-info span` selector should have a `font-size` property set to `1.2em`. +Your `.calories-info span` selector should have a `font-size` property set to `2.4em`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.fontSize === '1.2em'); +assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.fontSize === '2.4em'); +``` + +Your `.calories-info span` selector should have a `font-weight` property set to `700`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.fontWeight === '700'); ``` # --seed-- @@ -30,27 +36,32 @@ assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.fontSize ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Calories

                                                                                                                                                                                                  + 230
                                                                                                                                                                                                  - +
                                                                                                                                                                                                  + ``` @@ -82,6 +93,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -93,25 +106,33 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; + font-size: 2em; + font-weight: 700; } --fcc-editable-region-- diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5fd85d0062761f288364.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5fd85d0062761f288364.md index 9d68b8354d1..84d0ba9d985 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5fd85d0062761f288364.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5fd85d0062761f288364.md @@ -1,22 +1,22 @@ --- id: 615f5fd85d0062761f288364 -title: Step 36 +title: Step 37 challengeType: 0 -dashedName: step-36 +dashedName: step-37 --- # --description-- Typography is often more art than science. You may have to tweak things like alignment until it looks correct. -Give your `.calories-info span` selector a `margin-top` set to `-7px`. This will shift your `230` text into place. +Give your `.calories-info span` selector a `margin` set to `-7px -2px`. This will shift your `230` text into place. # --hints-- -Your `.calories-info span` selector should have a `margin-top` set to `-7px`. +Your `.calories-info span` selector should have a `margin` set to `-7px -2px`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.marginTop === '-7px'); +assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.margin === '-7px -2px'); ``` # --seed-- @@ -26,27 +26,32 @@ assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.marginTo ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Calories

                                                                                                                                                                                                  + 230
                                                                                                                                                                                                  - +
                                                                                                                                                                                                  + ``` @@ -78,6 +83,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -89,31 +96,39 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } --fcc-editable-region-- .calories-info span { - font-size: 1.2em; + font-size: 2.4em; + font-weight: 700; } --fcc-editable-region-- ``` diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f61338c8ca176d6445574.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f61338c8ca176d6445574.md index e8e605f4b70..31f049fa2d5 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f61338c8ca176d6445574.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f61338c8ca176d6445574.md @@ -1,13 +1,13 @@ --- id: 615f61338c8ca176d6445574 -title: Schritt 37 +title: Step 38 challengeType: 0 -dashedName: step-37 +dashedName: step-38 --- # --description-- -Below your `.calories-info` element, add a `div` with the `class` attribute set to `divider md`. +Below your `.calories-info` element, add a `div` with the `class` attribute set to `divider medium`. # --hints-- @@ -17,11 +17,11 @@ You should create a new `div` within your `.label` element. assert(document.querySelectorAll('.label > div')?.length === 3) ``` -Your new `div` should have the `class` attribute set to `divider md`. This div should be the last element in your `.label` element. +Your new `div` should have the `class` attribute set to `divider medium`. This div should be the last element in your `.label` element. ```js const div = document.querySelector('.label')?.lastElementChild; -assert(div?.classList?.contains('divider') && div?.classList?.contains('md')); +assert(div?.classList?.contains('divider') && div?.classList?.contains('medium')); ``` # --seed-- @@ -31,30 +31,35 @@ assert(div?.classList?.contains('divider') && div?.classList?.contains('md')); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Calories

                                                                                                                                                                                                  + 230 +
                                                                                                                                                                                                  --fcc-editable-region-- --fcc-editable-region-- -
                                                                                                                                                                                                  - +
                                                                                                                                                                                                  + ``` @@ -86,6 +91,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -97,30 +104,38 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; } ``` diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f666ac5edea782feb7e75.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f666ac5edea782feb7e75.md index 5ec2d367970..f074a2cf764 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f666ac5edea782feb7e75.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f666ac5edea782feb7e75.md @@ -1,26 +1,26 @@ --- id: 615f666ac5edea782feb7e75 -title: Schritt 38 +title: Step 39 challengeType: 0 -dashedName: step-38 +dashedName: step-39 --- # --description-- -Create an `.md` selector and give it a `height` property of `5px`. +Create an `.medium` selector and give it a `height` property of `5px`. # --hints-- -You should create an `.md` selector. +You should create an `.medium` selector. ```js -assert(new __helpers.CSSHelp(document).getStyle('.md')); +assert(new __helpers.CSSHelp(document).getStyle('.medium')); ``` -Your `.md` selector should have a `height` property set to `5px`. +Your `.medium` selector should have a `height` property set to `5px`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.md')?.height === '5px'); +assert(new __helpers.CSSHelp(document).getStyle('.medium')?.height === '5px'); ``` # --seed-- @@ -30,28 +30,33 @@ assert(new __helpers.CSSHelp(document).getStyle('.md')?.height === '5px'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Calories

                                                                                                                                                                                                  -
                                                                                                                                                                                                  + 230
                                                                                                                                                                                                  - +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + ``` @@ -83,6 +88,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -94,15 +101,11 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } @@ -111,17 +114,29 @@ p { --fcc-editable-region-- -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; } ``` diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f671b6d1919792745aa5d.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f671b6d1919792745aa5d.md index 62fb6ca61de..0c0aa784249 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f671b6d1919792745aa5d.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f671b6d1919792745aa5d.md @@ -1,29 +1,29 @@ --- id: 615f671b6d1919792745aa5d -title: Step 39 +title: Step 40 challengeType: 0 -dashedName: step-39 +dashedName: step-40 --- # --description-- -Create a new `div` element below your `.md` element. Give it a `class` attribute set to `daily-value sm-text`. Within this new `div`, add a `p` element with the text `% Daily Value *`, and set the `class` attribute to `right bold`. +Create a new `div` element below your `.medium` element. Give it a `class` attribute set to `daily-value small-text`. Within this new `div`, add a `p` element with the text `% Daily Value *`, and set the `class` attribute to `bold right`. # --hints-- -You should create a new `div` element after your `.md` element. +You should create a new `div` element after your `.medium` element. ```js assert(document.querySelector('.label')?.lastElementChild?.localName === 'div'); assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('divider')); -assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('md')); +assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('medium')); ``` -Your new `div` should have a `class` attribute set to `daily-value sm-text`. +Your new `div` should have a `class` attribute set to `daily-value small-text`. ```js assert(document.querySelector('.label')?.lastElementChild?.classList?.contains('daily-value')); -assert(document.querySelector('.label')?.lastElementChild?.classList?.contains('sm-text')); +assert(document.querySelector('.label')?.lastElementChild?.classList?.contains('small-text')); ``` Your new `div` element should have a `p` element. @@ -38,11 +38,11 @@ Your new `p` element should have the text `% Daily Value *`. assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.textContent === '% Daily Value *'); ``` -Your new `p` element should have a `class` attribute set to `right bold`. +Your new `p` element should have a `class` attribute set to `bold right`. ```js -assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.classList?.contains('right')); assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.classList?.contains('right')); ``` # --seed-- @@ -52,32 +52,36 @@ assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.cl ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  ---fcc-editable-region-- ---fcc-editable-region-- + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Calories

                                                                                                                                                                                                  + 230
                                                                                                                                                                                                  - + --fcc-editable-region-- +
                                                                                                                                                                                                  + + --fcc-editable-region-- +
                                                                                                                                                                                                  + ``` @@ -109,6 +113,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -120,34 +126,42 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; } ``` diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6823d0815b7a991f2a75.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6823d0815b7a991f2a75.md index 9a508533c22..3873e85fbf3 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6823d0815b7a991f2a75.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6823d0815b7a991f2a75.md @@ -1,32 +1,32 @@ --- id: 615f6823d0815b7a991f2a75 -title: Schritt 40 +title: Step 42 challengeType: 0 -dashedName: step-40 +dashedName: step-42 --- # --description-- -The `float` styling is causing the new `p` element to be outside of the label's border. Use your existing `.divider` element as an example to add a new divider after the `p` element. +Use your existing `.divider` element as an example to add a new divider after the `p` element. # --hints-- -You should create a new `div` within your `.daily-value.sm-text` element. +You should create a new `div` within your `.daily-value` element. ```js -assert(document.querySelectorAll('.daily-value.sm-text > div')?.length === 1) +assert(document.querySelectorAll('.daily-value.small-text > div')?.length === 1) ``` Your new `div` should have the `class` attribute set to `divider`. ```js -assert(document.querySelector('.daily-value.sm-text > div')?.classList?.contains('divider')) +assert(document.querySelector('.daily-value.small-text > div')?.classList?.contains('divider')) ``` Your new `div` should come after your `p` element. ```js -assert(document.querySelector('.daily-value.sm-text > div')?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text > div')?.previousElementSibling?.localName === 'p'); ``` # --seed-- @@ -36,34 +36,38 @@ assert(document.querySelector('.daily-value.sm-text > div')?.previousElementSibl ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                  + ``` @@ -95,6 +99,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -106,34 +112,46 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } ``` diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6b2d164f81809efd9bdc.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6b2d164f81809efd9bdc.md index 7cb965c2767..52570a43289 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6b2d164f81809efd9bdc.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6b2d164f81809efd9bdc.md @@ -1,56 +1,62 @@ --- id: 615f6b2d164f81809efd9bdc -title: Step 42 +title: Step 43 challengeType: 0 -dashedName: step-42 +dashedName: step-43 --- # --description-- -After your last `.divider` element, create a `p` element and give it the text `Total Fat 8g 10%`. Wrap `Total Fat` in a `span` element with the `class` set to `bold`. Wrap `10%` in another `span` element with the `class` set to `bold right`. +After your last `.divider` element, create a `p` element and give it the text `Total Fat 8g 10%`. Wrap `Total Fat` in a `span` element with the `class` set to `bold`. Wrap `10%` in another `span` element with the `class` set to `bold`. Also wrap the words `Total Fat 8g` in an additional `span` element for alignment. # --hints-- You should create a new `p` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` Your new `p` element should have the text `Total Fat 8g 10%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Total Fat 8g[\s|\n]+10%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Total Fat[\s|\n]+8g[\s|\n]+10%/)); ``` -Your `p` element should have two `span` elements. +Your `p` element should have three `span` elements. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 2); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 3); ``` -Your first `span` element should wrap the text `Total Fat`. +One `span` element should wrap the text `Total Fat`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.innerText === 'Total Fat'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span > span')?.innerText === 'Total Fat'); ``` -Your first `span` element should have the `class` set to `bold`. +The `span` element around `Total Fat` should have the `class` set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.className === 'bold'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span > span')?.className === 'bold'); ``` -Your second `span` element should wrap the text `10%`. +A `span` element should wrap the text `10%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.[1]?.innerText === '10%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span + span')?.innerText === '10%'); ``` -Your second `span` element should have the `class` set to `bold right`. +The `span` element around `10%` should have the `class` set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.[1]?.className === 'bold right'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.[1]?.className === 'bold'); +``` + +A `span` element should have the text `Total Fat 8g`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Total Fat[\s|\n]+8g/)); ``` # --seed-- @@ -60,35 +66,39 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySe ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  -
                                                                                                                                                                                                  ---fcc-editable-region-- ---fcc-editable-region-- + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                  + ``` @@ -120,46 +130,59 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } ``` diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6cc778f7698258467596.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6cc778f7698258467596.md index 054289a7759..07e12417a55 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6cc778f7698258467596.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6cc778f7698258467596.md @@ -1,46 +1,45 @@ --- id: 615f6cc778f7698258467596 -title: Step 43 +title: Step 44 challengeType: 0 -dashedName: step-43 +dashedName: step-44 --- # --description-- -Below your element with the `Total Fat` text, create a new `p` element with the text `Saturated Fat 1g 5%`. Wrap the `5%` in a `span` with the `class` attribute set to `bold right`. +Below your element with the `Total Fat` text, create a new `p` element with the text `Saturated Fat 1g 5%`. Wrap the `5%` in a `span` with the `class` attribute set to `bold`. In this case this is enough to align the percentage to `5%`. # --hints-- You should create a new `p` element below your element with the `Total Fat` text. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.innerText.match(/Total Fat 8g\s*10%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.innerText.match(/Total Fat 8g\s*10%/)); ``` Your new `p` element should have the text `Saturated Fat 1g 5%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText.match(/Saturated Fat 1g\s*5%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText.match(/Saturated Fat 1g\s*5%/)); ``` Your new `p` element should have a `span` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.localName === 'span'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.localName === 'span'); ``` -Your `span` element should have the `class` attribute set to `bold right`. +Your `span` element should have the `class` attribute set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); ``` Your `span` element should wrap the `5%` text. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.innerText === "5%"); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === "5%"); ``` # --seed-- @@ -50,36 +49,40 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastEle ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                  ---fcc-editable-region-- ---fcc-editable-region-- + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                  + ``` @@ -111,46 +114,59 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } ``` diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6fddaac1e083502d3e6a.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6fddaac1e083502d3e6a.md index 569f99e7715..adf5aa23be3 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6fddaac1e083502d3e6a.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6fddaac1e083502d3e6a.md @@ -1,8 +1,8 @@ --- id: 615f6fddaac1e083502d3e6a -title: Step 44 +title: Step 45 challengeType: 0 -dashedName: step-44 +dashedName: step-45 --- # --description-- @@ -14,7 +14,7 @@ This new `p` element will need to be indented. Give it a `class` set to `indent` Your `p` element with the text `Saturated Fat 1g 5%` should have a `class` attribute set to `indent`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('indent')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('indent')); ``` # --seed-- @@ -24,36 +24,41 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                  ---fcc-editable-region-- -

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                  + ``` @@ -85,46 +90,59 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } ``` diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f70077a4ff98424236c1e.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f70077a4ff98424236c1e.md index 592f9c3bd85..5877e7de8b9 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f70077a4ff98424236c1e.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f70077a4ff98424236c1e.md @@ -1,8 +1,8 @@ --- id: 615f70077a4ff98424236c1e -title: Step 45 +title: Step 46 challengeType: 0 -dashedName: step-45 +dashedName: step-46 --- # --description-- @@ -30,34 +30,39 @@ assert(new __helpers.CSSHelp(document).getStyle('.indent')?.marginLeft === '1em' ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Calories

                                                                                                                                                                                                  + 230
                                                                                                                                                                                                  - +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + ``` @@ -89,47 +94,60 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } --fcc-editable-region-- diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f72a872354a850d4f533e.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f72a872354a850d4f533e.md index 1f363003d93..9efb21af257 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f72a872354a850d4f533e.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f72a872354a850d4f533e.md @@ -1,8 +1,8 @@ --- id: 615f72a872354a850d4f533e -title: Step 46 +title: Step 47 challengeType: 0 -dashedName: step-46 +dashedName: step-47 --- # --description-- @@ -30,34 +30,39 @@ assert(new __helpers.CSSHelp(document).getStyle('.daily-value p')?.borderBottom ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Calories

                                                                                                                                                                                                  + 230
                                                                                                                                                                                                  - +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + ``` @@ -89,47 +94,60 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f74a71f1e498619e38ee8.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f74a71f1e498619e38ee8.md index 8adb2317608..ff3c272798d 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f74a71f1e498619e38ee8.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f74a71f1e498619e38ee8.md @@ -1,8 +1,8 @@ --- id: 615f74a71f1e498619e38ee8 -title: Step 47 +title: Step 48 challengeType: 0 -dashedName: step-47 +dashedName: step-48 --- # --description-- @@ -14,16 +14,15 @@ The bottom borders under your `% Daily Value *` and `Saturated Fat 1g 5%` elemen Your `p` element with the text `% Daily Value *` should have `no-divider` added to the `class` attribute. Do not remove the existing classes. ```js -const p = document.querySelector('.daily-value.sm-text')?.firstElementChild; +const p = document.querySelector('.daily-value.small-text')?.firstElementChild; assert(p?.classList?.contains('no-divider')); assert(p?.classList?.contains('bold')); -assert(p?.classList?.contains('right')); ``` Your `p` element with the text `Saturated Fat 1g 5%` should have `no-divider` added to the `class` attribute. Do not remove the existing classes. ```js -const p = document.querySelector('.daily-value.sm-text')?.lastElementChild; +const p = document.querySelector('.daily-value.small-text')?.lastElementChild; assert(p?.classList?.contains('no-divider')); assert(p?.classList?.contains('indent')); ``` @@ -35,36 +34,41 @@ assert(p?.classList?.contains('indent')); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Saturated Fat 1g 5%

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

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                  + ``` @@ -96,47 +100,60 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ad94380408d971d14f6.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ad94380408d971d14f6.md index 57205d2fd5a..9c987e76847 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ad94380408d971d14f6.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ad94380408d971d14f6.md @@ -1,8 +1,8 @@ --- id: 615f7ad94380408d971d14f6 -title: Step 48 +title: Step 49 challengeType: 0 -dashedName: step-48 +dashedName: step-49 --- # --description-- @@ -44,37 +44,43 @@ assert(style?.borderBottom === '1px solid rgb(136, 137, 137)'); ## --seed-contents-- + ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Calories

                                                                                                                                                                                                  + 230
                                                                                                                                                                                                  - +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + ``` @@ -106,47 +112,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7bc680f7168ea01ebf99.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7bc680f7168ea01ebf99.md index 048f474b01d..552d8d73f9b 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7bc680f7168ea01ebf99.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7bc680f7168ea01ebf99.md @@ -1,8 +1,8 @@ --- id: 615f7bc680f7168ea01ebf99 -title: Step 49 +title: Step 50 challengeType: 0 -dashedName: step-49 +dashedName: step-50 --- # --description-- @@ -13,16 +13,16 @@ Your first `.no-divider` element has a `.divider` after it. Create another `.div # --hints-- -You should create a new `div` at the end of your `.daily-value.sm-text` element. +You should create a new `div` at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` Your new `div` should have the `class` attribute set to `divider`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -32,36 +32,41 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                  + ``` @@ -93,47 +98,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7c71eab8218f846e4503.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7c71eab8218f846e4503.md index c1b73b41197..dcdcd75bb31 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7c71eab8218f846e4503.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7c71eab8218f846e4503.md @@ -1,32 +1,32 @@ --- id: 615f7c71eab8218f846e4503 -title: Step 50 +title: Step 51 challengeType: 0 -dashedName: step-50 +dashedName: step-51 --- # --description-- -After your last `.divider`, create another `p` element with the text `Trans Fat 0g`. Italicize the word `Trans` by wrapping it in an `i` element. Give the new `p` element the `class` attribute set to `indent no-divider`. +After your last `.divider`, create another `p` element with the text `Trans Fat 0g`. Italicize the word `Trans` by wrapping it in an `i` element. Give the new `p` element the `class` attribute set to `indent no-divider`. Wrap `Trans Fat 0g` in a `span` element for alignment. # --hints-- -You should create a new `p` element at the end of your `.daily-value.sm-text` element. +You should create a new `p` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` Your new `p` element should have the text `Trans Fat 0g`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText === 'Trans Fat 0g'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText === 'Trans Fat 0g'); ``` Your new `p` element should have the `class` attribute set to `indent no-divider`. ```js -const p = document.querySelector('.daily-value.sm-text')?.lastElementChild; +const p = document.querySelector('.daily-value.small-text')?.lastElementChild; assert(p?.classList?.contains('indent')); assert(p?.classList?.contains('no-divider')); ``` @@ -34,13 +34,25 @@ assert(p?.classList?.contains('no-divider')); Your new `p` element should have an `i` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.localName === 'i'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('i')); ``` Your `i` element should wrap the text `Trans`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.innerText === 'Trans'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('i')?.innerText === 'Trans'); +``` + +Your new `p` element should have a `span` element. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span')); +``` + +Your `span` element should wrap the text `Trans Fat 0g`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span')?.innerText?.match(/Trans[\s|\n]+Fat 0g/)); ``` # --seed-- @@ -50,37 +62,42 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstEl ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  -
                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                  + ``` @@ -112,47 +129,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7d489a581590d1350288.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7d489a581590d1350288.md index a09ea37d34b..29fed221251 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7d489a581590d1350288.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7d489a581590d1350288.md @@ -1,8 +1,8 @@ --- id: 615f7d489a581590d1350288 -title: Schritt 51 +title: Step 52 challengeType: 0 -dashedName: step-51 +dashedName: step-52 --- # --description-- @@ -11,16 +11,16 @@ Create another `.divider` after your last `p` element. # --hints-- -You should create a new `div` element at the end of your `.daily-value.sm-text` element. +You should create a new `div` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` Your new `div` element should have the `class` attribute set to `divider`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -30,38 +30,43 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                  + ``` @@ -93,47 +98,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7de4487b64919bb4aa5e.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7de4487b64919bb4aa5e.md index 405e0647f87..7eb730507a2 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7de4487b64919bb4aa5e.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7de4487b64919bb4aa5e.md @@ -1,57 +1,62 @@ --- id: 615f7de4487b64919bb4aa5e -title: Step 52 +title: Step 53 challengeType: 0 -dashedName: step-52 +dashedName: step-53 --- # --description-- -After your last `.divider`, create a new `p` element with the text `Cholesterol 0mg 0%`. Wrap the text `Cholesterol` in a `span` element, and give that `span` element the `class` attribute set to `bold`. Wrap the text `0%` in another `span` element, with the `class` set to `bold right`. +After your last `.divider`, create a new `p` element with the text `Cholesterol 0mg 0%`. Wrap the text `Cholesterol` in a `span` element, and give that `span` element the `class` attribute set to `bold`. Wrap the text `0%` in another `span` element, with the `class` set to `bold`. Also wrap `Cholesterol 0mg` in an additional `span` element for the alignment. # --hints-- -You should create a new `p` element at the end of your `.daily-value.sm-text` element. +You should create a new `p` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` Your new `p` element should have the text `Cholesterol 0mg 0%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Cholesterol 0mg[\s|\n]+0%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Cholesterol[\s|\n]+0mg[\s|\n]+0%/)); ``` -Your new `p` element should have two `span` elements. +Your new `p` element should have three `span` elements. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 2); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 3); ``` -Your first `span` element should have the `class` attribute set to `bold`. +Your first `span` `Cholesterol` element should have the `class` attribute set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.classList?.contains('bold')); +``` + +Your first `span` element should wrap the text `Cholesterol 0mg`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.innerText?.match(/Cholesterol[\s|\n]+0mg/)); ``` Your first `span` element should wrap the text `Cholesterol`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.innerText === 'Cholesterol'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.innerText === 'Cholesterol'); ``` -Your second `span` element should have the `class` attribute set to `bold right`. +Your second `span` element should have the `class` attribute set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); ``` Your second `span` element should wrap the text `0%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.innerText === '0%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === '0%'); ``` # --seed-- @@ -61,39 +66,44 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastEle ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                  -
                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                  + ``` @@ -125,47 +135,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7e7281626a92bbd62da8.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7e7281626a92bbd62da8.md index 432939d693b..fa574f3fca5 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7e7281626a92bbd62da8.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7e7281626a92bbd62da8.md @@ -1,57 +1,62 @@ --- id: 615f7e7281626a92bbd62da8 -title: Step 53 +title: Step 54 challengeType: 0 -dashedName: step-53 +dashedName: step-54 --- # --description-- -Below your last `p` element, create another `p` element with the text `Sodium 160mg 7%`. Wrap the text `Sodium` in a `span` element with a `class` attribute set to `bold`. Wrap the `7%` text in another `span` element with the `class` set to `bold right`. +Below your last `p` element, create another `p` element with the text `Sodium 160mg 7%`. Wrap the text `Sodium` in a `span` element with a `class` attribute set to `bold`. Wrap the `7%` text in another `span` element with the `class` set to `bold`. Also add an additional `span` element around `Sodium 160mg` for aligning it correctly. # --hints-- -You should create a new `p` element at the end of your `.daily-value.sm-text` element. +You should create a new `p` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` Your new `p` element should have the text `Sodium 160mg 7%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Sodium 160mg[\s|\n]+7%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Sodium[\s|\n]160mg[\s|\n]+7%/)); ``` -Your new `p` element should have two `span` elements. +Your new `p` element should have three `span` elements. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 2); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 3); ``` -Your first `span` element should have the `class` attribute set to `bold`. +A `span` element should wrap the text `Sodium 360mg`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.innerText?.match(/Sodium[\s|\n]160mg/)); ``` -Your first `span` element should wrap the text `Sodium`. +A `span` element should wrap the text `Sodium`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.innerText === 'Sodium'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.innerText === "Sodium"); ``` -Your second `span` element should have the `class` attribute set to `bold right`. +The `span` around `Sodium` should have the `class` attribute set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.classList?.contains('bold')); ``` -Your second `span` element should wrap the text `7%`. +A `span` element should wrap the text `7%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.innerText === '7%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === '7%'); +``` + +The `span` element around `7%` should have the `class` attribute set to `bold`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); ``` # --seed-- @@ -61,40 +66,45 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastEle ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                  + ``` @@ -126,47 +136,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ecb09de9a938ef94756.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ecb09de9a938ef94756.md index 815359307b7..abbc9ee6caf 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ecb09de9a938ef94756.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ecb09de9a938ef94756.md @@ -1,57 +1,68 @@ --- id: 615f7ecb09de9a938ef94756 -title: Step 54 +title: Step 55 challengeType: 0 -dashedName: step-54 +dashedName: step-55 --- # --description-- -Add another `p` element with the text `Total Carbohydrate 37g 13%`. Like before, use `span` elements to make the text `Total Carbohydrate` bold, and the text `13%` bold and right aligned. +Add another `p` element with the text `Total Carbohydrate 37g 13%`. Like before, use `span` elements to make the text `Total Carbohydrate` and `13%` bold. Also add an additional `span` element to wrap the `Total Carbohydrate 37g` text in a span element so to have it aligned to the left, and `13%` to the right. # --hints-- -You should create a new `p` element at the end of your `.daily-value.sm-text` element. +You should create a new `p` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` Your new `p` element should have the text `Total Carbohydrate 37g 13%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Total Carbohydrate 37g[\s|\n]+13%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Total Carbohydrate[\s|\n]+37g[\s|\n]+13%/)); ``` -Your new `p` element should have two `span` elements. +Your new `p` element should have three `span` elements. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 2); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 3); ``` -Your first `span` element should have the `class` attribute set to `bold`. +One `span` element should wrap the text `Total Carbohydrate 37g`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.innerText?.match(/Total Carbohydrate[\s|\n]+37g/)); ``` -Your first `span` element should wrap the text `Total Carbohydrate`. +One `span` element should wrap the text `Total Carbohydrate`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.innerText === 'Total Carbohydrate'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.innerText === 'Total Carbohydrate'); ``` -Your second `span` element should have the `class` attribute set to `bold right`. +The `span` element around `Total Carbohydrate` should have the `class` attribute set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.classList?.contains('bold')); +``` + +A `span` element should wrap the text `13%`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === '13%'); +``` + +The `span` element around `13%` should have the `class` attribute set to `bold`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); ``` Your second `span` element should wrap the text `13%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.innerText === '13%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === '13%'); ``` # --seed-- @@ -61,41 +72,46 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastEle ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                  + ``` @@ -127,47 +143,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7fa959ab75948f96a0d6.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7fa959ab75948f96a0d6.md index e4b6b8e2f57..a7b99d026c4 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7fa959ab75948f96a0d6.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7fa959ab75948f96a0d6.md @@ -1,8 +1,8 @@ --- id: 615f7fa959ab75948f96a0d6 -title: Step 55 +title: Step 56 challengeType: 0 -dashedName: step-55 +dashedName: step-56 --- # --description-- @@ -11,30 +11,30 @@ Below your last `p` element, add another `p` element with the text `Dietary Fibe # --hints-- -You should create a new `p` and `div` element at the end of your `.daily-value.sm-text` element. +You should create a new `p` and `div` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` Your new `p` element should have the text `Dietary Fiber 4g`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.innerText.match(/Dietary Fiber[\s|\n]+4g/)); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.innerText.match(/Dietary Fiber[\s|\n]+4g/)); ``` Your new `p` element should have the `class` attribute set to `indent no-divider`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('indent')); -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('indent')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('no-divider')); ``` Your new `div` should have the `class` attribute set to `divider`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -44,42 +44,47 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                  + ``` @@ -111,47 +116,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f808d85793195b0f53be9.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f808d85793195b0f53be9.md index 1bcd018908d..ed558199175 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f808d85793195b0f53be9.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f808d85793195b0f53be9.md @@ -1,8 +1,8 @@ --- id: 615f808d85793195b0f53be9 -title: Step 56 +title: Step 57 challengeType: 0 -dashedName: step-56 +dashedName: step-57 --- # --description-- @@ -11,30 +11,30 @@ Create another `p` element after your last `.divider`, and give it the text `Tot # --hints-- -You should create a new `p` and `div` element at the end of your `.daily-value.sm-text` element. +You should create a new `p` and `div` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` Your new `p` element should have the text `Total Sugars 12g`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.innerText.match(/Total Sugars[\s|\n]+12g/)); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.innerText.match(/Total Sugars[\s|\n]+12g/)); ``` Your new `p` element should have the `class` attribute set to `indent no-divider`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('indent')); -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('indent')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('no-divider')); ``` Your new `div` should have the `class` attribute set to `divider`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -44,44 +44,49 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                  -
                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                  + ``` @@ -113,47 +118,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f829d07b18f96f6f6684b.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f829d07b18f96f6f6684b.md index 4b68bdd6b66..e4baa0707cb 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f829d07b18f96f6f6684b.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f829d07b18f96f6f6684b.md @@ -1,21 +1,21 @@ --- id: 615f829d07b18f96f6f6684b -title: Step 57 +title: Step 58 challengeType: 0 -dashedName: step-57 +dashedName: step-58 --- # --description-- -The advantage to creating these dividers is that you can apply specific classes to style them individually. Add `dbl-indent` to the `class` for your last `.divider`. +The advantage to creating these dividers is that you can apply specific classes to style them individually. Add `double-indent` to the `class` for your last `.divider`. # --hints-- -Your last `.divider` element should have `dbl-indent` added to the `class`. Do not remove the existing value. +Your last `.divider` element should have `double-indent` added to the `class`. Do not remove the existing value. ```js -const last = document.querySelector('.daily-value.sm-text')?.lastElementChild; -assert(last?.classList?.contains('dbl-indent')); +const last = document.querySelector('.daily-value.small-text')?.lastElementChild; +assert(last?.classList?.contains('double-indent')); assert(last?.classList?.contains('divider')); ``` @@ -26,46 +26,51 @@ assert(last?.classList?.contains('divider')); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                  -
                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Calories

                                                                                                                                                                                                  + 230
                                                                                                                                                                                                  - +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + ``` @@ -97,47 +102,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f83ef928ec9982b785b6a.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f83ef928ec9982b785b6a.md index f120cb64b2f..370fd147adf 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f83ef928ec9982b785b6a.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f83ef928ec9982b785b6a.md @@ -1,26 +1,26 @@ --- id: 615f83ef928ec9982b785b6a -title: Step 58 +title: Step 59 challengeType: 0 -dashedName: step-58 +dashedName: step-59 --- # --description-- -Create a `.dbl-indent` selector and give it a left margin of `2em`. +Create a `.double-indent` selector and give it a left margin of `2em`. # --hints-- -You should have a new `.dbl-indent` selector. +You should have a new `.double-indent` selector. ```js -assert(new __helpers.CSSHelp(document).getStyle('.dbl-indent')); +assert(new __helpers.CSSHelp(document).getStyle('.double-indent')); ``` -Your `.dbl-indent` selector should have a `margin-left` property set to `2em`. +Your `.double-indent` selector should have a `margin-left` property set to `2em`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.dbl-indent')?.marginLeft === '2em'); +assert(new __helpers.CSSHelp(document).getStyle('.double-indent')?.marginLeft === '2em'); ``` # --seed-- @@ -30,44 +30,49 @@ assert(new __helpers.CSSHelp(document).getStyle('.dbl-indent')?.marginLeft === ' ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                  -
                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Calories

                                                                                                                                                                                                  + 230
                                                                                                                                                                                                  - +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + ``` @@ -99,56 +104,70 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } ---fcc-editable-region-- +--fcc-editable-region-- ---fcc-editable-region-- +--fcc-editable-region-- .daily-value p:not(.no-divider) { border-bottom: 1px solid #888989; diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f84f246e8ba98e3cd97be.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f84f246e8ba98e3cd97be.md index 64d06a660a5..aaf2ace3289 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f84f246e8ba98e3cd97be.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f84f246e8ba98e3cd97be.md @@ -1,61 +1,60 @@ --- id: 615f84f246e8ba98e3cd97be -title: Step 59 +title: Step 60 challengeType: 0 -dashedName: step-59 +dashedName: step-60 --- # --description-- -Below your `.dbl-indent` element, add a new `p` element with the text `Includes 10g Added Sugars 20%`. Your new `p` element should also be double indented, and have no bottom border. Use a `span` to make the `20%` bold and right aligned. +Below your `.double-indent` element, add a new `p` element with the text `Includes 10g Added Sugars 20%`. Your new `p` element should also be double indented, and have no bottom border. Use a `span` to make the `20%` bold and right aligned. Then create another divider after that `p` element. # --hints-- -You should create a new `p` and `div` element at the end of your `.daily-value.sm-text` element. +You should create a new `p` and `div` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` Your new `p` element should have the text `Includes 10g Added Sugars 20%`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.innerText.match(/Includes 10g Added Sugars[\s|\n]+20%/)); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.innerText.match(/Includes 10g Added Sugars[\s|\n]+20%/)); ``` -Your new `p` element should have the `class` attribute set to `dbl-indent no-divider`. +Your new `p` element should have the `class` attribute set to `double-indent no-divider`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('dbl-indent')); -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('double-indent')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('no-divider')); ``` Your new `p` element should have a `span` element. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.firstElementChild?.localName === 'span'); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.firstElementChild?.localName === 'span'); ``` -Your `span` element should have the `class` attribute set to `bold right`. +Your `span` element should have the `class` attribute set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.firstElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.firstElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.firstElementChild?.classList?.contains('bold')); ``` Your `span` element should wrap the text `20%`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type span')?.innerText === '20%'); +assert(document.querySelector('.daily-value.small-text p:last-of-type span')?.innerText === '20%'); ``` Your new `div` should have the `class` attribute set to `divider`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -65,46 +64,51 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                  -
                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                  + ``` @@ -136,54 +140,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f887466db4ba14b5342cc.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f887466db4ba14b5342cc.md index cd8f2458700..0eebf4f72ec 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f887466db4ba14b5342cc.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f887466db4ba14b5342cc.md @@ -1,8 +1,8 @@ --- id: 615f887466db4ba14b5342cc -title: Step 60 +title: Step 61 challengeType: 0 -dashedName: step-60 +dashedName: step-61 --- # --description-- @@ -13,30 +13,30 @@ Following this element, create a large divider. # --hints-- -You should create a new `p` and `div` element at the end of your `.daily-value.sm-text` element. +You should create a new `p` and `div` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` Your new `p` element should have the text `Protein 3g`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.innerText.match(/Protein[\s|\n]+3g/)); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.innerText.match(/Protein[\s|\n]+3g/)); ``` Your new `p` element should have the `class` attribute set to `no-divider`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('no-divider')); ``` -Your new `div` should have the `class` attribute set to `divider lg`. +Your new `div` should have the `class` attribute set to `divider large`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('lg')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('large')); ``` # --seed-- @@ -46,48 +46,53 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                  + ``` @@ -119,54 +124,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f89e055040ba294719d2f.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f89e055040ba294719d2f.md index a2328b173c3..afd3461cfce 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f89e055040ba294719d2f.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f89e055040ba294719d2f.md @@ -1,39 +1,40 @@ --- id: 615f89e055040ba294719d2f -title: Step 61 +title: Step 62 challengeType: 0 -dashedName: step-61 +dashedName: step-62 --- # --description-- -Create another `p` element below your large divider. Give the `p` element the text `Vitamin D 2mcg 10%`. Use a `span` to make the `10%` align to the right, but do not make it bold. +Create another `p` element below your large divider. Give the `p` element the text `Vitamin D 2mcg 10%`. + +The `p` element contains only text, you can wrap the percentage in a `span` element so that it is considered a separate entity from the rest of the text, and it's moved to the right. # --hints-- -You should create a new `p` element at the end of your `.daily-value.sm-text` element. +You should create a new `p` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` Your new `p` element should have the text `Vitamin D 2mcg 10%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Vitamin D 2mcg[\s|\n]+10%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Vitamin D 2mcg[\s|\n]+10%/)); ``` Your new `p` element should have a `span` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 1); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 1); ``` -Your `span` element should have the `class` set to `right`. Remember you should not make it bold. +Your `span` element should not be bold. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.classList?.contains('right')); -assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.classList?.contains('bold')); +assert(!document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span')?.classList?.contains('bold')); ``` # --seed-- @@ -43,50 +44,55 @@ assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.queryS ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                  -
                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                  + ``` @@ -118,54 +124,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8bfe0f30a1a3c340356b.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8bfe0f30a1a3c340356b.md index 82801b25679..68a0d9093d8 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8bfe0f30a1a3c340356b.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8bfe0f30a1a3c340356b.md @@ -1,8 +1,8 @@ --- id: 615f8bfe0f30a1a3c340356b -title: Step 62 +title: Step 63 challengeType: 0 -dashedName: step-62 +dashedName: step-63 --- # --description-- @@ -11,55 +11,53 @@ Create another `p` element, give it the text `Calcium 260mg 20%`. Align `20%` to # --hints-- -You should create two new `p` elements at the end of your `.daily-value.sm-text` element. +You should create two new `p` elements at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); ``` Your first new `p` element should have the text `Calcium 260mg 20%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.innerText?.match(/Calcium 260mg[\s|\n]+20%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.innerText?.match(/Calcium 260mg[\s|\n]+20%/)); ``` Your first new `p` element should have a `span` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.localName === 'span'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.localName === 'span'); ``` -Your first `span` element should have the `class` attribute set to `right`. Remember, do not make it bold. +Your first `span` element should not be bold. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.classList?.contains('right')); -assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.classList?.contains('bold')); +assert(!document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.classList?.contains('bold')); ``` Your first `span` element should wrap the text `20%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.innerText === '20%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.innerText === '20%'); ``` Your second new `p` element should have the text `Iron 8mg 45%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Iron 8mg[\s|\n]+45%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Iron 8mg[\s|\n]+45%/)); ``` Your second new `p` element should have a `span` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.localName === 'span'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.localName === 'span'); ``` -Your second `span` element should have the `class` attribute set to `right`. Remember, do not make it bold. +Your second `span` element should not be bold. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('right')); -assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(!document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); ``` # --seed-- @@ -69,51 +67,56 @@ assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstE ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                  + ``` @@ -145,54 +148,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8f1223601fa546e93f31.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8f1223601fa546e93f31.md index 6815f4fc360..50f6553331f 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8f1223601fa546e93f31.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8f1223601fa546e93f31.md @@ -1,8 +1,8 @@ --- id: 615f8f1223601fa546e93f31 -title: Schritt 63 +title: Step 64 challengeType: 0 -dashedName: step-63 +dashedName: step-64 --- # --description-- @@ -11,35 +11,34 @@ Create the final `p` element for your `.daily-value` section. Give it the text ` # --hints-- -You should create a new `p` element at the end of your `.daily-value.sm-text` element. +You should create a new `p` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` Your new `p` element should have the `class` attribute set to `no-divider`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('no-divider')); ``` Your new `p` element should have the text `Potassium 235mg 6%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Potassium 235mg[\s|\n]+6%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Potassium 235mg[\s|\n]+6%/)); ``` Your new `p` element should have a `span` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 1); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 1); ``` -Your `span` element should have the `class` set to `right`. Remember you should not make it bold. +Your `span` element should not be bold. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.classList?.contains('right')); -assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.classList?.contains('bold')); +assert(!document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span')?.classList?.contains('bold')); ``` # --seed-- @@ -49,53 +48,58 @@ assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.queryS ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                  + ``` @@ -127,54 +131,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f905fbd1017a65ca224eb.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f905fbd1017a65ca224eb.md index 4645e9fc98f..4762abe77a4 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f905fbd1017a65ca224eb.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f905fbd1017a65ca224eb.md @@ -1,8 +1,8 @@ --- id: 615f905fbd1017a65ca224eb -title: Schritt 64 +title: Step 65 challengeType: 0 -dashedName: step-64 +dashedName: step-65 --- # --description-- @@ -23,11 +23,11 @@ You should create a new `div` after your `.daily-value` element. assert(document.querySelector('.daily-value').nextElementSibling?.localName === 'div'); ``` -Your new `div` should have the `class` set to `divider md`. +Your new `div` should have the `class` set to `divider medium`. ```js assert(document.querySelector('.daily-value')?.nextElementSibling?.classList?.contains('divider')); -assert(document.querySelector('.daily-value')?.nextElementSibling?.classList?.contains('md')); +assert(document.querySelector('.daily-value')?.nextElementSibling?.classList?.contains('medium')); ``` You should create a `p` element after your new `div` element. @@ -55,55 +55,60 @@ assert.equal(document.querySelector('.label')?.lastElementChild?.innerText, '* T ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Potassium 235mg 6%

                                                                                                                                                                                                  -
                                                                                                                                                                                                  ---fcc-editable-region-- ---fcc-editable-region-- + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Calories

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + 230
                                                                                                                                                                                                  - +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Potassium 235mg 6%

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + --fcc-editable-region-- + + --fcc-editable-region-- +
                                                                                                                                                                                                  + ``` @@ -135,54 +140,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f94786869e1a7fec54375.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f94786869e1a7fec54375.md index 7f44865429f..9fe4a4b4eac 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f94786869e1a7fec54375.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f94786869e1a7fec54375.md @@ -1,8 +1,8 @@ --- id: 615f94786869e1a7fec54375 -title: Step 65 +title: Step 66 challengeType: 0 -dashedName: step-65 +dashedName: step-66 --- # --description-- @@ -36,54 +36,60 @@ assert(new __helpers.CSSHelp(document).getStyle('.note')?.margin === '5px 0px'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Calories

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Potassium 235mg 6%

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                                                                                                                  + 230
                                                                                                                                                                                                  - +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Potassium 235mg 6%

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily + diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + ``` @@ -115,54 +121,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f951dff9317a900ef683f.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f951dff9317a900ef683f.md index cecb81aeeb4..b8f6ec4b62a 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f951dff9317a900ef683f.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f951dff9317a900ef683f.md @@ -1,8 +1,8 @@ --- id: 615f951dff9317a900ef683f -title: Step 66 +title: Step 67 challengeType: 0 -dashedName: step-66 +dashedName: step-67 --- # --description-- @@ -35,54 +35,60 @@ assert(new __helpers.CSSHelp(document).getStyle('.note')?.textIndent === '-8px') ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Calories

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Potassium 235mg 6%

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                                                                                                                  + 230
                                                                                                                                                                                                  - +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Potassium 235mg 6%

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily + diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + ``` @@ -114,54 +120,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } @@ -182,54 +202,60 @@ p { ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Calories

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                                                  -

                                                                                                                                                                                                  Potassium 235mg 6%

                                                                                                                                                                                                  -
                                                                                                                                                                                                  -
                                                                                                                                                                                                  -

                                                                                                                                                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                                                                                                                  + 230
                                                                                                                                                                                                  - +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Potassium 235mg 6%

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily + diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + ``` @@ -261,54 +287,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/635bde33c91c80540eae239b.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/635bde33c91c80540eae239b.md new file mode 100644 index 00000000000..d9073bf18ba --- /dev/null +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/635bde33c91c80540eae239b.md @@ -0,0 +1,153 @@ +--- +id: 635bde33c91c80540eae239b +title: Step 41 +challengeType: 0 +dashedName: step-41 +--- + +# --description-- + +The text `* Daily Value %` should be aligned to the right. Create a `.right` selector and use the `justify-content` property to do it. + +# --hints-- + +You should have a `.right` selector. + +```js +const hasRight = new __helpers.CSSHelp(document).getStyle('.right'); +assert(hasRight); + +``` + +The `.right` selector should have the `justify-content` property set to `flex-end`. + +```js +const rightJustifyContent = new __helpers.CSSHelp(document).getStyle('.right')?.getPropertyValue('justify-content'); +assert(rightJustifyContent === 'flex-end'); + +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Calories

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + 230 +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + + +``` + +```css +* { + box-sizing: border-box; +} + +html { + font-size: 16px; +} + +body { + font-family: 'Open Sans', sans-serif; +} + +.label { + border: 2px solid black; + width: 270px; + margin: 20px auto; + padding: 0 7px; +} + +header h1 { + text-align: center; + margin: -4px 0; + letter-spacing: 0.15px +} + +p { + margin: 0; + display: flex; + justify-content: space-between; +} + +.divider { + border-bottom: 1px solid #888989; + margin: 2px 0; +} + +.bold { + font-weight: 800; +} + +.large { + height: 10px; +} + +.large, .medium { + background-color: black; + border: 0; +} + +.medium { + height: 5px; +} + +.small-text { + font-size: 0.85rem; +} + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { + margin: -5px -2px; + font-size: 2em; + font-weight: 700; +} + +.calories-info span { + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +--fcc-editable-region-- + +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6395d33ab5d91bf317107c48.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6395d33ab5d91bf317107c48.md new file mode 100644 index 00000000000..e6f009b7e04 --- /dev/null +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6395d33ab5d91bf317107c48.md @@ -0,0 +1,117 @@ +--- +id: 6395d33ab5d91bf317107c48 +title: Step 32 +challengeType: 0 +dashedName: step-32 +--- + +# --description-- + +Create a `.calories-info h2` selector and remove all margins. + +# --hints-- + +Create a `.calories-info h2` selector. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info h2')); +``` + +Your `.calories-info h2` selector should have a `margin` set to `0`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info h2')?.margin === '0px'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + + +``` + +```css +* { + box-sizing: border-box; +} + +html { + font-size: 16px; +} + +body { + font-family: 'Open Sans', sans-serif; +} + +.label { + border: 2px solid black; + width: 270px; + margin: 20px auto; + padding: 0 7px; +} + +header h1 { + text-align: center; + margin: -4px 0; + letter-spacing: 0.15px +} + +p { + margin: 0; + display: flex; + justify-content: space-between; +} + +.divider { + border-bottom: 1px solid #888989; + margin: 2px 0; +} + +.bold { + font-weight: 800; +} + +.large { + height: 10px; +} + +.large, .medium { + background-color: black; + border: 0; +} + +.small-text { + font-size: 0.85rem; +} + +--fcc-editable-region-- + +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6396e33fe478dd264ebbf278.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6396e33fe478dd264ebbf278.md new file mode 100644 index 00000000000..6a2dbb37aa9 --- /dev/null +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6396e33fe478dd264ebbf278.md @@ -0,0 +1,135 @@ +--- +id: 6396e33fe478dd264ebbf278 +title: Step 34 +challengeType: 0 +dashedName: step-34 +--- + +# --description-- + +Create a new `.calories-info` selector and give it a `display` property set to `flex`. Also give it a `justify-content` property set to `space-between` and `align-items` property set to `flex-end`. + +# --hints-- + +You should create a `.calories-info` selector. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info')); +``` + +Your `.calories-info` selector should have a `display` property set to `flex`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info')?.display === 'flex'); +``` + +Your `.calories-info` selector should have a `justify-content` property set to `space-between`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info')?.justifyContent === 'space-between'); +``` + +Your `.calories-info` selector should have a `align-items` property set to `flex-end`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info')?.alignItems === 'flex-end'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  +

                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                  +

                                                                                                                                                                                                  Calories

                                                                                                                                                                                                  +
                                                                                                                                                                                                  + 230 +
                                                                                                                                                                                                  +
                                                                                                                                                                                                  + + +``` + +```css +* { + box-sizing: border-box; +} + +html { + font-size: 16px; +} + +body { + font-family: 'Open Sans', sans-serif; +} + +.label { + border: 2px solid black; + width: 270px; + margin: 20px auto; + padding: 0 7px; +} + +header h1 { + text-align: center; + margin: -4px 0; + letter-spacing: 0.15px +} + +p { + margin: 0; + display: flex; + justify-content: space-between; +} + +.divider { + border-bottom: 1px solid #888989; + margin: 2px 0; +} + +.bold { + font-weight: 800; +} + +.large { + height: 10px; +} + +.large, .medium { + background-color: black; + border: 0; +} + +.small-text { + font-size: 0.85rem; +} + +--fcc-editable-region-- + +--fcc-editable-region-- + +.calories-info h2 { + margin: 0; +} +``` diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c8bf3980c14c438d2aed.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c8bf3980c14c438d2aed.md index 7bec654ec15..ae7f2b797d2 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c8bf3980c14c438d2aed.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c8bf3980c14c438d2aed.md @@ -7,7 +7,7 @@ dashedName: step-39 # --description-- -For now, make your `goStore` function output the message `Going to store.` to the console. For example, here is a function that outputs the message "Hello World". +For now, make your `goStore` function output the message `Going to store.` to the console. For example, here is a function that outputs the message `Hello World`. ```js function functionName() { diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b0b5053f16111b0b6b5f.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b0b5053f16111b0b6b5f.md index c60cf5907da..8cbcb969f78 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b0b5053f16111b0b6b5f.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b0b5053f16111b0b6b5f.md @@ -47,7 +47,7 @@ Your `update` function should set `button3.onclick` to `fightDragon`. assert.match(update.toString(), /button3\.onclick\s*=\s*fightDragon/); ``` -Your `update` function should set `text.innerText` to `You are in the town square. You see a sign that says "Store".`. +Your `update` function should set `text.innerText` to `You are in the town square. You see a sign that says \"Store\".`. ```js assert.match(update.toString(), /text\.innerText\s*=\s*"You are in the town square. You see a sign that says \\"Store\\"\."/); diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md index a8bef26a706..294662a5750 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md @@ -7,7 +7,7 @@ dashedName: step-62 # --description-- -The `locations` array contains two locations: the town square and the store. Currently you are passing that entire array into the update functions. Pass in only the first element of the `locations` array by adding `[0]` at the end of the variable. For example: `myFunction(arg[0]);`. +The `locations` array contains two locations: the `town square` and the `store`. Currently you are passing that entire array into the `update` function. Pass in only the first element of the `locations` array by adding `[0]` at the end of the variable. For example: `myFunction(arg[0]);`. This is called bracket notation. Values in an array are accessed by index. Indices are numerical values and start at 0 - this is called zero-based indexing. `arg[0]` would be the first element in the `arg` array. diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md index ca8a532ec15..1506701e4ab 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md @@ -7,7 +7,7 @@ dashedName: step-67 # --description-- -Finally, update the `text.innerText` assignment to equal the `text` from the location object. However, instead of using bracket notation, use dot notation. Here is an example of accessing the `name` property of an object called `obj`: `obj.name`. +Finally, update the `text.innerText` assignment to equal the `text` from the `location` object. However, instead of using bracket notation, use dot notation. Here is an example of accessing the `name` property of an object called `obj`: `obj.name`. # --hints-- diff --git a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c89e4272512d44fc1c66.md b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c89e4272512d44fc1c66.md index cded49b4395..dab6fabe2b3 100644 --- a/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c89e4272512d44fc1c66.md +++ b/curriculum/challenges/german/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c89e4272512d44fc1c66.md @@ -7,7 +7,7 @@ dashedName: step-83 # --description-- -Similar to your `buyHealth` function, set `gold` equal to 30 less than its current value. Make sure this is inside your `if` statement. +Similar to your `buyHealth` function, set `gold` equal to `30` less than its current value. Make sure this is inside your `if` statement. # --hints-- diff --git a/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/basic-javascript/subtract-one-number-from-another-with-javascript.md b/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/basic-javascript/subtract-one-number-from-another-with-javascript.md index 627d6b8ff6b..98bcfdccbe0 100644 --- a/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/basic-javascript/subtract-one-number-from-another-with-javascript.md +++ b/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/basic-javascript/subtract-one-number-from-another-with-javascript.md @@ -26,13 +26,13 @@ Modifica lo `0` in modo che la differenza sia `12`. # --hints-- -La variabile `difference` dovrebbe essere uguale a 12. +La variabile `difference` dovrebbe essere uguale a `12`. ```js assert(difference === 12); ``` -Devi solo sottrarre un numero da 45. +Devi solo sottrarre un numero da `45`. ```js assert(/difference=45-33;?/.test(__helpers.removeWhiteSpace(code))); diff --git a/curriculum/challenges/italian/05-back-end-development-and-apis/back-end-development-and-apis-projects/exercise-tracker.md b/curriculum/challenges/italian/05-back-end-development-and-apis/back-end-development-and-apis-projects/exercise-tracker.md index 8aefca41341..76f8c1df530 100644 --- a/curriculum/challenges/italian/05-back-end-development-and-apis/back-end-development-and-apis-projects/exercise-tracker.md +++ b/curriculum/challenges/italian/05-back-end-development-and-apis/back-end-development-and-apis-projects/exercise-tracker.md @@ -20,7 +20,7 @@ Se utilizzi Replit, segui questi passaggi per impostare il progetto: - Poi vedrai una finestra `.replit`. - Seleziona `Use run command` e clicca sul pulsante `Done`. -Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo `Solution Link`. Facoltativamente, invia anche un link al codice sorgente del tuo progetto nel campo `GitHub Link`. +Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo Link alla soluzione. Facoltativamente, invia anche un link al codice sorgente del tuo progetto nel campo Link GitHub. # --instructions-- @@ -411,7 +411,7 @@ La proprietà `description` di ogni oggetto nell'array `log` restituito da `GET ```js async(getUserInput) => { const url = getUserInput('url'); - const res = await fetch(url + '/api/users/', { + const res = await fetch(url + '/api/users', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', @@ -458,7 +458,7 @@ La proprietà `duration` di ogni oggetto nell'array `log` restituito da `GET /ap ```js async(getUserInput) => { const url = getUserInput('url'); - const res = await fetch(url + '/api/users/', { + const res = await fetch(url + '/api/users', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', @@ -505,7 +505,7 @@ La proprietà `date` di ogni oggetto nell'array `log` restituito da `GET /api/us ```js async(getUserInput) => { const url = getUserInput('url'); - const res = await fetch(url + '/api/users/', { + const res = await fetch(url + '/api/users', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', diff --git a/curriculum/challenges/italian/05-back-end-development-and-apis/back-end-development-and-apis-projects/file-metadata-microservice.md b/curriculum/challenges/italian/05-back-end-development-and-apis/back-end-development-and-apis-projects/file-metadata-microservice.md index 288f5baba55..751fa4baa98 100644 --- a/curriculum/challenges/italian/05-back-end-development-and-apis/back-end-development-and-apis-projects/file-metadata-microservice.md +++ b/curriculum/challenges/italian/05-back-end-development-and-apis/back-end-development-and-apis-projects/file-metadata-microservice.md @@ -20,7 +20,7 @@ Se utilizzi Replit, segui questi passaggi per impostare il progetto: - Poi vedrai una finestra `.replit`. - Seleziona `Use run command` e clicca sul pulsante `Done`. -Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo `Solution Link`. Facoltativamente, invia anche un link al codice sorgente del tuo progetto nel campo `GitHub Link`. +Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo Link alla soluzione. Facoltativamente, invia anche un link al codice sorgente del tuo progetto nel campo Link GitHub. # --instructions-- diff --git a/curriculum/challenges/italian/05-back-end-development-and-apis/back-end-development-and-apis-projects/request-header-parser-microservice.md b/curriculum/challenges/italian/05-back-end-development-and-apis/back-end-development-and-apis-projects/request-header-parser-microservice.md index adc638b587b..5082671ffc6 100644 --- a/curriculum/challenges/italian/05-back-end-development-and-apis/back-end-development-and-apis-projects/request-header-parser-microservice.md +++ b/curriculum/challenges/italian/05-back-end-development-and-apis/back-end-development-and-apis-projects/request-header-parser-microservice.md @@ -20,7 +20,7 @@ Se utilizzi Replit, segui questi passaggi per impostare il progetto: - Poi vedrai una finestra `.replit`. - Seleziona `Use run command` e clicca sul pulsante `Done`. -Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo `Solution Link`. Facoltativamente, invia anche un link al codice sorgente del tuo progetto nel campo `GitHub Link`. +Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo Link alla soluzione. Facoltativamente, invia anche un link al codice sorgente del tuo progetto nel campo Link GitHub. # --hints-- diff --git a/curriculum/challenges/italian/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md b/curriculum/challenges/italian/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md index f6cd29becda..c6ad8fd46f5 100644 --- a/curriculum/challenges/italian/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md +++ b/curriculum/challenges/italian/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md @@ -20,7 +20,7 @@ Se utilizzi Replit, segui questi passaggi per impostare il progetto: - Poi vedrai una finestra `.replit`. - Seleziona `Use run command` e clicca sul pulsante `Done`. -Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo `Solution Link`. Facoltativamente, invia anche un link al codice sorgente del tuo progetto nel campo `GitHub Link`. +Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo Link alla soluzione. Facoltativamente, invia anche un link al codice sorgente del tuo progetto nel campo Link GitHub. **Nota:** la conversione tra fusi orari non è un proposito di questo progetto, quindi assumi che tutte le date valide saranno passate a `new Date()` come date GMT. @@ -106,7 +106,7 @@ Il tuo progetto può gestire date che possono essere lette con successo da `new ); ``` -Se la stringa della data di input non è valida, l'api restituisce un oggetto con la struttura `{ error : "Invalid Date" }` +Se la stringa della data di input non è valida, l'API restituisce un oggetto con la struttura `{ error : "Invalid Date" }` ```js (getUserInput) => diff --git a/curriculum/challenges/italian/05-back-end-development-and-apis/back-end-development-and-apis-projects/url-shortener-microservice.md b/curriculum/challenges/italian/05-back-end-development-and-apis/back-end-development-and-apis-projects/url-shortener-microservice.md index af9dd756afb..0e6057d67bf 100644 --- a/curriculum/challenges/italian/05-back-end-development-and-apis/back-end-development-and-apis-projects/url-shortener-microservice.md +++ b/curriculum/challenges/italian/05-back-end-development-and-apis/back-end-development-and-apis-projects/url-shortener-microservice.md @@ -20,7 +20,7 @@ Se utilizzi Replit, segui questi passaggi per impostare il progetto: - Poi vedrai una finestra `.replit`. - Seleziona `Use run command` e clicca sul pulsante `Done`. -Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo `Solution Link`. Facoltativamente, invia anche un link al codice sorgente del tuo progetto nel campo `GitHub Link`. +Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo Link alla soluzione. Facoltativamente, invia anche un link al codice sorgente del tuo progetto nel campo Link GitHub. # --instructions-- diff --git a/curriculum/challenges/italian/05-back-end-development-and-apis/basic-node-and-express/meet-the-node-console.md b/curriculum/challenges/italian/05-back-end-development-and-apis/basic-node-and-express/meet-the-node-console.md index 9cac84cae0a..b88ae86d6ae 100644 --- a/curriculum/challenges/italian/05-back-end-development-and-apis/basic-node-and-express/meet-the-node-console.md +++ b/curriculum/challenges/italian/05-back-end-development-and-apis/basic-node-and-express/meet-the-node-console.md @@ -20,7 +20,7 @@ Se utilizzi Replit, segui questi passaggi per impostare il progetto: - Poi vedrai una finestra `.replit`. - Seleziona `Use run command` e clicca sul pulsante `Done`. -Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo `Solution Link`. +Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo Link alla soluzione. Durante il processo di sviluppo, è importante essere in grado di controllare cosa sta succedendo nel tuo codice. diff --git a/curriculum/challenges/italian/05-back-end-development-and-apis/basic-node-and-express/serve-json-on-a-specific-route.md b/curriculum/challenges/italian/05-back-end-development-and-apis/basic-node-and-express/serve-json-on-a-specific-route.md index 47bfba8569f..46b83a83965 100644 --- a/curriculum/challenges/italian/05-back-end-development-and-apis/basic-node-and-express/serve-json-on-a-specific-route.md +++ b/curriculum/challenges/italian/05-back-end-development-and-apis/basic-node-and-express/serve-json-on-a-specific-route.md @@ -18,7 +18,7 @@ Servi l'oggetto `{"message": "Hello json"}` come risposta, in formato JSON, alle # --hints-- -L'endpoint `/json` dovrebbe servire l'oggetto json `{"message": "Hello json"}` +L'endpoint `/json` dovrebbe servire l'oggetto JSON `{"message": "Hello json"}` ```js (getUserInput) => diff --git a/curriculum/challenges/italian/05-back-end-development-and-apis/managing-packages-with-npm/how-to-use-package.json-the-core-of-any-node.js-project-or-npm-package.md b/curriculum/challenges/italian/05-back-end-development-and-apis/managing-packages-with-npm/how-to-use-package.json-the-core-of-any-node.js-project-or-npm-package.md index 41c3b6001b9..9fad7f937e9 100644 --- a/curriculum/challenges/italian/05-back-end-development-and-apis/managing-packages-with-npm/how-to-use-package.json-the-core-of-any-node.js-project-or-npm-package.md +++ b/curriculum/challenges/italian/05-back-end-development-and-apis/managing-packages-with-npm/how-to-use-package.json-the-core-of-any-node.js-project-or-npm-package.md @@ -20,7 +20,7 @@ Se utilizzi Replit, segui questi passaggi per impostare il progetto: - Poi vedrai una finestra `.replit`. - Seleziona `Use run command` e clicca sul pulsante `Done`. -Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo `Solution Link`. +Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo Link alla soluzione. Il file `package.json` è il centro di qualsiasi progetto Node.js o pacchetto npm. Memorizza informazioni sul tuo progetto, in modo simile a come la sezione <head> di un documento HTML descrive il contenuto di una pagina web. Consiste di un singolo oggetto JSON dove le informazioni sono memorizzate in coppie chiave-valore. Ci sono solo due campi obbligatori; "name" e "version", ma è buona pratica fornire ulteriori informazioni sul tuo progetto che potrebbero essere utili per futuri utenti o manutentori. diff --git a/curriculum/challenges/italian/05-back-end-development-and-apis/mongodb-and-mongoose/install-and-set-up-mongoose.md b/curriculum/challenges/italian/05-back-end-development-and-apis/mongodb-and-mongoose/install-and-set-up-mongoose.md index d4859e9a015..4b71ac45be3 100644 --- a/curriculum/challenges/italian/05-back-end-development-and-apis/mongodb-and-mongoose/install-and-set-up-mongoose.md +++ b/curriculum/challenges/italian/05-back-end-development-and-apis/mongodb-and-mongoose/install-and-set-up-mongoose.md @@ -20,7 +20,7 @@ Se utilizzi Replit, segui questi passaggi per impostare il progetto: - Poi vedrai una finestra `.replit`. - Seleziona `Use run command` e clicca sul pulsante `Done`. -Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo `Solution Link`. +Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo Link alla soluzione. In questa sfida, imposterai un database MongoDB Atlas e importerai i pacchetti necessari per connetterti ad esso. diff --git a/curriculum/challenges/italian/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md b/curriculum/challenges/italian/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md index e5b98d8de25..5b901790002 100644 --- a/curriculum/challenges/italian/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md +++ b/curriculum/challenges/italian/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md @@ -20,7 +20,7 @@ Se utilizzi Replit, segui questi passaggi per impostare il progetto: - Poi vedrai una finestra `.replit`. - Seleziona `Use run command` e clicca sul pulsante `Done`. -Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo `Solution Link`. +Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo Link alla soluzione. Un modello di motore ti permette di utilizzare file di template statici (come quelli scritti in *Pug*) nella tua app. Al runtime, il template engine sostituisce le variabili in un file modello con valori effettivi che possono essere forniti dal tuo server. Quindi trasforma il template in un file HTML statico che viene inviato al client. Questo approccio facilita la progettazione di una pagina HTML e permette di visualizzare le variabili sulla pagina senza dover effettuare una chiamata API dal client. diff --git a/curriculum/challenges/italian/06-quality-assurance/quality-assurance-and-testing-with-chai/learn-how-javascript-assertions-work.md b/curriculum/challenges/italian/06-quality-assurance/quality-assurance-and-testing-with-chai/learn-how-javascript-assertions-work.md index b87a0037a9a..32b54e58564 100644 --- a/curriculum/challenges/italian/06-quality-assurance/quality-assurance-and-testing-with-chai/learn-how-javascript-assertions-work.md +++ b/curriculum/challenges/italian/06-quality-assurance/quality-assurance-and-testing-with-chai/learn-how-javascript-assertions-work.md @@ -20,7 +20,7 @@ Se utilizzi Replit, segui questi passaggi per impostare il progetto: - Poi vedrai una finestra `.replit`. - Seleziona `Use run command` e clicca sul pulsante `Done`. -Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo `Solution Link`. +Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo Link alla soluzione. # --instructions-- diff --git a/curriculum/challenges/italian/06-quality-assurance/quality-assurance-projects/american-british-translator.md b/curriculum/challenges/italian/06-quality-assurance/quality-assurance-projects/american-british-translator.md index c240ed47bd2..a0e6ab8350f 100644 --- a/curriculum/challenges/italian/06-quality-assurance/quality-assurance-projects/american-british-translator.md +++ b/curriculum/challenges/italian/06-quality-assurance/quality-assurance-projects/american-british-translator.md @@ -20,7 +20,7 @@ Se utilizzi Replit, segui questi passaggi per impostare il progetto: - Poi vedrai una finestra `.replit`. - Seleziona `Use run command` e clicca sul pulsante `Done`. -Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo `Solution Link`. Facoltativamente, invia anche un link al codice sorgente del tuo progetto nel campo `GitHub Link`. +Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo Link alla soluzione. Facoltativamente, invia anche un link al codice sorgente del tuo progetto nel campo Link GitHub. # --instructions-- diff --git a/curriculum/challenges/italian/06-quality-assurance/quality-assurance-projects/issue-tracker.md b/curriculum/challenges/italian/06-quality-assurance/quality-assurance-projects/issue-tracker.md index 08ccc4fbd65..7ba1e46c37c 100644 --- a/curriculum/challenges/italian/06-quality-assurance/quality-assurance-projects/issue-tracker.md +++ b/curriculum/challenges/italian/06-quality-assurance/quality-assurance-projects/issue-tracker.md @@ -20,7 +20,7 @@ Se utilizzi Replit, segui questi passaggi per impostare il progetto: - Poi vedrai una finestra `.replit`. - Seleziona `Use run command` e clicca sul pulsante `Done`. -Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo `Solution Link`. Facoltativamente, invia anche un link al codice sorgente del tuo progetto nel campo `GitHub Link`. +Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo Link alla soluzione. Facoltativamente, invia anche un link al codice sorgente del tuo progetto nel campo Link GitHub. # --instructions-- diff --git a/curriculum/challenges/italian/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md b/curriculum/challenges/italian/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md index 929c42ea3e4..0394f29a039 100644 --- a/curriculum/challenges/italian/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md +++ b/curriculum/challenges/italian/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md @@ -20,7 +20,7 @@ Se utilizzi Replit, segui questi passaggi per impostare il progetto: - Poi vedrai una finestra `.replit`. - Seleziona `Use run command` e clicca sul pulsante `Done`. -Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo `Solution Link`. Facoltativamente, invia anche un link al codice sorgente del tuo progetto nel campo `GitHub Link`. +Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo Link alla soluzione. Facoltativamente, invia anche un link al codice sorgente del tuo progetto nel campo Link GitHub. # --instructions-- diff --git a/curriculum/challenges/italian/06-quality-assurance/quality-assurance-projects/personal-library.md b/curriculum/challenges/italian/06-quality-assurance/quality-assurance-projects/personal-library.md index c4163e89c35..32a65e83608 100644 --- a/curriculum/challenges/italian/06-quality-assurance/quality-assurance-projects/personal-library.md +++ b/curriculum/challenges/italian/06-quality-assurance/quality-assurance-projects/personal-library.md @@ -20,7 +20,7 @@ Se utilizzi Replit, segui questi passaggi per impostare il progetto: - Poi vedrai una finestra `.replit`. - Seleziona `Use run command` e clicca sul pulsante `Done`. -Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo `Solution Link`. Facoltativamente, invia anche un link al codice sorgente del tuo progetto nel campo `GitHub Link`. +Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo Link alla soluzione. Facoltativamente, invia anche un link al codice sorgente del tuo progetto nel campo Link GitHub. # --instructions-- diff --git a/curriculum/challenges/italian/06-quality-assurance/quality-assurance-projects/sudoku-solver.md b/curriculum/challenges/italian/06-quality-assurance/quality-assurance-projects/sudoku-solver.md index d8d14168952..b71706cd32a 100644 --- a/curriculum/challenges/italian/06-quality-assurance/quality-assurance-projects/sudoku-solver.md +++ b/curriculum/challenges/italian/06-quality-assurance/quality-assurance-projects/sudoku-solver.md @@ -20,7 +20,7 @@ Se utilizzi Replit, segui questi passaggi per impostare il progetto: - Poi vedrai una finestra `.replit`. - Seleziona `Use run command` e clicca sul pulsante `Done`. -Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo `Solution Link`. Facoltativamente, invia anche un link al codice sorgente del tuo progetto nel campo `GitHub Link`. +Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo Link alla soluzione. Facoltativamente, invia anche un link al codice sorgente del tuo progetto nel campo Link GitHub. # --instructions-- diff --git a/curriculum/challenges/italian/09-information-security/information-security-projects/anonymous-message-board.md b/curriculum/challenges/italian/09-information-security/information-security-projects/anonymous-message-board.md index 498afb7fdc2..9f8702bb87d 100644 --- a/curriculum/challenges/italian/09-information-security/information-security-projects/anonymous-message-board.md +++ b/curriculum/challenges/italian/09-information-security/information-security-projects/anonymous-message-board.md @@ -22,7 +22,7 @@ Se utilizzi Replit, segui questi passaggi per impostare il progetto: - Poi vedrai una finestra `.replit`. - Seleziona `Use run command` e clicca sul pulsante `Done`. -Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo `Solution Link`. Facoltativamente, invia anche un link al codice sorgente del tuo progetto nel campo `GitHub Link`. +Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo Link alla soluzione. Facoltativamente, invia anche un link al codice sorgente del tuo progetto nel campo Link GitHub. # --instructions-- diff --git a/curriculum/challenges/italian/09-information-security/information-security-projects/secure-real-time-multiplayer-game.md b/curriculum/challenges/italian/09-information-security/information-security-projects/secure-real-time-multiplayer-game.md index a1116b4c77b..fdfa3b6d26d 100644 --- a/curriculum/challenges/italian/09-information-security/information-security-projects/secure-real-time-multiplayer-game.md +++ b/curriculum/challenges/italian/09-information-security/information-security-projects/secure-real-time-multiplayer-game.md @@ -20,7 +20,7 @@ Se utilizzi Replit, segui questi passaggi per impostare il progetto: - Poi vedrai una finestra `.replit`. - Seleziona `Use run command` e clicca sul pulsante `Done`. -Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo `Solution Link`. Facoltativamente, invia anche un link al codice sorgente del tuo progetto nel campo `GitHub Link`. +Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo Link alla soluzione. Facoltativamente, invia anche un link al codice sorgente del tuo progetto nel campo Link GitHub. # --instructions-- diff --git a/curriculum/challenges/italian/09-information-security/information-security-projects/stock-price-checker.md b/curriculum/challenges/italian/09-information-security/information-security-projects/stock-price-checker.md index f9922324940..ddabdfaf3f7 100644 --- a/curriculum/challenges/italian/09-information-security/information-security-projects/stock-price-checker.md +++ b/curriculum/challenges/italian/09-information-security/information-security-projects/stock-price-checker.md @@ -24,7 +24,7 @@ Se utilizzi Replit, segui questi passaggi per impostare il progetto: - Poi vedrai una finestra `.replit`. - Seleziona `Use run command` e clicca sul pulsante `Done`. -Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo `Solution Link`. Facoltativamente, invia anche un link al codice sorgente del tuo progetto nel campo `GitHub Link`. +Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo Link alla soluzione. Facoltativamente, invia anche un link al codice sorgente del tuo progetto nel campo Link GitHub. # --instructions-- diff --git a/curriculum/challenges/italian/09-information-security/information-security-with-helmetjs/install-and-require-helmet.md b/curriculum/challenges/italian/09-information-security/information-security-with-helmetjs/install-and-require-helmet.md index 7bfaa275a8a..23946424ebb 100644 --- a/curriculum/challenges/italian/09-information-security/information-security-with-helmetjs/install-and-require-helmet.md +++ b/curriculum/challenges/italian/09-information-security/information-security-with-helmetjs/install-and-require-helmet.md @@ -20,7 +20,7 @@ Se utilizzi Replit, segui questi passaggi per impostare il progetto: - Poi vedrai una finestra `.replit`. - Seleziona `Use run command` e clicca sul pulsante `Done`. -Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo `Solution Link`. +Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo Link alla soluzione. Helmet ti aiuta a proteggere le tue app Express impostando varie intestazioni HTTP. diff --git a/curriculum/challenges/italian/10-coding-interview-prep/algorithms/implement-binary-search.md b/curriculum/challenges/italian/10-coding-interview-prep/algorithms/implement-binary-search.md index e7653bd27ef..267d3090020 100644 --- a/curriculum/challenges/italian/10-coding-interview-prep/algorithms/implement-binary-search.md +++ b/curriculum/challenges/italian/10-coding-interview-prep/algorithms/implement-binary-search.md @@ -10,9 +10,10 @@ dashedName: implement-binary-search Binary Search è un algoritmo con efficienza **O(log(n))** che permette di cercare un elemento dentro a un array ordinato. Funziona usando i seguenti step: -1. Trova il `value` centrale di un array ordinato. Se `value == target` allora restituiscilo (trovato!). +1. Trova il `value` centrale di un array ordinato. Se `value == target` restituisce `true` (il valore è stato trovato e la ricerca è completa). 1. Se invece `value < target`, cerca nella metà destra dell'array nella prossima comparazione. 1. Se invece `value > target`, cerca nella metà sinistra dell'array nella prossima comparazione. +1. Se dopo aver cercato nell'intero array il valore non è presente, restituisce `false` (l'array è stato setacciato e il valore non è nell'array). Come puoi vedere, stai dimessando successivamente un array, cosa che da l'efficienza log(n). Per questa sfida vogliamo vedere il tuo lavoro - come sei arrivato al valore target... la strada che hai preso! diff --git a/curriculum/challenges/italian/10-coding-interview-prep/take-home-projects/build-a-nightlife-coordination-app.md b/curriculum/challenges/italian/10-coding-interview-prep/take-home-projects/build-a-nightlife-coordination-app.md index dd2b60e7316..463a99707ea 100644 --- a/curriculum/challenges/italian/10-coding-interview-prep/take-home-projects/build-a-nightlife-coordination-app.md +++ b/curriculum/challenges/italian/10-coding-interview-prep/take-home-projects/build-a-nightlife-coordination-app.md @@ -22,7 +22,7 @@ Ecco le specifiche user story da implementare per questo progetto: **Suggerimento:** Prova a usare la API di Yelp per trovare locali nella città in cui il tuo utente cerca. Se usi l'API di Yelp, assicurati di menzionarla nella tua app. -Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo `Solution Link`. Facoltativamente, invia anche un link al codice sorgente del tuo progetto nel campo `GitHub Link`. +Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo Link alla soluzione. Facoltativamente, invia anche un link al codice sorgente del tuo progetto nel campo Link GitHub. # --solutions-- diff --git a/curriculum/challenges/italian/10-coding-interview-prep/take-home-projects/build-a-voting-app.md b/curriculum/challenges/italian/10-coding-interview-prep/take-home-projects/build-a-voting-app.md index 6d4fc15d0f4..d75572eb29b 100644 --- a/curriculum/challenges/italian/10-coding-interview-prep/take-home-projects/build-a-voting-app.md +++ b/curriculum/challenges/italian/10-coding-interview-prep/take-home-projects/build-a-voting-app.md @@ -28,7 +28,7 @@ Ecco le specifiche user story da implementare per questo progetto: **User Story:** Come utente autenticato, se non ti piacciono le opzioni su un sondaggio, puoi creare una nuova opzione. -Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo `Solution Link`. Facoltativamente, invia anche un link al codice sorgente del tuo progetto nel campo `GitHub Link`. +Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo Link alla soluzione. Facoltativamente, invia anche un link al codice sorgente del tuo progetto nel campo Link GitHub. # --solutions-- diff --git a/curriculum/challenges/italian/10-coding-interview-prep/take-home-projects/build-an-image-search-abstraction-layer.md b/curriculum/challenges/italian/10-coding-interview-prep/take-home-projects/build-an-image-search-abstraction-layer.md index fa7919b0c06..2b904adea2c 100644 --- a/curriculum/challenges/italian/10-coding-interview-prep/take-home-projects/build-an-image-search-abstraction-layer.md +++ b/curriculum/challenges/italian/10-coding-interview-prep/take-home-projects/build-an-image-search-abstraction-layer.md @@ -18,7 +18,7 @@ Ecco le specifiche user story da implementare per questo progetto: **User Story:** Puoi ottenere una lista delle stringhe usate più di recente per la ricerca. -Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo `Solution Link`. Facoltativamente, invia anche un link al codice sorgente del tuo progetto nel campo `GitHub Link`. +Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo Link alla soluzione. Facoltativamente, invia anche un link al codice sorgente del tuo progetto nel campo Link GitHub. # --solutions-- diff --git a/curriculum/challenges/italian/10-coding-interview-prep/take-home-projects/chart-the-stock-market.md b/curriculum/challenges/italian/10-coding-interview-prep/take-home-projects/chart-the-stock-market.md index eccd3d1c7b4..a4c791635ef 100644 --- a/curriculum/challenges/italian/10-coding-interview-prep/take-home-projects/chart-the-stock-market.md +++ b/curriculum/challenges/italian/10-coding-interview-prep/take-home-projects/chart-the-stock-market.md @@ -20,7 +20,7 @@ Ecco le specifiche user story da implementare per questo progetto: **User Story:** Puoi vedere cambiamenti in tempo reale quando altri utenti aggiungono o rimuovono titoli. Per questo dovrai usare Web Socket. -Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo `Solution Link`. Facoltativamente, invia anche un link al codice sorgente del tuo progetto nel campo `GitHub Link`. +Quando hai finito, assicurati che una demo funzionante del tuo progetto sia ospitata in qualche percorso pubblico. Quindi invia l'URL nel campo Link alla soluzione. Facoltativamente, invia anche un link al codice sorgente del tuo progetto nel campo Link GitHub. # --solutions-- diff --git a/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/elements-and-tags-question-a.md b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/elements-and-tags-question-a.md new file mode 100644 index 00000000000..f4b05b12871 --- /dev/null +++ b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/elements-and-tags-question-a.md @@ -0,0 +1,54 @@ +--- +id: 637f4e0e72c65bc8e73dfe1e +videoId: LGQuIIv2RVA +title: Elements and Tags Question A +challengeType: 15 +dashedName: elements-and-tags-question-a +--- + +# --description-- + +Almost all elements on an HTML page are just pieces of content wrapped in opening and closing HTML tags. + +Opening tags tell the browser this is the start of an HTML element. They are comprised of a keyword enclosed in angle brackets `<>`. For example, an opening paragraph tag looks like this: `

                                                                                                                                                                                                  `. + +Closing tags tell the browser where an element ends. They are almost the same as opening tags; the only difference is that they have a forward slash before the keyword. For example, a closing paragraph tag looks like this: `

                                                                                                                                                                                                  `. + +A full paragraph element looks like this: + +element diagram + +You can think of elements as containers for content. The opening and closing tags tell the browser what content the element contains. The browser can then use that information to determine how it should interpret and format the content. + +There are some HTML elements that do not have a closing tag. These elements often look like this: `
                                                                                                                                                                                                  ` or ``, but some can also be used without the closing forward slash such as `
                                                                                                                                                                                                  ` or ``. These are known as self-closing tags or empty elements because they don’t wrap any content. You will encounter a few of these in later lessons, but for the most part, elements will have both opening and closing tags. + +HTML has a vast list of predefined tags that you can use to create all kinds of different elements. It is important to use the correct tags for content. Using the correct tags can have a big impact on two aspects of your sites: how they are ranked in search engines; and how accessible they are to users who rely on assistive technologies, like screen readers, to use the internet. + +Using the correct elements for content is called semantic HTML. You will explore this in much more depth later on in the curriculum. + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s [Introduction to HTML video](https://www.youtube.com/watch?v=LGQuIIv2RVA&list=PL4-IK0AVhVjM0xE0K2uZRvsM7LkIhsPT-) + +## --text-- + +What are HTML tags? + +## --answers-- + +HTML tags tell the browser what content an element contains. + +--- + +HTML tags tell the browser when to load its content. + +--- + +HTML tags tell the browser what content the next element contains. + + +## --video-solution-- + +1 diff --git a/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/elements-and-tags-question-b.md b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/elements-and-tags-question-b.md new file mode 100644 index 00000000000..9e8720616fb --- /dev/null +++ b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/elements-and-tags-question-b.md @@ -0,0 +1,50 @@ +--- +id: 637f4e1672c65bc8e73dfe1f +videoId: LGQuIIv2RVA +title: Elements and Tags Question B +challengeType: 15 +dashedName: elements-and-tags-question-b +--- + +# --description-- + +Almost all elements on an HTML page are just pieces of content wrapped in opening and closing HTML tags. + +Opening tags tell the browser this is the start of an HTML element. They are comprised of a keyword enclosed in angle brackets <>. For example, an opening paragraph tag looks like this: `

                                                                                                                                                                                                  `. + +Closing tags tell the browser where an element ends. They are almost the same as opening tags; the only difference is that they have a forward slash before the keyword. For example, a closing paragraph tag looks like this: `

                                                                                                                                                                                                  `. + +A full paragraph element looks like this: + +element diagram + +You can think of elements as containers for content. The opening and closing tags tell the browser what content the element contains. The browser can then use that information to determine how it should interpret and format the content. + +There are some HTML elements that do not have a closing tag. These elements often look like this: `
                                                                                                                                                                                                  ` or ``, but some can also be used without the closing forward slash such as `
                                                                                                                                                                                                  ` or ``. These are known as self-closing tags or empty elements because they don’t wrap any content. You will encounter a few of these in later lessons, but for the most part, elements will have both opening and closing tags. + +HTML has a vast list of predefined tags that you can use to create all kinds of different elements. It is important to use the correct tags for content. Using the correct tags can have a big impact on two aspects of your sites: how they are ranked in search engines; and how accessible they are to users who rely on assistive technologies, like screen readers, to use the internet. + +Using the correct elements for content is called semantic HTML. You will explore this in much more depth later on in the curriculum. + +# --question-- + +## --text-- + +What are the three parts of most HTML elements? + +## --answers-- + +An opening tag, self closing tag, and content. + +--- + +An opening tag, closing tag, and content. + +--- + +An opening tag, closing tag, and attribute. + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/html-boilerplate-question-a.md b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/html-boilerplate-question-a.md new file mode 100644 index 00000000000..d563ebf0ac3 --- /dev/null +++ b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/html-boilerplate-question-a.md @@ -0,0 +1,55 @@ +--- +id: 637f4e1c72c65bc8e73dfe20 +videoId: V8UAEoOvqFg +title: HTML Boilerplate Question A +challengeType: 15 +dashedName: html-boilerplate-question-a +--- + +# --description-- + +To demonstrate an HTML boilerplate, you first need an HTML file to work with. + +Create a new folder on your computer and name it `html-boilerplate`. Within that folder create a new file and name it `index.html`. + +You’re probably already familiar with a lot of different types of files, for example doc, pdf, and image files. + +To let the computer know you want to create an HTML file, you need to append the filename with the `.html` extension as you have done when creating the `index.html` file. + +It is worth noting that you named your HTML file index. You should always name the HTML file that will contain the homepage of your websites `index.html`. This is because web servers will by default look for an index.html page when users land on your websites - and not having one will cause big problems. + +## The DOCTYPE + +Every HTML page starts with a doctype declaration. The doctype’s purpose is to tell the browser what version of HTML it should use to render the document. The latest version of HTML is HTML5, and the doctype for that version is simply ``. + +The doctypes for older versions of HTML were a bit more complicated. For example, this is the doctype declaration for HTML4: + +```html + +``` + +However, you probably won’t ever want to be using an older version of HTML, and so you’ll always use ``. + +Open the `index.html` file created earlier in your text editor and add `` to the very first line. + +# --question-- +## --text-- + +What is the purpose of the `DOCTYPE` declaration? + +## --answers-- + +It tells the browser which version of HTML to use to render the document. + +--- + +It tells the browser that this document uses JavaScript. + +--- + +It tells the browser the title of the document. + + +## --video-solution-- + +1 diff --git a/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/html-boilerplate-question-b.md b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/html-boilerplate-question-b.md new file mode 100644 index 00000000000..7a528432239 --- /dev/null +++ b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/html-boilerplate-question-b.md @@ -0,0 +1,47 @@ +--- +id: 637f4e2872c65bc8e73dfe21 +videoId: V8UAEoOvqFg +title: HTML Boilerplate Question B +challengeType: 15 +dashedName: html-boilerplate-question-b +--- + +# --description-- + +After you declare the doctype, you need to provide an `` element. This is what’s known as the root element of the document, meaning that every other element in the document will be a descendant of it. + +This becomes more important later on when you learn about manipulating HTML with JavaScript. For now, just know that the `html` element should be included on every HTML document. + +Back in the `index.html` file, let’s add the `` element by typing out its opening and closing tags, like so: + +```html + + + +``` + +## What is the lang attribute? +`lang` specifies the language of the text content in that element. This attribute is primarily used for improving accessibility of the webpage. It allows assistive technologies, for example screen readers, to adapt according to the language and invoke correct pronunciation. + +# --question-- + +## --text-- + +What is the `html` element? + +## --answers-- + +It is the root element in the document and tells the browser which version of HTML it should use. + +--- + +It is the root element in the document and all other elements should descend from it. + +--- + +It is the root element in the document and all other elements should come after it. + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/html-boilerplate-question-c.md b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/html-boilerplate-question-c.md new file mode 100644 index 00000000000..76ceb2841e5 --- /dev/null +++ b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/html-boilerplate-question-c.md @@ -0,0 +1,66 @@ +--- +id: 637f4e2f72c65bc8e73dfe22 +videoId: LGQuIIv2RVA +title: HTML Boilerplate Question C +challengeType: 15 +dashedName: html-boilerplate-question-c +--- + +# --description-- + +The `` element is where you put important meta-information about your webpages, and stuff required for your webpages to render correctly in the browser. Inside the ``, you should not use any element that displays content on the webpage. + +## The Charset Meta Element +You should always have the `meta` tag for the charset encoding of the webpage in the head element: ``. + +Setting the encoding is very important because it ensures that the webpage will display special symbols and characters from different languages correctly in the browser. + +## Title Element +Another element you should always include in the head of an HTML document is the `title` element: + +```html +My First Webpage +``` + +The `title` element is used to give webpages a human-readable title which is displayed in your webpage’s browser tab. + +If you didn’t include a `title` element, the webpage’s title would default to its file name. In your case that would be `index.html`, which isn’t very meaningful for users; this would make it very difficult to find your webpage if the user has many browser tabs open. + +There are many more elements that can go within the `head` of an HTML document. However, for now it’s only crucial to know about the two elements you have covered here. You will introduce more elements that go into the `head` throughout the rest of the curriculum. + +Back in `index.html` file, let’s add a `head` element with a `charset` `meta` element and a `title` within it. The head element goes within the HTML element and should always be the first element under the opening `` tag: + + +```html + + + + + + My First Webpage + + +``` + +# --question-- + +## --text-- + +What is the purpose of the `head` element? + +## --answers-- + +The `head` element is used to display all elements that are displayed on the webpage. + +--- + +The `head` element is used to display important information about your webpage and is used to render web pages correctly with `meta` elements. + +--- + +The `head` element is used to display the header content on top of the webpage. + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/html-boilerplate-question-d.md b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/html-boilerplate-question-d.md new file mode 100644 index 00000000000..302b6a95d44 --- /dev/null +++ b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/html-boilerplate-question-d.md @@ -0,0 +1,48 @@ +--- +id: 637f4e3672c65bc8e73dfe23 +videoId: V8UAEoOvqFg +title: HTML Boilerplate Question D +challengeType: 15 +dashedName: html-boilerplate-question-d +--- + +# --description-- + +The final element needed to complete the HTML boilerplate is the `` element. This is where all the content that will be displayed to users will go - the text, images, lists, links, and so on. + +To complete the boilerplate, add a `body` element to the `index.html` file. The `body` element also goes within the `html` element and is always below the `head` element, like so: + +# --question-- + +## --assignment-- + +Watch and follow along to Kevin Powell’s brilliant Building your first web page video above. + +--- + +Build some muscle memory by deleting the contents of the `index.html` file and trying to write out all the boilerplate again from memory. Don’t worry if you have to peek at the lesson content the first few times if you get stuck. Just keep going until you can do it a couple of times from memory. + +--- + +Run your boilerplate through this [HTML validator](https://www.freeformatter.com/html-validator.html). Validators ensure your markup is correct and are an excellent learning tool, as they provide feedback on syntax errors you may be making often and aren’t aware of, such as missing closing tags and extra spaces in your HTML. + +## --text-- + +What is the purpose of the `body` element? + +## --answers-- + +This is where all important information about the webpage is displayed such as the `title` and `meta` tags. + +--- + +This is where you tell the browser how to render the webpage correctly. + +--- + +This is where all content will be displayed on the page such images, text, and links. + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-a.md b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-a.md new file mode 100644 index 00000000000..aa20f137e89 --- /dev/null +++ b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-a.md @@ -0,0 +1,42 @@ +--- +id: 6374f208de18c50e48ba767b +videoId: LGQuIIv2RVA +title: Introduction To HTML and CSS Question A +challengeType: 15 +dashedName: introduction-to-html-and-css-question-a +--- + +# --description-- + +HTML and CSS are two languages that work together to create everything that you see when you look at something on the internet. HTML is the raw data that a webpage is built out of. All the text, links, cards, lists, and buttons are created in HTML. CSS is what adds style to those plain elements. HTML puts information on a webpage, and CSS positions that information, gives it color, changes the font, and makes it look great! + +Many helpful resources out there keep referring to HTML and CSS as programming languages, but if you want to get technical, labeling them as such is not quite accurate. This is because they are only concerned with presenting information. They are not used to program logic. JavaScript, which you will learn in the next section, is a programming language because it’s used to make webpages do things. Yet, there is quite a lot you can do with just HTML and CSS, and you will definitely need them both. Throughout our curriculum, the following lessons focus on giving you the tools you need to succeed once you reach JavaScript content. + +# --question-- + +## --assignment-- + +Read the HTML vs CSS vs JavaScript article. It is a quick overview of the relationships between HTML, CSS, and JavaScript. + +## --text-- + +Which of the following statements is true? + +## --answers-- + +CSS is used to create the basic structure of a webpage, and HTML is used to add style. + +--- + +HTML is used to create the basic structure of a webpage, and CSS is used to add style. + +--- + +HTML and CSS are used to add style to a webpage, and JavaScript is used to create the basic structure. + + +## --video-solution-- + +2 + + diff --git a/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-b.md b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-b.md new file mode 100644 index 00000000000..cd9cf900330 --- /dev/null +++ b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-b.md @@ -0,0 +1,37 @@ +--- +id: 6376327e2724a688c04636e3 +videoId: LGQuIIv2RVA +title: Introduction To HTML and CSS Question B +challengeType: 15 +dashedName: introduction-to-html-and-css-question-b +--- + +# --description-- + + +HTML and CSS are two languages that work together to create everything that you see when you look at something on the internet. HTML is the raw data that a webpage is built out of. All the text, links, cards, lists, and buttons are created in HTML. CSS is what adds style to those plain elements. HTML puts information on a webpage, and CSS positions that information, gives it color, changes the font, and makes it look great! + +Many helpful resources out there keep referring to HTML and CSS as programming languages, but if you want to get technical, labeling them as such is not quite accurate. This is because they are only concerned with presenting information. They are not used to program logic. JavaScript, which you will learn in the next section, is a programming language because it’s used to make webpages do things. Yet, there is quite a lot you can do with just HTML and CSS, and you will definitely need them both. Throughout our curriculum, the following lessons focus on giving you the tools you need to succeed once you reach JavaScript content. + +# --question-- + +## --text-- + +Between HTML and CSS, which should you use to add paragraphs of text on a webpage? + +## --answers-- + +CSS + +--- + +JavaScript + +--- + +HTML + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-c.md b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-c.md new file mode 100644 index 00000000000..eb759394680 --- /dev/null +++ b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-c.md @@ -0,0 +1,34 @@ +--- +id: 637633162724a688c04636e4 +videoId: LGQuIIv2RVA +title: Introduction To HTML and CSS Question C +challengeType: 15 +dashedName: introduction-to-html-and-css-question-c +--- + +# --description-- + +HTML and CSS are two languages that work together to create everything that you see when you look at something on the internet. HTML is the raw data that a webpage is built out of. All the text, links, cards, lists, and buttons are created in HTML. CSS is what adds style to those plain elements. HTML puts information on a webpage, and CSS positions that information, gives it color, changes the font, and makes it look great! + +Many helpful resources out there keep referring to HTML and CSS as programming languages, but if you want to get technical, labeling them as such is not quite accurate. This is because they are only concerned with presenting information. They are not used to program logic. JavaScript, which you will learn in the next section, is a programming language because it’s used to make webpages do things. Yet, there is quite a lot you can do with just HTML and CSS, and you will definitely need them both. Throughout our curriculum, the following lessons focus on giving you the tools you need to succeed once you reach JavaScript content. +# --question-- + +## --text-- + +Between HTML and CSS, which should you use to change the font and background color of a button? + +## --answers-- + +You should use CSS to change the background color and font of a button. + +--- + +You should use JavaScript to change the background color and font of a button. + +--- + +You should use HTML to change the background color and font of a button. + +## --video-solution-- + +1 diff --git a/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-d.md b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-d.md new file mode 100644 index 00000000000..9e9ee049b75 --- /dev/null +++ b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-d.md @@ -0,0 +1,35 @@ +--- +id: 637633672724a688c04636e5 +videoId: LGQuIIv2RVA +title: Introduction To HTML and CSS Question D +challengeType: 15 +dashedName: introduction-to-html-and-css-question-d +--- + +# --description-- + +HTML and CSS are two languages that work together to create everything that you see when you look at something on the internet. HTML is the raw data that a webpage is built out of. All the text, links, cards, lists, and buttons are created in HTML. CSS is what adds style to those plain elements. HTML puts information on a webpage, and CSS positions that information, gives it color, changes the font, and makes it look great! + +Many helpful resources out there keep referring to HTML and CSS as programming languages, but if you want to get technical, labeling them as such is not quite accurate. This is because they are only concerned with presenting information. They are not used to program logic. JavaScript, which you will learn in the next section, is a programming language because it’s used to make webpages do things. Yet, there is quite a lot you can do with just HTML and CSS, and you will definitely need them both. Throughout our curriculum, the following lessons focus on giving you the tools you need to succeed once you reach JavaScript content. + +# --question-- + +## --text-- + +What is the difference between HTML, CSS, and JavaScript? + +## --answers-- + +HTML is for creating interactive elements, CSS is for the look and feel, and JavaScript is for creating the structure of a webpage. + +--- + +CSS is for the look and feel, JavaScript is for creating interactive elements, and HTML is for creating the structure of a webpage. + +--- + +JavaScript is for the look and feel, CSS is for creating the structure, and HTML is for creating interactive elements of a webpage. + +## --video-solution-- + +2 diff --git a/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/links-and-images-question-a.md b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/links-and-images-question-a.md new file mode 100644 index 00000000000..b4d237448f3 --- /dev/null +++ b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/links-and-images-question-a.md @@ -0,0 +1,66 @@ +--- +id: 637f704072c65bc8e73dfe36 +videoId: tsEQgGjSmkM +title: Links and Images Question A +challengeType: 15 +dashedName: links-and-images-question-a +--- + +# --description-- + +To get some practice using links and images throughout this lesson you need an HTML project to work with. + +- Create a new directory named `odin-links-and-images`. + +- Within that directory, create a new file named `index.html`. + +- Fill in the usual HTML boilerplate. + +- Finally, add the following `h1` to the `body`: `

                                                                                                                                                                                                  Homepage

                                                                                                                                                                                                  ` + +## Anchor Elements +To create a link in HTML, you use the anchor element. An anchor element is defined by wrapping the text or another HTML element you want to be a link with an `` tag. Add the following to the `body` of the `index.html` page you created and open it in the browser: + +```html +click me +``` + +You may have noticed that clicking this link doesn’t do anything. This is because an anchor tag on its own won’t know where you want to link to. You have to tell it a destination to go to. You do this by using an HTML attribute. + +An HTML attribute gives additional information to an HTML element and always goes in the element’s opening tag. An attribute is usually made up of two parts: a name, and a value; however, not all attributes require a value. In your case, you need to add a `href` (hyperlink reference) attribute to the opening anchor tag. The value of the `href` attribute is the destination you want your link to go to. + +Add the following `href` attribute to the anchor element you created previously and try clicking it again, don’t forget to refresh the browser so the new changes can be applied. + +```html +click me +``` + +By default, any text wrapped with an anchor tag without a `href` attribute will look like plain text. If the `href` attribute is present, the browser will give the text a blue color and underline it to signify it is a link. + +It’s worth noting you can use anchor tags to link to any kind of resource on the internet, not just other HTML documents. You can link to videos, pdf files, images, and so on, but for the most part, you will be linking to other HTML documents. + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s HTML Links video above. + +## --text-- + +What HTML tag is used to create a link? + +## --answers-- + +`` + +--- + +`

                                                                                                                                                                                                  ` + +--- + +`

                                                                                                                                                                                                    ` + +## --video-solution-- + +1 diff --git a/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/links-and-images-question-b.md b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/links-and-images-question-b.md new file mode 100644 index 00000000000..164fb01214f --- /dev/null +++ b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/links-and-images-question-b.md @@ -0,0 +1,55 @@ +--- +id: 637f703572c65bc8e73dfe35 +videoId: tsEQgGjSmkM +title: Links and Images Question B +challengeType: 15 +dashedName: links-and-images-question-b +--- + +# --description-- + +To get some practice using links and images throughout this lesson you need an HTML project to work with. + +- Create a new directory named odin-links-and-images. + +- Within that directory, create a new file named index.html. + +- Fill in the usual HTML boilerplate. + +- finally, add the following h1 to the body: `

                                                                                                                                                                                                    Homepage

                                                                                                                                                                                                    ` + +## Anchor Elements +To create a link in HTML, you use the anchor element. An anchor element is defined by wrapping the text or another HTML element you want to be a link with an `
                                                                                                                                                                                                    ` tag. Add the following to the body of the index.html page you created and open it in the browser: + +```html +click me +``` + +You may have noticed that clicking this link doesn’t do anything. This is because an anchor tag on its own won’t know where you want to link to. You have to tell it a destination to go to. You do this by using an HTML attribute. An HTML attribute gives additional information to an HTML element and always goes in the element’s opening tag. An attribute is usually made up of two parts: a name, and a value; however, not all attributes require a value. In your case, you need to add a href (hyperlink reference) attribute to the opening anchor tag. The value of the href attribute is the destination you want your link to go to. Add the following href attribute to the anchor element you created previously and try clicking it again, don’t forget to refresh the browser so the new changes can be applied. + +```html +click me +``` + +By default, any text wrapped with an anchor tag without a `href` attribute will look like plain text. If the `href` attribute is present, the browser will give the text a blue color and underline it to signify it is a link. It’s worth noting you can use anchor tags to link to any kind of resource on the internet, not just other HTML documents. You can link to videos, pdf files, images, and so on, but for the most part, you will be linking to other HTML documents. + +# --question-- +## --text-- + +What is an attribute? +## --answers-- + +An HTML attribute gives additional information to an HTML element and always goes in the element’s closing tag. + +--- + +An HTML attribute is used to tell the browser what the element contains. + +--- + +An HTML attribute gives additional information to an HTML element and always goes in the element’s opening tag. + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/links-and-images-question-c.md b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/links-and-images-question-c.md new file mode 100644 index 00000000000..c8a3913d77e --- /dev/null +++ b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/links-and-images-question-c.md @@ -0,0 +1,56 @@ +--- +id: 637f703072c65bc8e73dfe34 +videoId: tsEQgGjSmkM +title: Links and Images Question C +challengeType: 15 +dashedName: links-and-images-question-c +--- + +# --description-- + +To get some practice using links and images throughout this lesson you need an HTML project to work with. + +- Create a new directory named odin-links-and-images. + +- Within that directory, create a new file named index.html. + +- Fill in the usual HTML boilerplate. + +- finally, add the following h1 to the body: `

                                                                                                                                                                                                    Homepage

                                                                                                                                                                                                    ` + +## Anchor Elements +To create a link in HTML, you use the anchor element. An anchor element is defined by wrapping the text or another HTML element you want to be a link with an `` tag. Add the following to the body of the index.html page you created and open it in the browser: + +```html +click me +``` + +You may have noticed that clicking this link doesn’t do anything. This is because an anchor tag on its own won’t know where you want to link to. You have to tell it a destination to go to. You do this by using an HTML attribute. An HTML attribute gives additional information to an HTML element and always goes in the element’s opening tag. An attribute is usually made up of two parts: a name, and a value; however, not all attributes require a value. In your case, you need to add a href (hyperlink reference) attribute to the opening anchor tag. The value of the href attribute is the destination you want your link to go to. Add the following href attribute to the anchor element you created previously and try clicking it again, don’t forget to refresh the browser so the new changes can be applied. + +```html +click me +``` + +By default, any text wrapped with an anchor tag without a `href` attribute will look like plain text. If the `href` attribute is present, the browser will give the text a blue color and underline it to signify it is a link. It’s worth noting you can use anchor tags to link to any kind of resource on the internet, not just other HTML documents. You can link to videos, pdf files, images, and so on, but for the most part, you will be linking to other HTML documents. + +# --question-- + +## --text-- + +What attribute tells links where to go to? + +## --answers-- + +`src` + +--- + +`href` + +--- + +`link` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/links-and-images-question-d.md b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/links-and-images-question-d.md new file mode 100644 index 00000000000..2b6a665eb87 --- /dev/null +++ b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/links-and-images-question-d.md @@ -0,0 +1,112 @@ +--- +id: 637f702872c65bc8e73dfe33 +videoId: ta3Oxx7Yqbo +title: Links and Images Question D +challengeType: 15 +dashedName: links-and-images-question-d +--- + +# --description-- + + +Generally, there are two kinds of links you will create: + +- Links to pages on other websites on the internet + +- Links to pages located on your own websites + + +## Absolute Links +Links to pages on other websites on the internet are called absolute links. A typical absolute link will be made up of the following parts: `protocol://domain/path`. An absolute link will always contain the protocol and domain of the destination. + +You’ve already seen an absolute link in action. The link you created to The Odin Project’s About page earlier was an absolute link as it contains the protocol and domain. + +`https://www.theodinproject.com/about` + +## Relative Links +Links to other pages within your own website are called relative links. Relative links do not include the domain name, since it is another page on the same site, it assumes the domain name will be the same as the page you created the link on. + +Relative links only include the file path to the other page, relative to the page you are creating the link on. This is quite abstract, let’s see this in action using an example. + +Within the `odin-links-and-images` directory, create another HTML file named `about.html` and paste the following code into it: + +```html + + + + + Odin Links and Images + + + +

                                                                                                                                                                                                    About Page

                                                                                                                                                                                                    + + +``` + +Back in the index page, add the following anchor element to create a link to the about page: + +```html + +

                                                                                                                                                                                                    Homepage

                                                                                                                                                                                                    + click me + + About + +``` + +Open the index file in a browser and click on the about link to make sure it is all wired together correctly. Clicking the link should go to the about page you just created. + +This works because the index and about page are in the same directory. That means you can simply use its name (`about.html`) as the link’s href value. + +But you will usually want to organize your website directories a little better. Normally you would only have the `index.html` at the root directory and all other HTML files in their own directory. + +Create a directory named `pages` within the `odin-links-and-images` directory and move the `about.html` file into this new directory. + +Refresh the index page in the browser and then click on the about link. It will now be broken. This is because the location of the about page file has changed. + +To fix this, you just need to update the about link `href` value to include the `pages/` directory since that is the new location of the about file relative to the index file. + +```html + +

                                                                                                                                                                                                    Homepage

                                                                                                                                                                                                    + About + +``` + +Refresh the index page in the browser and try clicking the about link again, it should now be back in working order. + +In many cases, this will work just fine; however, you can still run into unexpected issues with this approach. Prepending `./` before the link will in most cases prevent such issues. By adding `./` you are specifying to your code that it should start looking for the file/directory relative to the **current** directory. + +```html + +

                                                                                                                                                                                                    Homepage

                                                                                                                                                                                                    + About + +``` + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s HTML File Structure video above. + +## --text-- + +What is the difference between an absolute and a relative link? + +## --answers-- + +An absolute link is a link to another page on the current website. A relative link is a link to another website. + +--- + +An absolute link is a link to another website. A relative link is a link another page on the current website. + +--- + +There is no difference between absolute and relative links. + +## --video-solution-- + +2 diff --git a/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/links-and-images-question-e.md b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/links-and-images-question-e.md new file mode 100644 index 00000000000..a935ae3262a --- /dev/null +++ b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/links-and-images-question-e.md @@ -0,0 +1,98 @@ +--- +id: 637f702372c65bc8e73dfe32 +videoId: 0xoztJCHpbQ +title: Links and Images Question E +challengeType: 15 +dashedName: links-and-images-question-e +--- + +# --description-- + +Websites would be fairly boring if they could only display text. Luckily HTML provides a wide variety of elements for displaying all sorts of different media. The most widely used of these is the image element. + +To display an image in HTML you use the `` element. Unlike the other elements you have encountered, the `` element is self-closing. Empty, self-closing HTML elements do not need a closing tag. + +Instead of wrapping content with an opening and closing tag, it embeds an image into the page using a `src` attribute which tells the browser where the image file is located. The `src` attribute works much like the `href` attribute for anchor tags. It can embed an image using both absolute and relative paths. + +For example, using an absolute path you can display an image located on The Odin Project site: + + + +To use images that you have on your own websites, you can use a relative path. + +- Create a new directory named `images` within the `odin-links-and-images` project. + +- Next, download [this image](https://unsplash.com/photos/Mv9hjnEUHR4/download?force=true&w=640) and move it into the `images` directory you just created. + +- Rename the image to `dog.jpg`. + +Finally add the image to the `index.html` file: + +```html + +

                                                                                                                                                                                                    Homepage

                                                                                                                                                                                                    + click me + + About + + + +``` + +Save the `index.html` file and open it in a browser to view Charles in all his glory. + + +## Parent Directories + +What if you want to use the dog image in the about page? You would first have to go up one level out of the pages directory into its parent directory so you could then access the images directory. + +To go to the parent directory you need to use two dots in the relative filepath like this: `../.` Let’s see this in action, within the body of the `about.html` file, add the following image below the heading you added earlier: + +```html + +``` + +To break this down: + +- First, you are going to the parent directory of the pages directory which is `odin-links-and-images`. + +- Then, from the parent directory, you can go into the `images` directory. + +- Finally, you can access the `dog.jpg` file. + +Using the metaphor we used earlier, using `../` in a filepath is kind of like stepping out from the room you are currently in to the main hallway so you can go to another room. + +## `Alt` attribute + +Besides the `src` attribute, every image element should also have an `alt` (alternative text) attribute. + +The `alt` attribute is used to describe an image. It will be used in place of the image if it cannot be loaded. It is also used with screen readers to describe what the image is to visually impaired users. + +This is how the The Odin Project logo example you used earlier looks with an `alt` attribute included: + + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s HTML Images Video above. + +## --text-- + +Which tag is used to display an image? + +## --answers-- + +`` + +--- + +`` + +--- + +`` + +## --video-solution-- + +3 diff --git a/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/links-and-images-question-f.md b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/links-and-images-question-f.md new file mode 100644 index 00000000000..ba4eb809e5d --- /dev/null +++ b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/links-and-images-question-f.md @@ -0,0 +1,94 @@ +--- +id: 637f701c72c65bc8e73dfe31 +videoId: 0xoztJCHpbQ +title: Links and Images Question F +challengeType: 15 +dashedName: links-and-images-question-f +--- + +# --description-- + +Websites would be fairly boring if they could only display text. Luckily HTML provides a wide variety of elements for displaying all sorts of different media. The most widely used of these is the image element. + +To display an image in HTML you use the `` element. Unlike the other elements you have encountered, the `` element is self-closing. Empty, self-closing HTML elements do not need a closing tag. + +Instead of wrapping content with an opening and closing tag, it embeds an image into the page using a src attribute which tells the browser where the image file is located. The src attribute works much like the href attribute for anchor tags. It can embed an image using both absolute and relative paths. + +For example, using an absolute path you can display an image located on The Odin Project site: + + + +To use images that you have on your own websites, you can use a relative path. + +- Create a new directory named `images` within the `odin-links-and-images` project. + +- Next, download [this image](https://unsplash.com/photos/Mv9hjnEUHR4/download?force=true&w=640) and move it into the images directory you just created. + +- Rename the image to `dog.jpg`. + +Finally add the image to the `index.html` file: + +```html + +

                                                                                                                                                                                                    Homepage

                                                                                                                                                                                                    +
                                                                                                                                                                                                    click me + + About + + + +``` + +Save the `index.html` file and open it in a browser to view Charles in all his glory. + + +## Parent Directories + +What if you want to use the dog image in the about page? You would first have to go up one level out of the pages directory into its parent directory so you could then access the images directory. + +To go to the parent directory you need to use two dots in the relative filepath like this: `../.` Let’s see this in action, within the body of the `about.html` file, add the following image below the heading you added earlier: + +```html + +``` + +To break this down: + +- First, you are going to the parent directory of the pages directory which is `odin-links-and-images`. + +- Then, from the parent directory, you can go into the `images` directory. + +- Finally, you can access the `dog.jpg` file. + +Using the metaphor we used earlier, using `../` in a filepath is kind of like stepping out from the room you are currently in to the main hallway so you can go to another room. + +## Alt attribute + +Besides the src attribute, every image element should also have an alt (alternative text) attribute. + +The alt attribute is used to describe an image. It will be used in place of the image if it cannot be loaded. It is also used with screen readers to describe what the image is to visually impaired users. + +This is how the The Odin Project logo example you used earlier looks with an alt attribute included: + + +# --question-- + +## --text-- + +What two attributes do images always need to have? + +## --answers-- + +`href` and `alt` + +--- + +`name` and `href` + +--- + +`alt` and `src` + +## --video-solution-- + +3 diff --git a/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/links-and-images-question-g.md b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/links-and-images-question-g.md new file mode 100644 index 00000000000..d1a6fcd4406 --- /dev/null +++ b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/links-and-images-question-g.md @@ -0,0 +1,94 @@ +--- +id: 637f701572c65bc8e73dfe30 +videoId: 0xoztJCHpbQ +title: Links and Images Question G +challengeType: 15 +dashedName: links-and-images-question-g +--- + +# --description-- + +Websites would be fairly boring if they could only display text. Luckily HTML provides a wide variety of elements for displaying all sorts of different media. The most widely used of these is the image element. + +To display an image in HTML you use the `` element. Unlike the other elements you have encountered, the `` element is self-closing. Empty, self-closing HTML elements do not need a closing tag. + +Instead of wrapping content with an opening and closing tag, it embeds an image into the page using a src attribute which tells the browser where the image file is located. The src attribute works much like the href attribute for anchor tags. It can embed an image using both absolute and relative paths. + +For example, using an absolute path you can display an image located on The Odin Project site: + + + +To use images that you have on your own websites, you can use a relative path. + +- Create a new directory named `images` within the `odin-links-and-images` project. + +- Next, download [this image](https://unsplash.com/photos/Mv9hjnEUHR4/download?force=true&w=640) and move it into the images directory you just created. + +- Rename the image to `dog.jpg`. + +Finally add the image to the `index.html` file: + +```html + +

                                                                                                                                                                                                    Homepage

                                                                                                                                                                                                    + click me + + About + + + +``` + +Save the `index.html` file and open it in a browser to view Charles in all his glory. + + +## Parent Directories + +What if you want to use the dog image in the about page? You would first have to go up one level out of the pages directory into its parent directory so you could then access the images directory. + +To go to the parent directory you need to use two dots in the relative filepath like this: `../.` Let’s see this in action, within the body of the `about.html` file, add the following image below the heading you added earlier: + +```html + +``` + +To break this down: + +- First, you are going to the parent directory of the pages directory which is `odin-links-and-images`. + +- Then, from the parent directory, you can go into the `images` directory. + +- Finally, you can access the `dog.jpg` file. + +Using the metaphor we used earlier, using `../` in a filepath is kind of like stepping out from the room you are currently in to the main hallway so you can go to another room. + +## Alt attribute + +Besides the src attribute, every image element should also have an alt (alternative text) attribute. + +The alt attribute is used to describe an image. It will be used in place of the image if it cannot be loaded. It is also used with screen readers to describe what the image is to visually impaired users. + +This is how the The Odin Project logo example you used earlier looks with an alt attribute included: + + +# --question-- + +## --text-- + +How do you access a parent directory in a filepath? + +## --answers-- + +`../` + +--- + +`./` + +--- + +`.../` + +## --video-solution-- + +1 diff --git a/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/links-and-images-question-h.md b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/links-and-images-question-h.md new file mode 100644 index 00000000000..cfd73fcfbc1 --- /dev/null +++ b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/links-and-images-question-h.md @@ -0,0 +1,98 @@ +--- +id: 637f700b72c65bc8e73dfe2f +videoId: 0xoztJCHpbQ +title: Links and Images Question H +challengeType: 15 +dashedName: links-and-images-question-h +--- + +# --description-- + +Websites would be fairly boring if they could only display text. Luckily HTML provides a wide variety of elements for displaying all sorts of different media. The most widely used of these is the image element. + +To display an image in HTML you use the `` element. Unlike the other elements you have encountered, the `` element is self-closing. Empty, self-closing HTML elements do not need a closing tag. + +Instead of wrapping content with an opening and closing tag, it embeds an image into the page using a src attribute which tells the browser where the image file is located. The src attribute works much like the href attribute for anchor tags. It can embed an image using both absolute and relative paths. + +For example, using an absolute path you can display an image located on The Odin Project site: + + + +To use images that you have on your own websites, you can use a relative path. + +- Create a new directory named `images` within the `odin-links-and-images` project. + +- Next, download [this image](https://unsplash.com/photos/Mv9hjnEUHR4/download?force=true&w=640) and move it into the images directory you just created. + +- Rename the image to `dog.jpg`. + +Finally add the image to the `index.html` file: + +```html + +

                                                                                                                                                                                                    Homepage

                                                                                                                                                                                                    + click me + + About + + + +``` + +Save the `index.html` file and open it in a browser to view Charles in all his glory. + + +## Parent Directories + +What if you want to use the dog image in the about page? You would first have to go up one level out of the pages directory into its parent directory so you could then access the images directory. + +To go to the parent directory you need to use two dots in the relative filepath like this: `../.` Let’s see this in action, within the body of the `about.html` file, add the following image below the heading you added earlier: + +```html + +``` + +To break this down: + +- First, you are going to the parent directory of the pages directory which is `odin-links-and-images`. + +- Then, from the parent directory, you can go into the `images` directory. + +- Finally, you can access the `dog.jpg` file. + +Using the metaphor we used earlier, using `../` in a filepath is kind of like stepping out from the room you are currently in to the main hallway so you can go to another room. + +## Alt attribute + +Besides the src attribute, every image element should also have an alt (alternative text) attribute. + +The alt attribute is used to describe an image. It will be used in place of the image if it cannot be loaded. It is also used with screen readers to describe what the image is to visually impaired users. + +This is how the The Odin Project logo example you used earlier looks with an alt attribute included: + + +# --question-- + +## --assignment-- + +Read about the four main image formats that can be used on the web. + +## --text-- + +What are the four main image formats that you can use for images on the web? + +## --answers-- + +TIFF, GIF, PNG, and SVG. + +--- + +JPG, PNG, GIF, and SVG. + +--- + +JPG, PDF, SVG, and GIF. + +## --video-solution-- + +2 diff --git a/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/project-create-a-recipe-page.md b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/project-create-a-recipe-page.md new file mode 100644 index 00000000000..657a3f6e32d --- /dev/null +++ b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/project-create-a-recipe-page.md @@ -0,0 +1,204 @@ +--- +id: 6391d1a4f7ac71efd0621380 +title: Build a Recipe Page Project +challengeType: 14 +dashedName: project-create-a-recipe-page +--- + +# --description-- + +The website will consist of a main index page which will have links to a few recipes. The website won’t look very pretty by the time you’ve finished. + +**User Stories:** + +1. Your recipe page should contain a `DOCTYPE` tag. +1. Your recipe page should include an `html` element with a `head` and `body` element as children. +1. You should have a `title` element within the `head` element with the text `The Odin Recipes`. +1. You should see an `h1` element that has the text `Creamy Chocolate Fudge`. +1. You should see an image with the url `*placeholder-fcc-cdn*` with a fitting `alt` text. +1. There should be an `h2` element with the text `Description` under the image. +1. You should see a couple of paragraphs under `Description` that describe the recipe. +1. There should be an `h2` element with the text `Ingredients` +1. Under the `Ingredients` heading there should be an unordered list with the ingredients needed for the recipe. +1. Under the list of ingredients add another heading called `Steps`. +1. You should see an ordered list with a couple of steps needed to complete the recipe. +1. Under the steps there should be an `h2` element with the text `More Recipes` +1. You should see a couple of links to other recipes inside an unordered list which has a couple of list items with anchor elements within. +1. These anchor elements should have `href` attribute with the value set to `#` + +# --hints-- + +You should have a `DOCTYPE` tag. + +```js +assert(code.match(//gi)); +``` + +You should have a `html` element with `head` and `body` element. + +```js +const html = document.querySelectorAll('html')[0]; +const head = document.querySelectorAll('html > head')[0]; +const body = document.querySelectorAll('html > body')[0]; + +assert(html && head && body); +``` + +You should have a `title` element within the `head` element that contains the text `The Odin Recipes`. + +```js +assert(document.querySelectorAll('HEAD > TITLE')[0].innerText == 'The Odin Recipes'); +``` + +You should have a `h1` element within your `body` element that contains the text `Creamy Chocolate Fudge`. + +```js +assert(document.querySelectorAll('BODY > H1')[0].innerText == 'Creamy Chocolate Fudge'); +``` + +You should have an image with the url `*placeholder-fcc-cdn*` with an `alt` attribute that has a fitting text. + +```js +const img = document.querySelectorAll('IMG')[0]; + +assert(img && img.alt !='' && img.src === 'https://i.imgur.com/p0J5baJ.jpg') +``` + +You should have an `h2` element with the text `Description`. + +```js +const h2 = document.querySelectorAll('H2')[0]; + +assert(h2.innerText == 'Description'); +``` + +You should have at least two `p` elements describing the recipe. + +```js +const paragraphs = document.querySelectorAll('P'); + +assert(paragraphs.length > 1); +``` + +You should have an `h2` element with the text `Ingredients`. + +```js +const h2 = document.querySelectorAll('H2')[1]; + +assert(h2.innerText == 'Ingredients'); +``` + +You should have an unordered list `
                                                                                                                                                                                                      ` with some ingredients as the list items `
                                                                                                                                                                                                    • `. + +```js +const unorderedList = document.querySelectorAll('UL')[0]; +const listItems = document.querySelectorAll('UL > LI'); + +assert(unorderedList && listItems && listItems.length > 1); +``` + +You should have an `h2` element with the text `Steps`. + +```js +const h2 = document.querySelectorAll('H2')[2]; + +assert(h2.innerText == 'Steps'); +``` + +You should have a `
                                                                                                                                                                                                        ` with the the steps as the list items `
                                                                                                                                                                                                      1. `. + +```js +const orderedList = document.querySelectorAll('OL')[0]; +const listItems = document.querySelectorAll('OL > LI'); + +assert(orderedList && listItems && listItems.length > 1); +``` + +You should have an `h2` element with the text `More Recipes`. + +```js +const h2 = document.querySelectorAll('H2')[3]; + +assert(h2.innerText == 'More Recipes'); +``` + +You should have an unordered list `
                                                                                                                                                                                                          ` element with list items `
                                                                                                                                                                                                        • ` that contain `` tags which lead to other recipes. + +```js +const unorderedList = document.querySelectorAll('UL')[1]; +const listItems = unorderedList.querySelectorAll('LI'); + +const allAreListItems = unorderedList.children.length == listItems.length; + +const containsAnchors = [...listItems].every(function(listItem) { + return listItem.querySelector("a") !== null; +}); + +assert(unorderedList && allAreListItems && containsAnchors && listItems.length > 1); +``` + +Your anchor tags linking to the recipes should have a `href` attribute with the value set to `#` + +```js +const anchorTags = document.querySelectorAll("a"); + +const allAnchorsHaveHrefHash = [...anchorTags].every(function(anchorTag) { + return anchorTag.hasAttribute("href") && anchorTag.getAttribute("href") === "#"; +}); + +assert(allAnchorsHaveHrefHash && anchorTags.length > 0); +``` + +# --seed-- + +## --seed-contents-- + +```html + +``` + +```css + +``` + +## --solutions-- + +```html + + + + The Odin Recipes + + +

                                                                                                                                                                                                          Creamy Chocolate Fudge

                                                                                                                                                                                                          + A delicious chocolate fudge dessert +

                                                                                                                                                                                                          Description

                                                                                                                                                                                                          +

                                                                                                                                                                                                          This recipe is for a rich and creamy chocolate fudge that is sure to satisfy your sweet tooth. It's perfect for a special occasion or as a tasty treat for any time of the year.

                                                                                                                                                                                                          +

                                                                                                                                                                                                          This recipe is easy to follow and only requires a few simple ingredients. With just a few steps, you'll be able to create a delicious dessert that everyone will love.

                                                                                                                                                                                                          +

                                                                                                                                                                                                          Ingredients

                                                                                                                                                                                                          +
                                                                                                                                                                                                            +
                                                                                                                                                                                                          • 1 cup sugar
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • 1/2 cup unsalted butter
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • 1/4 cup milk
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • 1/4 cup cocoa powder
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • 1/4 cup chocolate chips
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • 1/4 tsp salt
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          • 1 tsp vanilla extract
                                                                                                                                                                                                          • +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          Steps

                                                                                                                                                                                                          +
                                                                                                                                                                                                            +
                                                                                                                                                                                                          1. In a medium saucepan, melt the butter over medium heat.
                                                                                                                                                                                                          2. +
                                                                                                                                                                                                          3. Add the sugar, milk, cocoa powder, and salt to the saucepan and stir until well combined.
                                                                                                                                                                                                          4. +
                                                                                                                                                                                                          5. Bring the mixture to a boil, stirring constantly, and then reduce the heat to low and simmer for 5 minutes.
                                                                                                                                                                                                          6. +
                                                                                                                                                                                                          7. Remove the saucepan from the heat and stir in the chocolate chips and vanilla extract until the chocolate is melted and the mixture is smooth.
                                                                                                                                                                                                          8. +
                                                                                                                                                                                                          9. Pour the fudge into a greased 8-inch square pan and let it cool completely before cutting into squares.
                                                                                                                                                                                                          10. +
                                                                                                                                                                                                          +

                                                                                                                                                                                                          More Recipes

                                                                                                                                                                                                          +
                                                                                                                                                                                                          + + +``` diff --git a/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-a.md b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-a.md new file mode 100644 index 00000000000..f4625eb7e31 --- /dev/null +++ b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-a.md @@ -0,0 +1,65 @@ +--- +id: 637f4e3e72c65bc8e73dfe24 +videoId: kcHKFZBVtf4 +title: Understand Ordered and Unordered List Question A +challengeType: 15 +dashedName: understand-ordered-and-unordered-list-question-a +--- + +# --description-- + +If you want to have a list of items where the order doesn’t matter, like a shopping list of items that can be bought in any order, then you can use an unordered list. + +Unordered lists are created using the `
                                                                                                                                                                                                            ` element, and each item within the list is created using the list item element `
                                                                                                                                                                                                          • `. + +Each list item in an unordered list begins with a bullet point: + + + +If you instead want to create a list of items where the order does matter, like step-by-step instructions for a recipe, or your top 10 favorite TV shows, then you can use an ordered list. + +Ordered lists are created using the `
                                                                                                                                                                                                              ` element. Each individual item in them is again created using the list item element `
                                                                                                                                                                                                            1. `. However, each list item in an ordered list begins with a number instead: + + + +# --question-- + +## --assignment-- + +Watch the first three minutes of Kevin Powell's video on Ordered and Unordered lists above. + +--- + +Make an unordered shopping list of your favorite foods. + +--- + +Make an ordered list of todo’s you need to get done today. + +--- + +Make an unordered list of places you’d like to visit someday. + +--- + +Make an ordered list of your all time top 5 favorite video games or movies. + +## --text-- + +What HTML tag is used to create an unordered list? + +## --answers-- + +`
                                                                                                                                                                                                            2. ` + +--- + +`
                                                                                                                                                                                                                ` + +--- + +`
                                                                                                                                                                                                                  ` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-b.md b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-b.md new file mode 100644 index 00000000000..4c6822fc504 --- /dev/null +++ b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-b.md @@ -0,0 +1,45 @@ +--- +id: 637f4e4672c65bc8e73dfe25 +videoId: LGQuIIv2RVA +title: Understand Ordered and Unordered List Question B +challengeType: 15 +dashedName: understand-ordered-and-unordered-list-question-b +--- + +# --description-- + +If you want to have a list of items where the order doesn’t matter, like a shopping list of items that can be bought in any order, then you can use an unordered list. + +Unordered lists are created using the `
                                                                                                                                                                                                                    ` element, and each item within the list is created using the list item element `
                                                                                                                                                                                                                  • `. + +Each list item in an unordered list begins with a bullet point: + + + +If you instead want to create a list of items where the order does matter, like step-by-step instructions for a recipe, or your top 10 favorite TV shows, then you can use an ordered list. + +Ordered lists are created using the `
                                                                                                                                                                                                                      ` element. Each individual item in them is again created using the list item element `
                                                                                                                                                                                                                    1. `. However, each list item in an ordered list begins with a number instead: + + + +# --question-- + +## --text-- + +What HTML tag is used to create an ordered list? + +## --answers-- + +`
                                                                                                                                                                                                                        ` + +--- + +`
                                                                                                                                                                                                                      1. ` + +--- + +`
                                                                                                                                                                                                                          ` + +## --video-solution-- + +1 diff --git a/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-c.md b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-c.md new file mode 100644 index 00000000000..c766990ca22 --- /dev/null +++ b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-c.md @@ -0,0 +1,45 @@ +--- +id: 637f4e5172c65bc8e73dfe26 +videoId: LGQuIIv2RVA +title: Understand Ordered and Unordered List Question C +challengeType: 15 +dashedName: understand-ordered-and-unordered-list-question-c +--- + +# --description-- + +If you want to have a list of items where the order doesn’t matter, like a shopping list of items that can be bought in any order, then you can use an unordered list. + +Unordered lists are created using the `
                                                                                                                                                                                                                            ` element, and each item within the list is created using the list item element `
                                                                                                                                                                                                                          • `. + +Each list item in an unordered list begins with a bullet point: + + + +If you instead want to create a list of items where the order does matter, like step-by-step instructions for a recipe, or your top 10 favorite TV shows, then you can use an ordered list. + +Ordered lists are created using the `
                                                                                                                                                                                                                              ` element. Each individual item in them is again created using the list item element `
                                                                                                                                                                                                                            1. `. However, each list item in an ordered list begins with a number instead: + + + +# --question-- + +## --text-- + +What HTML tag is used to create list items within both unordered and ordered lists? + +## --answers-- + +`
                                                                                                                                                                                                                                ` + +--- + +`
                                                                                                                                                                                                                              1. ` + +--- + +`
                                                                                                                                                                                                                                  ` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/working-with-text-question-a.md b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/working-with-text-question-a.md new file mode 100644 index 00000000000..8698b62aca8 --- /dev/null +++ b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/working-with-text-question-a.md @@ -0,0 +1,60 @@ +--- +id: 637f4e5872c65bc8e73dfe27 +videoId: yqcd-XkxZNM +title: Working With Text Question A +challengeType: 15 +dashedName: working-with-text-question-a +--- + +# --description-- + +What would you expect the following text to output on an HTML page? + +```html + + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor + incididunt ut labore et dolore magna aliqua. + + Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris + nisi ut aliquip ex ea commodo consequat. + +``` + +It looks like two paragraphs of text, and so you might expect it to display in that way. However that is not the case, as you can see in the output below: + + + +When the browser encounters new lines like this in your HTML, it will compress them down into one single space. The result of this compression is that all of the text is clumped together into one long line. + +If you want to create paragraphs in HTML, you need to use the paragraph element, which will add a newline after each of your paragraphs. A paragraph element is defined by wrapping text content with a `

                                                                                                                                                                                                                                  ` tag. + +Changing our example from before to use paragraph elements fixes the issue: + + + +# --question-- + +## --assignment-- + +Watch and follow along to Kevin Powell’s HTML Paragraph and Headings Video above. + +## --text-- + +How do you create a paragraph in HTML? + +## --answers-- + +`

                                                                                                                                                                                                                                  This is a paragraph

                                                                                                                                                                                                                                  ` + +--- + +`

                                                                                                                                                                                                                                  This is a paragraph

                                                                                                                                                                                                                                  ` + +--- + +`This is a paragraph` + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/working-with-text-question-b.md b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/working-with-text-question-b.md new file mode 100644 index 00000000000..a74d8d11452 --- /dev/null +++ b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/working-with-text-question-b.md @@ -0,0 +1,40 @@ +--- +id: 637f4e5f72c65bc8e73dfe28 +videoId: yqcd-XkxZNM +title: Working With Text Question B +challengeType: 15 +dashedName: working-with-text-question-b +--- + +# --description-- + +Headings are different from other HTML text elements: they are displayed larger and bolder than other text to signify that they are headings. + +There are 6 different levels of headings starting from `

                                                                                                                                                                                                                                  ` to `

                                                                                                                                                                                                                                  `. The number within a heading tag represents that heading’s level. The largest and most important heading is `h1`, while `h6` is the tiniest heading at the lowest level. + +Headings are defined much like paragraphs. For example, to create an `h1` heading, we wrap our heading text in a `

                                                                                                                                                                                                                                  ` tag. + + + +Using the correct level of heading is important as levels provide a hierarchy to the content. An `h1` heading should always be used for the heading of the overall page, and the lower level headings should be used as the headings for content in smaller sections of the page. + +# --question-- +## --text-- + +How many different levels of headings are there and what is the difference between them? + +## --answers-- + +There are 5 different levels of headings. `h5` is the smallest and least important heading, and `h1` is the largest and most important heading. + +--- + +There are 6 different levels of headings. `h6` is the largest and most important heading, and `h1` is the smallest and least important heading. + +--- + +There are 6 different levels of headings. `h1` is the largest and most important heading, and `h6` is the smallest and least important heading. + +## --video-solution-- + +3 diff --git a/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/working-with-text-question-c.md b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/working-with-text-question-c.md new file mode 100644 index 00000000000..6ccf0e06658 --- /dev/null +++ b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/working-with-text-question-c.md @@ -0,0 +1,47 @@ +--- +id: 637f4e6672c65bc8e73dfe29 +videoId: gW6cBZLUk6M +title: Working With Text Question C +challengeType: 15 +dashedName: working-with-text-question-c +--- + +# --description-- + +The `` element makes text bold. It also semantically marks text as important; this affects tools, like screen readers, that users with visual impairments will rely on to use your website. The tone of voice on some screen readers will change to communicate the importance of the text within a `strong` element. To define a `strong` element you wrap text content in a `` tag. + +You can use `strong` on its own: + + + +But you will probably find yourself using the `strong` element much more in combination with other text elements, like this: + + + +Sometimes you will want to make text bold without giving it an important meaning. You’ll learn how to do that in the CSS lessons later in the curriculum. + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s HTML Bold and Italic Text Video above. + +## --text-- + +What element should you use to make text bold and important? + +## --answers-- + +`This is an important message` + +--- + +`

                                                                                                                                                                                                                                  This is an important message

                                                                                                                                                                                                                                  ` + +--- + +`This is an important message` + +## --video-solution-- + +3 diff --git a/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/working-with-text-question-d.md b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/working-with-text-question-d.md new file mode 100644 index 00000000000..d6647f9a7ea --- /dev/null +++ b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/working-with-text-question-d.md @@ -0,0 +1,39 @@ +--- +id: 637f4e6e72c65bc8e73dfe2a +videoId: gW6cBZLUk6M +title: Working With Text Question D +challengeType: 15 +dashedName: working-with-text-question-d +--- + +# --description-- + +The `em` element makes text italic. It also semantically places emphasis on the text, which again may affect things like screen readers. To define an emphasized element you wrap text content in a `` tag. + +To use `em` on its own: + + +Again, like the `strong` element, you will find yourself mostly using the `em` element with other text elements: + + + +# --question-- +## --text-- + +What element should you use to make text italicized to add emphasis? + +## --answers-- + +`This is an italic message` + +--- + +`This is an italic message` + +--- + +`This is an italic message` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/working-with-text-question-e.md b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/working-with-text-question-e.md new file mode 100644 index 00000000000..d022a6331e9 --- /dev/null +++ b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/working-with-text-question-e.md @@ -0,0 +1,66 @@ +--- +id: 637f4e7972c65bc8e73dfe2b +videoId: gW6cBZLUk6M +title: Working With Text Question E +challengeType: 15 +dashedName: working-with-text-question-e +--- + +# --description-- + +You may have noticed that in all the examples in this lesson you indent any elements that are within other elements. This is known as nesting elements. + +When you nest elements within other elements, you create a parent and child relationship between them. The nested elements are the children and the element they are nested within is the parent. + +In the following example, the `body` element is the parent and the `p` is the child: + +```html + + + + +

                                                                                                                                                                                                                                  Lorem ipsum dolor sit amet.

                                                                                                                                                                                                                                  + + +``` + +Just as in human relationships, HTML parent elements can have many children. Elements at the same level of nesting are considered to be siblings. + +For example, the two `p` elements in the following code are siblings, since they are both children of the `body` tag and are at the same level of nesting as each other: + +```html + + + + +

                                                                                                                                                                                                                                  Lorem ipsum dolor sit amet.

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Ut enim ad minim veniam.

                                                                                                                                                                                                                                  + + +``` + +You use indentation to make the level of nesting clear and readable for yourselves and other developers who will work with your HTML in the future. It is recommended to indent any child elements by two spaces. + +The parent, child, and sibling relationships between elements will become much more important later when you start styling your HTML with CSS and adding behavior with JavaScript. For now, however, it is just important to know the distinction between how elements are related and the terminology used to describe their relationships. + +# --question-- + +## --text-- + +What relationship do two elements have if they are at the same level of nesting? + +## --answers-- + +The elements are each other's parents. + +--- + +The elements are each other's children. + +--- + +The elements are siblings. + +## --video-solution-- + +3 diff --git a/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/working-with-text-question-f.md b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/working-with-text-question-f.md new file mode 100644 index 00000000000..2ace3f4e36d --- /dev/null +++ b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/working-with-text-question-f.md @@ -0,0 +1,67 @@ +--- +id: 637f4e8072c65bc8e73dfe2c +videoId: gW6cBZLUk6M +title: Working With Text Question F +challengeType: 15 +dashedName: working-with-text-question-f +--- + +# --description-- + +You may have noticed that in all the examples in this lesson you indent any elements that are within other elements. This is known as nesting elements. + +When you nest elements within other elements, you create a parent and child relationship between them. The nested elements are the children and the element they are nested within is the parent. + +In the following example, the body element is the parent and the paragraph is the child: + +```html + + + + +

                                                                                                                                                                                                                                  Lorem ipsum dolor sit amet.

                                                                                                                                                                                                                                  + + +``` + +Just as in human relationships, HTML parent elements can have many children. Elements at the same level of nesting are considered to be siblings. + +For example, the two paragraphs in the following code are siblings, since they are both children of the body tag and are at the same level of nesting as each other: + +```html + + + + +

                                                                                                                                                                                                                                  Lorem ipsum dolor sit amet.

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Ut enim ad minim veniam.

                                                                                                                                                                                                                                  + + +``` + +You use indentation to make the level of nesting clear and readable for yourselves and other developers who will work with your HTML in the future. It is recommended to indent any child elements by two spaces. + +The parent, child, and sibling relationships between elements will become much more important later when you start styling your HTML with CSS and adding behavior with JavaScript. For now, however, it is just important to know the distinction between how elements are related and the terminology used to describe their relationships. + +# --question-- + +## --text-- + +What relationship does an element have with any nested element within it? + +## --answers-- + +The element within the other element is called the parent element. + +--- + +The element within the other element is called the child element. + +--- + +The element within the other element is called the sibling element. + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/working-with-text-question-g.md b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/working-with-text-question-g.md new file mode 100644 index 00000000000..fe83f0ef062 --- /dev/null +++ b/curriculum/challenges/italian/10-coding-interview-prep/the-odin-project/working-with-text-question-g.md @@ -0,0 +1,49 @@ +--- +id: 637f4e8772c65bc8e73dfe2d +videoId: gW6cBZLUk6M +title: Working With Text Question G +challengeType: 15 +dashedName: working-with-text-question-g +--- + +# --description-- + +HTML comments are not visible to the browser; they allow us to comment on your code so that other developers or your future selves can read them and get some context about something that might not be clear in the code. + +Writing an HTML comment is simple: You just enclose the comment with ``tags. For example: + +```html +

                                                                                                                                                                                                                                  View the html to see the hidden comments

                                                                                                                                                                                                                                  + + + +

                                                                                                                                                                                                                                  Some paragraph text

                                                                                                                                                                                                                                  + + +``` + +# --question-- + +## --assignment-- + +To get some practice working with text in HTML, create a plain blog article page which uses different headings, uses paragraphs, and has some text in the paragraphs bolded and italicized. You can use [Lorem Ipsum](https://loremipsum.io) to generate dummy text, in place of real text as you build your sites. + +## --text-- + +How do you create HTML comments? + +## --answers-- + +`/* This is an HTML comment */` + +--- + +`` + +--- + +`<-- This is an HTML comment --!>` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d1ac33c68d27dcda5796.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d1ac33c68d27dcda5796.md index 853cfd11a38..33d2021ab48 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d1ac33c68d27dcda5796.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d1ac33c68d27dcda5796.md @@ -14,13 +14,25 @@ Ruota l'elemento `.back-mountain` di `45deg` in senso orario. Quindi, dagli una Dovresti usare la proprietà `transform` per ruotare l'elemento. ```js -assert.notEmpty(new __helpers.CSSHelp(document).getStyle('.back-mountain')?.transform); +const backMountain = new __helpers.CSSHelp(document).getStyle('.back-mountain'); + +if (backMountain?.transform) { + assert.notEmpty(backMountain?.transform); +} else { + assert.notEmpty(backMountain?.rotate); +} ``` Dovresti dare a `.back-mountain` una proprietà `transform` con il valore `--fcc-expected--` invece di `--fcc-actual--`. ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.back-mountain')?.transform, 'rotate(45deg)'); +const backMountain = new __helpers.CSSHelp(document).getStyle('.back-mountain'); + +if (backMountain?.transform) { + assert.equal(backMountain?.transform, 'rotate(45deg)'); +} else { + assert.equal(backMountain?.rotate, '45deg'); +} ``` Dovresti dare all'elemento `.back-mountain` una proprietà `left`. diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d229b0e542520cd91c685.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d229b0e542520cd91c685.md index 55fc60dd2d3..429e0b6cd3b 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d229b0e542520cd91c685.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d229b0e542520cd91c685.md @@ -14,13 +14,25 @@ Per rendere i piedi del pinguino più _a forma di pinguino_, ruota il piede sini Dovresti dare a `.foot.left` una proprietà `transform` con il valore `rotate(80deg)`. ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.foot.left').getPropVal('transform', true), 'rotate(80deg)'); +const leftFoot = new __helpers.CSSHelp(document).getStyle('.foot.left'); + +if (leftFoot?.transform) { + assert.equal(leftFoot.getPropVal('transform', true), 'rotate(80deg)'); +} else { + assert.equal(leftFoot.getPropVal('rotate', true), '80deg'); +} ``` Dovresti dare a `.foot.right` una proprietà `transform` con il valore `rotate(-80deg)`. ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.foot.right').getPropVal('transform', true), 'rotate(-80deg)'); +const rightFoot = new __helpers.CSSHelp(document).getStyle('.foot.right'); + +if (rightFoot?.transform) { + assert.equal(rightFoot.getPropVal('transform', true), 'rotate(-80deg)'); +} else { + assert.equal(rightFoot.getPropVal('rotate', true), '-80deg'); +} ``` # --seed-- diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2d4e80400325ff89664a.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2d4e80400325ff89664a.md index e0c539edffc..f649b0b6c34 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2d4e80400325ff89664a.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2d4e80400325ff89664a.md @@ -14,7 +14,14 @@ Per mantenere la sfumatura lineare sul lato corretto del braccio sinistro del pi Dovresti dare a `.arm.left` un valore `transform` di `rotate(130deg) scaleX(-1)`. ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.arm.left').getPropVal('transform', true), 'rotate(130deg)scaleX(-1)'); +const leftArm = new __helpers.CSSHelp(document).getStyle('.arm.left'); + +if (leftArm?.rotate && leftArm?.transform) { + assert.equal(leftArm.getPropVal('rotate', true), '130deg'); + assert.equal(leftArm.getPropVal('transform', true), 'scaleX(-1)'); +} else { + assert.equal(leftArm.getPropVal('transform', true), 'rotate(130deg)scaleX(-1)'); +} ``` # --seed-- @@ -281,7 +288,6 @@ body { top: 35%; left: 5%; transform-origin: top left; - } --fcc-editable-region-- diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2ebc81ba81271460850d.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2ebc81ba81271460850d.md index f9e628d8c25..5ed5e7ca49a 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2ebc81ba81271460850d.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2ebc81ba81271460850d.md @@ -14,7 +14,13 @@ Ruota il braccio destro di `45deg` in senso antiorario. Dovresti dare a `.arm.right` un valore `transform` di `rotate(-45deg)`. ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.arm.right')?.getPropVal('transform', true), 'rotate(-45deg)'); +const rightArm = new __helpers.CSSHelp(document).getStyle('.arm.right'); + +if (rightArm?.transform) { + assert.equal(rightArm?.getPropVal('transform', true), 'rotate(-45deg)'); +} else { + assert.equal(rightArm?.getPropVal('rotate', true), '-45deg'); +} ``` # --seed-- @@ -287,7 +293,6 @@ body { .arm.right { top: 0%; right: -5%; - } --fcc-editable-region-- diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d32c7fa21f32aaa91d499.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d32c7fa21f32aaa91d499.md index 4c00199042b..1ad5dd9c9b7 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d32c7fa21f32aaa91d499.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d32c7fa21f32aaa91d499.md @@ -14,7 +14,16 @@ All'interno del primo waypoint, ruota di `110deg` e mantieni la scala del bracci Dovresti dare al waypoint `10%` una proprietà `transform` con il valore `rotate(110deg) scaleX(-1)`. ```js -assert([...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '10%')?.style?.transform?.replace(/\s+/g, '') === 'rotate(110deg)scaleX(-1)'); +const wave10Percent = [...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '10%'); +const rotateProp = wave10Percent?.style?.rotate?.replace(/\s+/g, ''); +const transformProp = wave10Percent?.style?.transform?.replace(/\s+/g, ''); + +if (rotateProp && transformProp) { + assert(rotateProp === '110deg'); + assert(transformProp === 'scaleX(-1)'); +} else { + assert(transformProp === 'rotate(110deg)scaleX(-1)'); +} ``` # --seed-- diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d333b738e3c2b5d58b095.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d333b738e3c2b5d58b095.md index 42cf1a6ac46..e27279f0cfe 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d333b738e3c2b5d58b095.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d333b738e3c2b5d58b095.md @@ -14,7 +14,16 @@ All'interno del secondo waypoint, ruota di `130deg` e mantieni la scala del brac Dovresti dare al waypoint `20%` una proprietà `transform` di `rotate(130deg) scaleX(-1)`. ```js -assert([...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '20%')?.style?.transform?.replace(/\s+/g, '') === 'rotate(130deg)scaleX(-1)'); +const wave20Percent = [...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '20%'); +const transformProp = wave20Percent?.style?.transform?.replace(/\s+/g, ''); +const rotateProp = wave20Percent?.style?.rotate?.replace(/\s+/g, ''); + +if (rotateProp && transformProp) { + assert(rotateProp === '130deg'); + assert(transformProp === 'scaleX(-1)'); +} else { + assert(transformProp === 'rotate(130deg)scaleX(-1)'); +} ``` # --seed-- diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d337765b9f02c10e93722.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d337765b9f02c10e93722.md index 72c372634f0..8937eed9106 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d337765b9f02c10e93722.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d337765b9f02c10e93722.md @@ -14,13 +14,31 @@ Per il terzo e il quarto waypoint, ripeti ancora una volta il pattern `transform Dovresti assegnare al waypoint `30%` una proprietà `transform` con il valore `rotate(110deg) scaleX(-1)`. ```js -assert([...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '30%')?.style?.transform?.replace(/\s+/g, '') === 'rotate(110deg)scaleX(-1)'); +const wave30Percent = [...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '30%'); +const transformProp = wave30Percent?.style?.transform?.replace(/\s+/g, ''); +const rotateProp = wave30Percent?.style?.rotate?.replace(/\s+/g, ''); + +if (rotateProp && transformProp) { + assert(rotateProp === '110deg'); + assert(transformProp === 'scaleX(-1)'); +} else { + assert(transformProp === 'rotate(110deg)scaleX(-1)'); +} ``` Dovresti dare al waypoint `40%` una proprietà `transform` con il valore `rotate(130deg) scaleX(-1)`. ```js -assert([...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '40%')?.style?.transform?.replace(/\s+/g, '') === 'rotate(130deg)scaleX(-1)'); +const wave40Percent = [...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '40%'); +const transformProp = wave40Percent?.style?.transform?.replace(/\s+/g, ''); +const rotateProp = wave40Percent?.style?.rotate?.replace(/\s+/g, ''); + +if (rotateProp && transformProp) { + assert(rotateProp === '130deg'); + assert(transformProp === 'scaleX(-1)'); +} else { + assert(transformProp === 'rotate(130deg)scaleX(-1)'); +} ``` # --seed-- diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98f0.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98f0.md index a8a58d96b8d..90db7965290 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98f0.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98f0.md @@ -16,11 +16,11 @@ gradient-type( ); ``` -Nell'esempio, la transizione avviene in modo uniforme tra `color1` (in alto) e `color2` (in basso). In `.bb1a`, aggiungi un gradiente di tipo `linear-gradient` alla proprietà `background` con `--building-color1` come primo colore e `--window-color1` come secondo. +Nell'esempio, la transizione avviene in modo uniforme tra `color1` (in alto) e `color2` (in basso). In `.bb1a`, aggiungi una proprietà `background` sotto la proprietà `background-color`. Impostala con un gradiente di tipo `linear-gradient` che utilizza `--building-color1` come primo colore e `--window-color1` come secondo. # --hints-- -Dovresti applicare una proprietà `background` a `.bb1a`. +Dovresti applicare un `background` a `.bb1a` subito dopo `background-color`. ```js assert(new __helpers.CSSHelp(document).getStyle('.bb1a')?.background); diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa2407b521be39a3de7be1.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa2407b521be39a3de7be1.md index 5574ff15ff8..4f76e00755a 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa2407b521be39a3de7be1.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa2407b521be39a3de7be1.md @@ -45,7 +45,7 @@ assert(document.querySelector('a').getAttribute('target') === '_blank');

                                                                                                                                                                                                                                  Cat Photos

                                                                                                                                                                                                                                  --fcc-editable-region-- -

                                                                                                                                                                                                                                  See more cat photos in our gallery.

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  See more cat photos in our gallery.

                                                                                                                                                                                                                                  --fcc-editable-region-- A cute orange cat lying on its back. diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60fab9f17fa294054b74228c.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60fab9f17fa294054b74228c.md index eb464e04d62..46b131a0dc9 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60fab9f17fa294054b74228c.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60fab9f17fa294054b74228c.md @@ -9,7 +9,7 @@ dashedName: step-31 Passiamo all'ultimo `fieldset`. Cosa succede se vuoi consentire a un utente di caricare un'immagine profilo? -Beh, il valore `file` delll'attributo type di `input` ti permette esattamente di fare questo. Add a `label` with the text `Upload a profile picture:`, and nest an `input` accepting a file upload. +Beh, il valore `file` delll'attributo type di `input` ti permette esattamente di fare questo. Aggiungi un elemento `label` con il testo `Upload a profile picture:` e annida un `input` che accetta il caricamento di un file. # --hints-- diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2abbe7d18d49a1e0e1c8.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2abbe7d18d49a1e0e1c8.md index a15f1e8dbb2..f3f04cffeb2 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2abbe7d18d49a1e0e1c8.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2abbe7d18d49a1e0e1c8.md @@ -39,13 +39,15 @@ assert(document.querySelector('h1')?.innerText === 'Nutrition Facts'); --fcc-editable-region-- - - - Nutrition Label - - - + + + Nutrition Label + + + + + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2d4150fe0d4cbd0f2628.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2d4150fe0d4cbd0f2628.md index 035789083cc..719a8b0ea11 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2d4150fe0d4cbd0f2628.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2d4150fe0d4cbd0f2628.md @@ -43,14 +43,16 @@ assert(document.querySelector('p')?.innerText === '8 servings per container'); --fcc-editable-region-- - - - Nutrition Label - - -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  - + + + Nutrition Label + + + +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  + + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34948891834dd77655a6.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34948891834dd77655a6.md index 2b9129c897f..6f28c0db9a5 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34948891834dd77655a6.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34948891834dd77655a6.md @@ -43,15 +43,17 @@ assert(document.querySelectorAll('p')?.[1]?.innerText === 'Serving size 2/3 cup --fcc-editable-region-- - - - Nutrition Label - - -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  - + + + Nutrition Label + + + +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  + + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34ecc1091b4fd5a8a484.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34ecc1091b4fd5a8a484.md index 6a661bf568c..071b722244a 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34ecc1091b4fd5a8a484.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34ecc1091b4fd5a8a484.md @@ -49,16 +49,18 @@ assert(links.find(link => link?.getAttribute('href') === 'https://fonts.googleap --fcc-editable-region-- - - - Nutrition Label - - -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  - + + + Nutrition Label + + + + +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f357957e370510f21ea16.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f357957e370510f21ea16.md index edd6023f9d3..c106aedc4a6 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f357957e370510f21ea16.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f357957e370510f21ea16.md @@ -32,17 +32,19 @@ assert(new __helpers.CSSHelp(document).getStyle('body')?.fontFamily === '"Open S ```html - - - Nutrition Label - - - - -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f378014c2da526a109c81.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f378014c2da526a109c81.md index 05ec36fd6b6..37cd5819c4b 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f378014c2da526a109c81.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f378014c2da526a109c81.md @@ -30,17 +30,19 @@ assert(new __helpers.CSSHelp(document).getStyle('html')?.fontSize === '16px'); ```html - - - Nutrition Label - - - - -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38279e5c3d53692ea441.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38279e5c3d53692ea441.md index 2d87fc86007..32973d723eb 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38279e5c3d53692ea441.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38279e5c3d53692ea441.md @@ -37,18 +37,20 @@ assert(children?.every(child => child?.parentElement?.classList?.contains('label ```html - - - Nutrition Label - - - + + + + Nutrition Label + + + + --fcc-editable-region-- - -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  - + +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38cabc64e3556f98cc1a.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38cabc64e3556f98cc1a.md index 04d51da4ade..d37dea68c8a 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38cabc64e3556f98cc1a.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38cabc64e3556f98cc1a.md @@ -32,19 +32,21 @@ assert(new __helpers.CSSHelp(document).getStyle('.label')?.border === '2px solid ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3949f58e12577dcefb00.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3949f58e12577dcefb00.md index e883fbe3043..ea20a0d6b80 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3949f58e12577dcefb00.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3949f58e12577dcefb00.md @@ -26,19 +26,21 @@ assert(new __helpers.CSSHelp(document).getStyle('.label')?.width === '270px'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f39d7da41b15851fa3fb9.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f39d7da41b15851fa3fb9.md index 2fbf0f3bc82..0994a195f87 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f39d7da41b15851fa3fb9.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f39d7da41b15851fa3fb9.md @@ -30,19 +30,21 @@ assert(new __helpers.CSSHelp(document).getStyle('.label')?.padding === '0px 7px' ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3b091162165948e1cb33.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3b091162165948e1cb33.md index f81c4e0cd1d..70cb6e504da 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3b091162165948e1cb33.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3b091162165948e1cb33.md @@ -32,19 +32,21 @@ assert(new __helpers.CSSHelp(document).getStyle('*')?.boxSizing === 'border-box' ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3cafd794015aa9547a6d.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3cafd794015aa9547a6d.md index e800df6d925..4288ded1761 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3cafd794015aa9547a6d.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3cafd794015aa9547a6d.md @@ -32,19 +32,21 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')?.fontWeight === '800'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3d9e59db4b5b8e960762.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3d9e59db4b5b8e960762.md index a55f121d23a..695ca6647fb 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3d9e59db4b5b8e960762.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3d9e59db4b5b8e960762.md @@ -24,19 +24,21 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')?.textAlign === 'center'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e1b7233ee5c7595771f.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e1b7233ee5c7595771f.md index de426e1b59b..ba6ab3e9684 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e1b7233ee5c7595771f.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e1b7233ee5c7595771f.md @@ -24,19 +24,21 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')?.margin === '-4px 0px'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e4af8008c5d494d3afe.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e4af8008c5d494d3afe.md index bf19e216a19..31654c8c209 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e4af8008c5d494d3afe.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e4af8008c5d494d3afe.md @@ -30,19 +30,21 @@ assert(new __helpers.CSSHelp(document).getStyle('p')?.margin === '0px'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3ed16592445e57941aec.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3ed16592445e57941aec.md index 80c83cde236..32a6090fbbb 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3ed16592445e57941aec.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3ed16592445e57941aec.md @@ -44,21 +44,23 @@ assert(document.querySelector('.divider')?.previousElementSibling?.localName === ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  --fcc-editable-region-- - + ``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f405b89a7ec5f8e2d11f4.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f405b89a7ec5f8e2d11f4.md index ff2564e27ec..1bab8d8dc28 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f405b89a7ec5f8e2d11f4.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f405b89a7ec5f8e2d11f4.md @@ -36,20 +36,22 @@ assert(new __helpers.CSSHelp(document).getStyle('.divider')?.margin === '2px 0px ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f40b01f680e608d360ed4.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f40b01f680e608d360ed4.md index e6e96ea2f1f..d038ae32ec9 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f40b01f680e608d360ed4.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f40b01f680e608d360ed4.md @@ -26,20 +26,22 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')?.letterSpacing === '0.15px ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4172e9eec061d6456221.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4172e9eec061d6456221.md index 24110a2b765..bca9876dc59 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4172e9eec061d6456221.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4172e9eec061d6456221.md @@ -32,22 +32,24 @@ assert(!document.querySelector('p')?.classList?.contains('bold')); ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  --fcc-editable-region-- - + ``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f41c979787462e76dab90.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f41c979787462e76dab90.md index 1a10d3d5223..dc3218a550d 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f41c979787462e76dab90.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f41c979787462e76dab90.md @@ -44,20 +44,22 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f423cf65d5864132a0956.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f423cf65d5864132a0956.md index f61924d5b87..d87622e5405 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f423cf65d5864132a0956.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f423cf65d5864132a0956.md @@ -24,22 +24,24 @@ assert(document.querySelector('h1')?.classList?.contains('bold')); ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  --fcc-editable-region-- - + ``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f42a021625f656101ef93.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f42a021625f656101ef93.md index 84ce8f84f3e..e08b4a8288d 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f42a021625f656101ef93.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f42a021625f656101ef93.md @@ -9,7 +9,7 @@ dashedName: step-22 La spaziatura orizzontale tra elementi di uguale importanza può migliorare la leggibilità del testo. -Inserisci il testo `2/3 cup (55g)` in un elemento `span` e assegnagli un attributo `class` con il valore `right`. +Racchiudi il testo `2/3 cup (55g)` in un elemento `span`. # --hints-- @@ -19,12 +19,6 @@ Dovresti creare un nuovo elemento `span`. assert(document.querySelector('span')); ``` -Il nuovo elemento `span` dovrebbe avere l'attributo `class` con il valore `right`. - -```js -assert(document.querySelector('span')?.classList?.contains('right')); -``` - L'elemento `span` dovrebbe avere il testo `2/3 cup (55g)`. ```js @@ -44,22 +38,24 @@ assert(document.querySelectorAll('p')?.[1]?.innerText === 'Serving size 2/3 cup ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  --fcc-editable-region-- - + ``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4bfb9de4a16703b56eb6.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4bfb9de4a16703b56eb6.md index 0f2e5ffc1d5..ac4e9b9ecb6 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4bfb9de4a16703b56eb6.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4bfb9de4a16703b56eb6.md @@ -7,22 +7,20 @@ dashedName: step-23 # --description-- -La proprietà `float` viene utilizzata per posizionare un elemento a sinistra o a destra nell'elemento che lo contiene, permettendo ad altri elementi (come il testo) di stargli attorno. - -Crea un nuovo selettore `.right` e imposta la proprietà `float` su `right`. +Ora possiamo aggiungere la spaziatura orizzontale usando `flex`. Nel selettore `p`, aggiungi una proprietà `display` impostata su `flex` e una proprietà `justify-content` impostata su `space-between`. # --hints-- -Dovresti creare un nuovo selettore `.right`. +Il selettore `p` dovrebbe avere un proprietà `display` impostata su `flex`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.right')); +assert(new __helpers.CSSHelp(document).getStyle('p')?.display === 'flex'); ``` -Il selettore `.right` dovrebbe avere una proprietà `float` con il valore `right`. +Il selettore `p` dovrebbe avere una proprietà `justify-content` impostata su `space-between`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.right')?.float === 'right'); +assert(new __helpers.CSSHelp(document).getStyle('p')?.justifyContent === 'space-between'); ``` # --seed-- @@ -32,20 +30,22 @@ assert(new __helpers.CSSHelp(document).getStyle('.right')?.float === 'right'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + ``` @@ -75,9 +75,11 @@ h1 { letter-spacing: 0.15px } +--fcc-editable-region-- p { margin: 0; } +--fcc-editable-region-- .divider { border-bottom: 1px solid #888989; @@ -87,8 +89,4 @@ p { .bold { font-weight: 800; } - ---fcc-editable-region-- - ---fcc-editable-region-- ``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ce9d877b668417c0c42.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ce9d877b668417c0c42.md index 1bf8851ca5f..b327c4ebe14 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ce9d877b668417c0c42.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ce9d877b668417c0c42.md @@ -40,22 +40,24 @@ assert(children?.[3]?.localName === 'p'); ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  --fcc-editable-region-- - + ``` @@ -87,6 +89,8 @@ h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -97,8 +101,4 @@ p { .bold { font-weight: 800; } - -.right { - float: right; -} ``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4dde9d72e3694cb9ee3b.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4dde9d72e3694cb9ee3b.md index dd8881d0de7..374385c95a4 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4dde9d72e3694cb9ee3b.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4dde9d72e3694cb9ee3b.md @@ -39,22 +39,24 @@ assert(style?.letterSpacing === '0.15px'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + ``` @@ -88,6 +90,8 @@ h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -98,8 +102,4 @@ p { .bold { font-weight: 800; } - -.right { - float: right; -} ``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ec58334106a4170c2a8.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ec58334106a4170c2a8.md index 048d5c793a4..138884799ca 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ec58334106a4170c2a8.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ec58334106a4170c2a8.md @@ -7,7 +7,7 @@ dashedName: step-26 # --description-- -Crea un nuovo elemento `div` sotto l'elemento `header` e assegnagli un attributo `class` con il valore `divider lg`. +Crea un nuovo elemento `div` sotto l'elemento `header` e assegnagli un attributo `class` con il valore `divider large`. # --hints-- @@ -23,12 +23,12 @@ Il nuovo elemento `div` dovrebbe trovarsi dopo l'elemento `header`. assert(document.querySelector('.label')?.lastElementChild?.localName === 'div'); ``` -Il nuovo elemento `div` dovrebbe avere l'attributo `class` con il valore `divider lg`. +Il nuovo elemento `div` dovrebbe avere l'attributo `class` con il valore `divider large`. ```js const div = document.querySelector('.label')?.lastElementChild; assert(div?.classList?.contains('divider')); -assert(div?.classList?.contains('lg')); +assert(div?.classList?.contains('large')); ``` # --seed-- @@ -38,25 +38,27 @@ assert(div?.classList?.contains('lg')); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  --fcc-editable-region-- --fcc-editable-region-- -
                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                  + ``` @@ -88,6 +90,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -98,8 +102,4 @@ p { .bold { font-weight: 800; } - -.right { - float: right; -} ``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4f9e4a40566b776a8f38.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4f9e4a40566b776a8f38.md index 082541b855e..2b86de1ab80 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4f9e4a40566b776a8f38.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4f9e4a40566b776a8f38.md @@ -7,32 +7,32 @@ dashedName: step-27 # --description-- -Crea un nuovo selettore `.lg` e assegnagli una proprietà `height` con il valore `10px`. Crea anche un selettore `.lg, .md` e imposta la proprietà `background-color` con il valore `black`. +Crea un nuovo selettore `.large` e assegnagli una proprietà `height` con il valore `10px`. Crea anche un selettore `.large, .medium` e imposta la proprietà `background-color` con il valore `black`. # --hints-- -Dovresti avere un nuovo selettore `.lg`. +Dovresti avere un nuovo selettore `.large`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg')); +assert(new __helpers.CSSHelp(document).getStyle('.large')); ``` -Il selettore `.lg` dovrebbe avere una proprietà `height` con il valore `10px`. +Il selettore `.large` dovrebbe avere una proprietà `height` con il valore `10px`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg')?.height === '10px'); +assert(new __helpers.CSSHelp(document).getStyle('.large')?.height === '10px'); ``` -Dovresti avere un nuovo selettore `.lg, .md`. +Dovresti avere un nuovo selettore `.large, .medium`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')); +assert(new __helpers.CSSHelp(document).getStyle('.large, .medium')); ``` -Il selettore `.lg, .md` dovrebbe avere una proprietà `background-color` con il valore `black`. +Il selettore `.large, .medium` dovrebbe avere una proprietà `background-color` con il valore `black`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')?.backgroundColor === 'black'); +assert(new __helpers.CSSHelp(document).getStyle('.large, .medium')?.backgroundColor === 'black'); ``` # --seed-- @@ -42,23 +42,25 @@ assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')?.backgroundColor === ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + ``` @@ -90,6 +92,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -101,10 +105,6 @@ p { font-weight: 800; } -.right { - float: right; -} - --fcc-editable-region-- --fcc-editable-region-- diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f50473cc0196c6dd3892a.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f50473cc0196c6dd3892a.md index 1396a58abb2..3b3f38d79af 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f50473cc0196c6dd3892a.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f50473cc0196c6dd3892a.md @@ -7,16 +7,16 @@ dashedName: step-28 # --description-- -Potresti notare che c'è ancora un piccolo bordo nella parte inferiore dell'elemento `.lg`. Per rimuoverlo, assegna al selettore `.lg, .md` una proprietà `border` con il valore `0`. +Potresti notare che c'è ancora un piccolo bordo nella parte inferiore dell'elemento `.large`. Per rimuoverlo, assegna al selettore `.large, .medium` una proprietà `border` con il valore `0`. -Nota: la classe `md` (media) sarà utilizzata nello step 37 per le barre più sottili dell'etichetta nutrizionale. +Nota: la classe `medium` (media) sarà utilizzata nello step 37 per le barre più sottili dell'etichetta nutrizionale. # --hints-- -Il selettore `.lg, .md` dovrebbe avere una proprietà `border` con il valore `0`. +Il selettore `.large, .medium` dovrebbe avere una proprietà `border` con il valore `0`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')?.borderWidth === '0px'); +assert(new __helpers.CSSHelp(document).getStyle('.large, .medium')?.borderWidth === '0px'); ``` # --seed-- @@ -26,23 +26,25 @@ assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')?.borderWidth === '0p ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + ``` @@ -74,6 +76,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -85,16 +89,12 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } --fcc-editable-region-- -.lg, .md { +.large, .medium { background-color: black; } --fcc-editable-region-- diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51257a8a516d80b6c743.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51257a8a516d80b6c743.md index 8ec87a85cb5..a6c1f439987 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51257a8a516d80b6c743.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51257a8a516d80b6c743.md @@ -7,7 +7,7 @@ dashedName: step-29 # --description-- -Crea un nuovo `div` sotto l'elemento `.lg` e assegnagli un attributo `class` con il valore `calories-info`. +Crea un nuovo `div` sotto l'elemento `.large` e assegnagli un attributo `class` con il valore `calories-info`. # --hints-- @@ -23,10 +23,10 @@ Il nuovo elemento `div` dovrebbe avere un attributo `class` con il valore `calor assert(document.querySelector('.label')?.lastElementChild?.classList?.contains('calories-info')); ``` -Il nuovo `div` dovrebbe trovarsi dopo l'elemento `.lg`. +Il nuovo `div` dovrebbe trovarsi dopo l'elemento `.large`. ```js -assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('lg')); +assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('large')); ``` # --seed-- @@ -36,26 +36,28 @@ assert(document.querySelector('.label')?.lastElementChild?.previousElementSiblin ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  --fcc-editable-region-- --fcc-editable-region-- -
                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                  + ``` @@ -87,6 +89,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -98,15 +102,11 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51e4e5b24a6e80eccce1.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51e4e5b24a6e80eccce1.md index 9cf8df38b18..58404346cb4 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51e4e5b24a6e80eccce1.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51e4e5b24a6e80eccce1.md @@ -7,27 +7,39 @@ dashedName: step-30 # --description-- -All'interno dell'elemento `.calories-info`, crea un elemento `p`. Assegna a quest'elemento `p` un attributo `class` con il valore `bold sm-text` e il testo `Amount per serving`. +All'interno dell'elemento `.calories-info`, crea un elemento `div`. Assegna a questo elemento `div` un attributo `class` con il valore `left-container`. All'interno dell'elemento `div` appena creato, crea un elemento `h2` con il testo `Amount per serving`. Assegna all'elemento `h2` un attributo `class` con il valore `bold small-text`. # --hints-- -Dovresti creare un nuovo elemento `p` all'interno dell'elemento `.calories-info`. +Dovresti creare un nuovo elemento `div` all'interno dell'elemento `.calories-info`. ```js -assert(document.querySelector('.calories-info')?.children?.[0]?.localName === 'p'); +assert(document.querySelector('.calories-info')?.children?.[0]?.localName === 'div'); ``` -Il nuovo elemento `p` dovrebbe avere un attributo `class` con il valore `bold sm-text`. +Il nuovo elemento `div` dovrebbe avere un attributo `class` con il valore `left-container`. ```js -assert(document.querySelector('.calories-info')?.children?.[0]?.classList.contains('bold')); -assert(document.querySelector('.calories-info')?.children?.[0]?.classList.contains('sm-text')); +assert(document.querySelector('.calories-info')?.children?.[0]?.classList.contains('left-container')); ``` -Il nuovo elemento `p` dovrebbe avere il testo `Amount per serving`. +Dovresti creare un nuovo elemento `h2` all'interno dell'elemento `.left-container`. ```js -assert(document.querySelector('.calories-info')?.children?.[0]?.innerText === 'Amount per serving'); +assert(document.querySelector('.left-container')?.children?.[0]?.localName === 'h2'); +``` + +Il nuovo elemento `h2` dovrebbe avere un attributo `class` con il valore `bold small-text`. + +```js +assert(document.querySelector('.left-container')?.children?.[0]?.classList.contains('bold')); +assert(document.querySelector('.left-container')?.children?.[0]?.classList.contains('small-text')); +``` + +Il nuovo elemento `h2` dovrebbe avere il testo `Amount per serving`. + +```js +assert(document.querySelector('.left-container')?.children?.[0]?.innerText === 'Amount per serving'); ``` # --seed-- @@ -37,28 +49,30 @@ assert(document.querySelector('.calories-info')?.children?.[0]?.innerText === 'A ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  ---fcc-editable-region-- -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  --fcc-editable-region-- +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  - +--fcc-editable-region-- +
                                                                                                                                                                                                                                  + ``` @@ -90,6 +104,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -101,15 +117,11 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md index c40e9442458..9c54ecb2255 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md @@ -9,20 +9,20 @@ dashedName: step-31 L'unità `rem` sta per `root em` ed è relativa alla dimensione del carattere dell'elemento `html`. -Crea un selettore `.sm-text` e imposta la proprietà `font-size` a `0.85rem`, approssimativamente equivalenti a `13.6px` (ricorda che hai dato al tuo `html` una proprietà `font-size` di `16px`). +Crea un selettore `.small-text` e imposta la proprietà `font-size` a `0.85rem`, approssimativamente equivalenti a `13.6px` (ricorda che hai dato al tuo `html` una proprietà `font-size` di `16px`). # --hints-- -Dovresti avere un selettore `.sm-text`. +Dovresti avere un selettore `.small-text`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.sm-text')); +assert(new __helpers.CSSHelp(document).getStyle('.small-text')); ``` -Il selettore `.sm-text` dovrebbe avere una proprietà `font-size` con il valore `0.85rem`. +Il selettore `.small-text` dovrebbe avere una proprietà `font-size` con il valore `0.85rem`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.sm-text')?.fontSize === '0.85rem'); +assert(new __helpers.CSSHelp(document).getStyle('.small-text')?.fontSize === '0.85rem'); ``` # --seed-- @@ -32,26 +32,30 @@ assert(new __helpers.CSSHelp(document).getStyle('.sm-text')?.fontSize === '0.85r ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                  + ``` @@ -83,6 +87,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -94,15 +100,11 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5486b8fd4b71633f69b0.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5486b8fd4b71633f69b0.md index 1633878ae54..a0f89c5dca0 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5486b8fd4b71633f69b0.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5486b8fd4b71633f69b0.md @@ -1,51 +1,50 @@ --- id: 615f5486b8fd4b71633f69b0 -title: Step 32 +title: Step 33 challengeType: 0 -dashedName: step-32 +dashedName: step-33 --- # --description-- -Sotto l'elemento `.sm-text`, crea un nuovo elemento `h1` con il testo `Calories 230`. Racchiudi la porzione del testo `230` in un elemento `span` con l'attributo `class` impostato su `right`. +Sotto l'elemento `.small-text`, crea un nuovo elemento `p` con il testo `Calories`. Inoltre, sotto l'elemento `.left-container`, crea un nuovo elemento `span` con il testo `230`. # --hints-- -Dovresti avere un nuovo elemento `h1` all'interno dell'elemento `.calories-info`. +Dovresti avere un nuovo elemento `p` all'interno dell'elemento `.calories-info`. ```js -assert(document.querySelector('.calories-info')?.querySelector('h1')) +assert(document.querySelector('.calories-info')?.querySelector('p')) ``` -L'elemento `h1` dovrebbe trovarsi dopo l'elemento `.sm-text`. +Dovresti avere un nuovo elemento `span` all'interno dell'elemento `.calories-info`. ```js -assert(document.querySelector('.sm-text')?.nextElementSibling?.localName === 'h1'); +assert(document.querySelector('.calories-info')?.querySelector('span')) ``` -L'elemento `h1` dovrebbe avere il testo `Calories 230`. +L'elemento `p` dovrebbe trovarsi dopo l'elemento `.small-text`. ```js -// the float: right property does weird things to the inner text. -assert(document.querySelector('.calories-info')?.lastElementChild?.innerText.match(/Calories[\s|\n]*230/)); +assert(document.querySelector('.small-text')?.nextElementSibling?.localName === 'p'); ``` -Dovresti creare un elemento `span` all'interno del nuovo elemento `h1`. +L'elemento `p` dovrebbe avere il testo `Calories`. ```js -assert(document.querySelector('.calories-info')?.lastElementChild?.querySelector('span')); +assert(document.querySelector('.left-container')?.lastElementChild?.innerText === 'Calories'); ``` -L'elemento `span` dovrebbe avere l'attributo `class` con il valore `right`. +L'elemento `span` dovrebbe trovarsi dopo l'elemento `.left-container`. ```js -assert(document.querySelector('.calories-info')?.lastElementChild?.querySelector('span')?.classList?.contains('right')); +assert(document.querySelector('.left-container')?.nextElementSibling?.localName ==='span'); ``` L'elemento `span` dovrebbe avere il testo `230`. ```js -assert(document.querySelector('.calories-info')?.lastElementChild?.querySelector('span')?.innerText === '230'); +assert(document.querySelector('.calories-info')?.lastElementChild?.innerText === '230'); ``` # --seed-- @@ -55,28 +54,32 @@ assert(document.querySelector('.calories-info')?.lastElementChild?.querySelector ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

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

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  ---fcc-editable-region--
                                                                                                                                                                                                                                  - +--fcc-editable-region-- +
                                                                                                                                                                                                                                  + ``` @@ -108,6 +111,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -119,20 +124,20 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } + +.calories-info h2 { + margin: 0; +} ``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f575b50b91e72af079480.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f575b50b91e72af079480.md index 2ccb68f905c..2ce847e8fb2 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f575b50b91e72af079480.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f575b50b91e72af079480.md @@ -1,29 +1,41 @@ --- id: 615f575b50b91e72af079480 -title: Step 33 +title: Step 35 challengeType: 0 -dashedName: step-33 +dashedName: step-35 --- # --description-- -Crea un nuovo selettore `.calories-info h1` impostando i margini superiore e inferiore a `-5px` e i margini di sinistra e di destra a `-2px`. +Crea un nuovo selettore `.left-container p` impostando i margini superiore e inferiore a `-5px` e i margini di sinistra e di destra a `-2px`. Inoltre imposta `font-size` a `2em` e `font-weight` a `700`. # --hints-- -Dovresti avere un nuovo selettore `.calories-info h1`. +Dovresti avere un nuovo selettore `.left-container p`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.calories-info h1')); +assert(new __helpers.CSSHelp(document).getStyle('.left-container p')); ``` -Il nuovo selettore `.calories-info h1` dovrebbe avere una proprietà `margin` con il valore `-5px -2px`. +Il nuovo selettore `.left-container p` dovrebbe avere una proprietà `margin` con il valore `-5px -2px`. ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marginTop, '-5px'); -assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marginBottom, '-5px'); -assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marginLeft, '-2px'); -assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marginRight, '-2px'); +assert.equal(new __helpers.CSSHelp(document).getStyle('.left-container p')?.marginTop, '-5px'); +assert.equal(new __helpers.CSSHelp(document).getStyle('.left-container p')?.marginBottom, '-5px'); +assert.equal(new __helpers.CSSHelp(document).getStyle('.left-container p')?.marginLeft, '-2px'); +assert.equal(new __helpers.CSSHelp(document).getStyle('.left-container p')?.marginRight, '-2px'); +``` + +Il nuovo selettore `.left-container p` dovrebbe avere una proprietà `font-size` con il valore `2em`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.left-container p')?.fontSize === '2em'); +``` + +Il nuovo selettore `.left-container p` dovrebbe avere una proprietà `font-weight` con il valore `700`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.left-container p')?.fontWeight === '700'); ``` # --seed-- @@ -33,27 +45,32 @@ assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marg ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                  + 230
                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                  + ``` @@ -85,6 +102,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -96,23 +115,29 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + --fcc-editable-region-- --fcc-editable-region-- diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5af373a68e744a3c5a76.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5af373a68e744a3c5a76.md index 8d224433f99..4eb37413874 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5af373a68e744a3c5a76.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5af373a68e744a3c5a76.md @@ -1,13 +1,13 @@ --- id: 615f5af373a68e744a3c5a76 -title: Step 34 +title: Step 36 challengeType: 0 -dashedName: step-34 +dashedName: step-36 --- # --description-- -Crea un selettore `.calories-info span` e imposta il `font-size` a `1.2em`. +Create un selettore `.calories-info span` e imposta `font-size` su `2.4em` e `font-weight` su `700`. # --hints-- @@ -17,10 +17,16 @@ Dovresti creare un selettore `.calories-info span`. assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')); ``` -Il selettore `.calories-info span` dovrebbe avere una proprietà `font-size` con il valore `1.2em`. +Il selettore `.calories-info span` dovrebbe avere una proprietà `font-size` con il valore `2.4em`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.fontSize === '1.2em'); +assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.fontSize === '2.4em'); +``` + +Il selettore `.calories-info span` dovrebbe avere una proprietà `font-weight` con il valore `700`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.fontWeight === '700'); ``` # --seed-- @@ -30,27 +36,32 @@ assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.fontSize ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                  + 230
                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                  + ``` @@ -82,6 +93,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -93,25 +106,33 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; + font-size: 2em; + font-weight: 700; } --fcc-editable-region-- diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5fd85d0062761f288364.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5fd85d0062761f288364.md index 886edee1c43..e56b5e51d9e 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5fd85d0062761f288364.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5fd85d0062761f288364.md @@ -1,22 +1,22 @@ --- id: 615f5fd85d0062761f288364 -title: Step 36 +title: Step 37 challengeType: 0 -dashedName: step-36 +dashedName: step-37 --- # --description-- La tipografia è spesso più arte che scienza. Potrebbe essere necessario modificare cose come l'allineamento fino a quando non sembra corretto. -Assegna al selettore `.calories-info span` selector una proprietà `margin-top` con il valore `-7px`. In questo modo, sposterai il testo `230` nella posizione giusta. +Assegna al selettore `.calories-info span` una proprietà `margin` con il valore `-7px -2px`. In questo modo, sposterai il testo `230` nella posizione giusta. # --hints-- -Il selettore `.calories-info span` dovrebbe avere una proprietà `margin-top` con il valore `-7px`. +Il selettore `.calories-info span` dovrebbe avere una proprietà `margin` con il valore `-7px -2px`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.marginTop === '-7px'); +assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.margin === '-7px -2px'); ``` # --seed-- @@ -26,27 +26,32 @@ assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.marginTo ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                  + 230
                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                  + ``` @@ -78,6 +83,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -89,31 +96,39 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } --fcc-editable-region-- .calories-info span { - font-size: 1.2em; + font-size: 2.4em; + font-weight: 700; } --fcc-editable-region-- ``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f61338c8ca176d6445574.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f61338c8ca176d6445574.md index fc6e77b5bf8..a852d759b7b 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f61338c8ca176d6445574.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f61338c8ca176d6445574.md @@ -1,13 +1,13 @@ --- id: 615f61338c8ca176d6445574 -title: Step 37 +title: Step 38 challengeType: 0 -dashedName: step-37 +dashedName: step-38 --- # --description-- -Sotto l'elemento `.calories-info`, aggiungi un elemento `div` con l'attributo `class` impostato su `divider md`. +Sotto l'elemento `.calories-info`, aggiungi un elemento `div` con l'attributo `class` impostato su `divider medium`. # --hints-- @@ -17,11 +17,11 @@ Dovresti creare un nuovo `div` all'interno dell'elemento `.label`. assert(document.querySelectorAll('.label > div')?.length === 3) ``` -Il nuovo elemento `div` dovrebbe avere l'attributo `class` con il valore `divider md`. Questo div dovrebbe essere l'ultimo elemento nell'elemento `.label`. +Il nuovo elemento `div` dovrebbe avere l'attributo `class` con il valore `divider medium`. Questo div dovrebbe essere l'ultimo elemento nell'elemento `.label`. ```js const div = document.querySelector('.label')?.lastElementChild; -assert(div?.classList?.contains('divider') && div?.classList?.contains('md')); +assert(div?.classList?.contains('divider') && div?.classList?.contains('medium')); ``` # --seed-- @@ -31,30 +31,35 @@ assert(div?.classList?.contains('divider') && div?.classList?.contains('md')); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                  + 230 +
                                                                                                                                                                                                                                  --fcc-editable-region-- --fcc-editable-region-- -
                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                  + ``` @@ -86,6 +91,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -97,30 +104,38 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; } ``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f666ac5edea782feb7e75.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f666ac5edea782feb7e75.md index 5a364cdd3a6..bcb21686be8 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f666ac5edea782feb7e75.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f666ac5edea782feb7e75.md @@ -1,26 +1,26 @@ --- id: 615f666ac5edea782feb7e75 -title: Step 38 +title: Step 39 challengeType: 0 -dashedName: step-38 +dashedName: step-39 --- # --description-- -Crea un selettore `.md` e assegnagli una proprietà `height` di `5px`. +Crea un selettore `.medium` e assegnagli una proprietà `height` di `5px`. # --hints-- -Dovresti creare un selettore `.md`. +Dovresti creare un selettore `.medium`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.md')); +assert(new __helpers.CSSHelp(document).getStyle('.medium')); ``` -Il selettore `.md` dovrebbe avere una proprietà `height` con il valore `5px`. +Il selettore `.medium` dovrebbe avere una proprietà `height` con il valore `5px`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.md')?.height === '5px'); +assert(new __helpers.CSSHelp(document).getStyle('.medium')?.height === '5px'); ``` # --seed-- @@ -30,28 +30,33 @@ assert(new __helpers.CSSHelp(document).getStyle('.md')?.height === '5px'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  + 230
                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + ``` @@ -83,6 +88,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -94,15 +101,11 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } @@ -111,17 +114,29 @@ p { --fcc-editable-region-- -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; } ``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f671b6d1919792745aa5d.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f671b6d1919792745aa5d.md index a2911e82c9e..73f6d1a6934 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f671b6d1919792745aa5d.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f671b6d1919792745aa5d.md @@ -1,29 +1,29 @@ --- id: 615f671b6d1919792745aa5d -title: Step 39 +title: Step 40 challengeType: 0 -dashedName: step-39 +dashedName: step-40 --- # --description-- -Crea un nuovo elemento `div` sotto l'elemento `.md`. Assegnagli un attributo `class` impostato su `daily-value sm-text`. All'interno di questo nuovo `div`, crea un elemento `p` con il testo `% Daily Value *` e imposta l'attributo `class` con il valore `right bold`. +Crea un nuovo elemento `div` sotto l'elemento `.medium`. Assegnagli un attributo `class` impostato su `daily-value small-text`. All'interno di questo nuovo `div`, crea un elemento `p` con il testo `% Daily Value *` e imposta l'attributo `class` con il valore `bold right`. # --hints-- -Dovresti creare un nuovo elemento `div` dopo l'elemento `.md`. +Dovresti creare un nuovo elemento `div` dopo l'elemento `.medium`. ```js assert(document.querySelector('.label')?.lastElementChild?.localName === 'div'); assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('divider')); -assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('md')); +assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('medium')); ``` -Il nuovo `div` dovrebbe avere un attributo `class` con il valore `daily-value sm-text`. +Il nuovo `div` dovrebbe avere un attributo `class` con il valore `daily-value small-text`. ```js assert(document.querySelector('.label')?.lastElementChild?.classList?.contains('daily-value')); -assert(document.querySelector('.label')?.lastElementChild?.classList?.contains('sm-text')); +assert(document.querySelector('.label')?.lastElementChild?.classList?.contains('small-text')); ``` Il nuovo elemento `div` dovrebbe avere un elemento `p`. @@ -38,11 +38,11 @@ Il nuovo elemento `p` dovrebbe avere il testo `% Daily Value *`. assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.textContent === '% Daily Value *'); ``` -Il nuovo elemento `p` dovrebbe avere un attributo `class` con il valore `right bold`. +Il nuovo elemento `p` dovrebbe avere un attributo `class` con il valore `bold right`. ```js -assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.classList?.contains('right')); assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.classList?.contains('right')); ``` # --seed-- @@ -52,32 +52,36 @@ assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.cl ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  ---fcc-editable-region-- ---fcc-editable-region-- + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                  + 230
                                                                                                                                                                                                                                  - + --fcc-editable-region-- +
                                                                                                                                                                                                                                  + + --fcc-editable-region-- +
                                                                                                                                                                                                                                  + ``` @@ -109,6 +113,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -120,34 +126,42 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; } ``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6823d0815b7a991f2a75.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6823d0815b7a991f2a75.md index 54c7004059b..f0c9a4b5fa9 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6823d0815b7a991f2a75.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6823d0815b7a991f2a75.md @@ -1,32 +1,32 @@ --- id: 615f6823d0815b7a991f2a75 -title: Step 40 +title: Step 42 challengeType: 0 -dashedName: step-40 +dashedName: step-42 --- # --description-- -L'utilizzo di `float` ha fatto sì che il nuovo elemento `p` sia al di fuori del bordo del label. Usa l'elemento `.divider` esistente come esempio per aggiungere un nuovo divider dopo l'elemento `p`. +Usa l'elemento `.divider` esistente come esempio per aggiungere un nuovo divider dopo l'elemento `p`. # --hints-- -Dovresti creare un nuovo `div` all'interno dell'elemento`.daily-value.sm-text`. +Dovresti creare un nuovo `div` all'interno dell'elemento `.daily-value`. ```js -assert(document.querySelectorAll('.daily-value.sm-text > div')?.length === 1) +assert(document.querySelectorAll('.daily-value.small-text > div')?.length === 1) ``` Il nuovo elemento `div` dovrebbe avere l'attributo `class` con il valore `divider`. ```js -assert(document.querySelector('.daily-value.sm-text > div')?.classList?.contains('divider')) +assert(document.querySelector('.daily-value.small-text > div')?.classList?.contains('divider')) ``` Il nuovo elemento `div` dovrebbe trovarsi dopo l'elemento `p`. ```js -assert(document.querySelector('.daily-value.sm-text > div')?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text > div')?.previousElementSibling?.localName === 'p'); ``` # --seed-- @@ -36,34 +36,38 @@ assert(document.querySelector('.daily-value.sm-text > div')?.previousElementSibl ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                  + ``` @@ -95,6 +99,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -106,34 +112,46 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } ``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6b2d164f81809efd9bdc.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6b2d164f81809efd9bdc.md index 50d5070990d..bf1bccaa3a8 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6b2d164f81809efd9bdc.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6b2d164f81809efd9bdc.md @@ -1,56 +1,62 @@ --- id: 615f6b2d164f81809efd9bdc -title: Step 42 +title: Step 43 challengeType: 0 -dashedName: step-42 +dashedName: step-43 --- # --description-- -Dopo l'ultimo elemento `.divider`, crea un elemento `p` e assegnagli il testo `Total Fat 8g 10%`. Avvolgi `Total Fat` in un elemento `span` con l'attributo `class` con il valore `bold`. Avvolgi `10%` in un altro elemento `span` con la `class` impostata su `bold right`. +Dopo l'ultimo elemento `.divider`, crea un elemento `p` e assegnagli il testo `Total Fat 8g 10%`. Avvolgi `Total Fat` in un elemento `span` con l'attributo `class` con il valore `bold`. Racchiudi `10%` in un altro elemento `span` con `class` impostata su `bold`. Inoltre racchiudi il testo `Total Fat 8g` in un elemento `span` aggiuntivo per l'allineamento. # --hints-- Dovresti creare due nuovi elementi `p` alla fine dell'elemento `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` Il nuovo elemento `p` dovrebbe avere il testo `Total Fat 8g 10%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Total Fat 8g[\s|\n]+10%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Total Fat[\s|\n]+8g[\s|\n]+10%/)); ``` -L'elemento `p` dovrebbe avere due elementi `span`. +L'elemento `p` dovrebbe avere tre elementi `span`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 2); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 3); ``` -Il primo elemento `span` dovrebbe avvolgere il testo `Total Fat`. +Un elemento `span` dovrebbe racchiudere il testo `Total Fat`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.innerText === 'Total Fat'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span > span')?.innerText === 'Total Fat'); ``` -Il primo elemento `span` dovrebbe avere l'attributo `class` con il valore `bold`. +L'elemento `span` attorno a `Total Fat` dovrebbe avere l'attributo `class` impostato su `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.className === 'bold'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span > span')?.className === 'bold'); ``` -Il secondo elemento `span` dovrebbe avvolgere il testo `10%`. +Un elemento `span` dovrebbe racchiudere il testo `10%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.[1]?.innerText === '10%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span + span')?.innerText === '10%'); ``` -Il secondo elemento `span` dovrebbe avere l'attributo `class` con il valore `bold right`. +L'elemento `span` attorno a `10%` dovrebbe avere l'attributo `class` impostato su `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.[1]?.className === 'bold right'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.[1]?.className === 'bold'); +``` + +Un elemento `span` dovrebbe avere il testo `Total Fat 8g`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Total Fat[\s|\n]+8g/)); ``` # --seed-- @@ -60,35 +66,39 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySe ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  ---fcc-editable-region-- ---fcc-editable-region-- + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                  + ``` @@ -120,46 +130,59 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } ``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6cc778f7698258467596.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6cc778f7698258467596.md index 58b01b8159f..9b74f1d42f5 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6cc778f7698258467596.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6cc778f7698258467596.md @@ -1,46 +1,45 @@ --- id: 615f6cc778f7698258467596 -title: Step 43 +title: Step 44 challengeType: 0 -dashedName: step-43 +dashedName: step-44 --- # --description-- -Sotto L'elemento con il testo `Total Fat`, crea un nuovo elemento `p` con il testo `Saturated Fat 1g 5%`. Includi `5%` in un altro elemento `span` con l'attributo `class` impostato su `bold right`. +Sotto l'elemento con il testo `Total Fat`, crea un nuovo elemento `p` con il testo `Saturated Fat 1g 5%`. Includi `5%` in un altro elemento `span` con l'attributo `class` impostato su `bold`. In questo caso è sufficiente per allineare la percentuale al `5%`. # --hints-- Dovresti creare un nuovo elemento `p` sotto l'elemento con il testo `Total Fat`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.innerText.match(/Total Fat 8g\s*10%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.innerText.match(/Total Fat 8g\s*10%/)); ``` Il nuovo elemento `p` dovrebbe avere il testo `Saturated Fat 1g 5%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText.match(/Saturated Fat 1g\s*5%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText.match(/Saturated Fat 1g\s*5%/)); ``` Il nuovo elemento `p` dovrebbe avere un elemento `span`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.localName === 'span'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.localName === 'span'); ``` -L'elemento `span` dovrebbe avere l'attributo `class` con il valore `bold right`. +L'elemento `span` dovrebbe avere l'attributo `class` con il valore `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); ``` L'elemento `span` dovrebbe racchiudere il testo `5%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.innerText === "5%"); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === "5%"); ``` # --seed-- @@ -50,36 +49,40 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastEle ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                  ---fcc-editable-region-- ---fcc-editable-region-- + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                  + ``` @@ -111,46 +114,59 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } ``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6fddaac1e083502d3e6a.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6fddaac1e083502d3e6a.md index aa188f49d23..a726b65ffdd 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6fddaac1e083502d3e6a.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6fddaac1e083502d3e6a.md @@ -1,8 +1,8 @@ --- id: 615f6fddaac1e083502d3e6a -title: Step 44 +title: Step 45 challengeType: 0 -dashedName: step-44 +dashedName: step-45 --- # --description-- @@ -14,7 +14,7 @@ Questo nuovo elemento `p` dovrà essere indentato. Dagli un attributo `class` im L'elemento `p` con il testo `Saturated Fat 1g 5%` dovrebbe avere un attributo `class` con il valore `indent`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('indent')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('indent')); ``` # --seed-- @@ -24,36 +24,41 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                  ---fcc-editable-region-- -

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                  + ``` @@ -85,46 +90,59 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } ``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f70077a4ff98424236c1e.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f70077a4ff98424236c1e.md index bab5b450545..7a8247e01bc 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f70077a4ff98424236c1e.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f70077a4ff98424236c1e.md @@ -1,8 +1,8 @@ --- id: 615f70077a4ff98424236c1e -title: Step 45 +title: Step 46 challengeType: 0 -dashedName: step-45 +dashedName: step-46 --- # --description-- @@ -30,34 +30,39 @@ assert(new __helpers.CSSHelp(document).getStyle('.indent')?.marginLeft === '1em' ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                  + 230
                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + ``` @@ -89,47 +94,60 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } --fcc-editable-region-- diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f72a872354a850d4f533e.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f72a872354a850d4f533e.md index 65403dba213..1a1596e0b4d 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f72a872354a850d4f533e.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f72a872354a850d4f533e.md @@ -1,8 +1,8 @@ --- id: 615f72a872354a850d4f533e -title: Step 46 +title: Step 47 challengeType: 0 -dashedName: step-46 +dashedName: step-47 --- # --description-- @@ -30,34 +30,39 @@ assert(new __helpers.CSSHelp(document).getStyle('.daily-value p')?.borderBottom ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                  + 230
                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + ``` @@ -89,47 +94,60 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f74a71f1e498619e38ee8.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f74a71f1e498619e38ee8.md index 77181dffb1c..667dfd11357 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f74a71f1e498619e38ee8.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f74a71f1e498619e38ee8.md @@ -1,8 +1,8 @@ --- id: 615f74a71f1e498619e38ee8 -title: Step 47 +title: Step 48 challengeType: 0 -dashedName: step-47 +dashedName: step-48 --- # --description-- @@ -14,16 +14,15 @@ I bordi inferiori sotto gli elementi `% Daily Value *` e `Saturated Fat 1g 5%` n L'elemento `p` con il testo `% Daily Value *` dovrebbe avere `no-divider` aggiunto all'attributo `class`. Non rimuovere le classi esistenti. ```js -const p = document.querySelector('.daily-value.sm-text')?.firstElementChild; +const p = document.querySelector('.daily-value.small-text')?.firstElementChild; assert(p?.classList?.contains('no-divider')); assert(p?.classList?.contains('bold')); -assert(p?.classList?.contains('right')); ``` L'elemento `p` con il testo `Saturated Fat 1g 5%` dovrebbe avere `no-divider` aggiunto all'attributo `class`. Non rimuovere le classi esistenti. ```js -const p = document.querySelector('.daily-value.sm-text')?.lastElementChild; +const p = document.querySelector('.daily-value.small-text')?.lastElementChild; assert(p?.classList?.contains('no-divider')); assert(p?.classList?.contains('indent')); ``` @@ -35,36 +34,41 @@ assert(p?.classList?.contains('indent')); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

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

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                  + ``` @@ -96,47 +100,60 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ad94380408d971d14f6.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ad94380408d971d14f6.md index 4c336f91468..1a572076e3c 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ad94380408d971d14f6.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ad94380408d971d14f6.md @@ -1,8 +1,8 @@ --- id: 615f7ad94380408d971d14f6 -title: Step 48 +title: Step 49 challengeType: 0 -dashedName: step-48 +dashedName: step-49 --- # --description-- @@ -44,37 +44,43 @@ assert(style?.borderBottom === '1px solid rgb(136, 137, 137)'); ## --seed-contents-- + ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                  + 230
                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + ``` @@ -106,47 +112,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7bc680f7168ea01ebf99.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7bc680f7168ea01ebf99.md index 34ade7dc979..5f14975f8cf 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7bc680f7168ea01ebf99.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7bc680f7168ea01ebf99.md @@ -1,8 +1,8 @@ --- id: 615f7bc680f7168ea01ebf99 -title: Step 49 +title: Step 50 challengeType: 0 -dashedName: step-49 +dashedName: step-50 --- # --description-- @@ -13,16 +13,16 @@ Il primo elemento `.no-divider` ha un `.divider` dopo di esso. Crea un altro `.d # --hints-- -Dovresti creare un nuovo `div` alla fine dell'elemento `.daily-value.sm-text`. +Dovresti creare un nuovo `div` alla fine dell'elemento `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` Il nuovo `div` dovrebbe avere l'attributo `class` con il valore `divider`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -32,36 +32,41 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                  + ``` @@ -93,47 +98,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7c71eab8218f846e4503.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7c71eab8218f846e4503.md index 1a178465011..52bce489e8d 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7c71eab8218f846e4503.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7c71eab8218f846e4503.md @@ -1,32 +1,32 @@ --- id: 615f7c71eab8218f846e4503 -title: Step 50 +title: Step 51 challengeType: 0 -dashedName: step-50 +dashedName: step-51 --- # --description-- -Dopo l'ultimo `.divider`, crea un altro elemento `p` con il testo `Trans Fat 0g`. Metti in corsivo la parola `Trans` annidandola in un elemento `i`. Dai al nuovo elemento `p` l'attributo `class` con il valore `indent no-divider`. +Dopo l'ultimo `.divider`, crea un altro elemento `p` con il testo `Trans Fat 0g`. Metti in corsivo la parola `Trans` annidandola in un elemento `i`. Dai al nuovo elemento `p` l'attributo `class` con il valore `indent no-divider`. Racchiudi `Trans Fat 0g` in un elemento `span` per l'allineamento. # --hints-- -Dovresti creare un nuovo elemento `p` alla fine dell'elemento `.daily-value.sm-text`. +Dovresti creare un nuovo elemento `p` alla fine dell'elemento `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` Il nuovo elemento `p` dovrebbe avere il testo `Trans Fat 0g`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText === 'Trans Fat 0g'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText === 'Trans Fat 0g'); ``` Il nuovo elemento `p` dovrebbe avere l'attributo `class` con il valore `indent no-divider`. ```js -const p = document.querySelector('.daily-value.sm-text')?.lastElementChild; +const p = document.querySelector('.daily-value.small-text')?.lastElementChild; assert(p?.classList?.contains('indent')); assert(p?.classList?.contains('no-divider')); ``` @@ -34,13 +34,25 @@ assert(p?.classList?.contains('no-divider')); Il nuovo elemento `p` dovrebbe avere un elemento `i`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.localName === 'i'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('i')); ``` L'elemento `i` dovrebbe racchiudere il testo `Trans`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.innerText === 'Trans'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('i')?.innerText === 'Trans'); +``` + +Il nuovo elemento `p` dovrebbe avere un elemento `span`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span')); +``` + +L'elemento `span` dovrebbe racchiudere il testo `Trans Fat 0g`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span')?.innerText?.match(/Trans[\s|\n]+Fat 0g/)); ``` # --seed-- @@ -50,37 +62,42 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstEl ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                  + ``` @@ -112,47 +129,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7d489a581590d1350288.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7d489a581590d1350288.md index e0565dcb99e..2a06bb799a2 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7d489a581590d1350288.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7d489a581590d1350288.md @@ -1,8 +1,8 @@ --- id: 615f7d489a581590d1350288 -title: Step 51 +title: Step 52 challengeType: 0 -dashedName: step-51 +dashedName: step-52 --- # --description-- @@ -11,16 +11,16 @@ Crea un altro `.divider` dopo l'ultimo elemento `p`. # --hints-- -Dovresti anche creare un nuovo elemento `div` alla fine dell'elemento `.daily-value.sm-text`. +Dovresti creare un nuovo elemento `div` alla fine dell'elemento `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` Il nuovo elemento `div` dovrebbe avere l'attributo `class` con il valore `divider`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -30,38 +30,43 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                  + ``` @@ -93,47 +98,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7de4487b64919bb4aa5e.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7de4487b64919bb4aa5e.md index d233577f9fe..cbf596fdcf6 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7de4487b64919bb4aa5e.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7de4487b64919bb4aa5e.md @@ -1,57 +1,62 @@ --- id: 615f7de4487b64919bb4aa5e -title: Step 52 +title: Step 53 challengeType: 0 -dashedName: step-52 +dashedName: step-53 --- # --description-- -Dopo l'ultimo elemento `.divider`, crea un elemento `p` e dagli il testo `Cholesterol 0mg 0%`. Inserisci il testo `Cholesterol` in un elemento `span` e assegna a quest'elemento `span` un attributo `class` con il valore `bold`. Annida il testo `0%` in un altro elemento `span` con l'attributo `class` impostato su `bold right`. +Dopo l'ultimo elemento `.divider`, crea un elemento `p` e dagli il testo `Cholesterol 0mg 0%`. Inserisci il testo `Cholesterol` in un elemento `span` e assegna a quest'elemento `span` un attributo `class` con il valore `bold`. Annida il testo `0%` in un altro elemento `span` con l'attributo `class` impostato su `bold`. Inoltre racchiudi `Cholesterol 0mg` in un elemento `span` aggiuntivo per l'allineamento. # --hints-- -Dovresti creare un nuovo elemento `p` alla fine dell'elemento `.daily-value.sm-text`. +Dovresti creare un nuovo elemento `p` alla fine dell'elemento `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` Il nuovo elemento `p` dovrebbe avere il testo `Cholesterol 0mg 0%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Cholesterol 0mg[\s|\n]+0%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Cholesterol[\s|\n]+0mg[\s|\n]+0%/)); ``` -Il nuovo elemento `p` dovrebbe avere due elementi `span`. +Il nuovo elemento `p` dovrebbe avere tre elementi `span`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 2); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 3); ``` -Il primo elemento `span` dovrebbe avere l'attributo `class` con il valore `bold`. +Il primo elemento `span` `Cholesterol` dovrebbe avere l'attributo `class` con il valore `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.classList?.contains('bold')); +``` + +Il primo elemento `span` dovrebbe racchiudere il testo `Cholesterol 0mg`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.innerText?.match(/Cholesterol[\s|\n]+0mg/)); ``` Il primo elemento `span` dovrebbe racchiudere il testo `Cholesterol`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.innerText === 'Cholesterol'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.innerText === 'Cholesterol'); ``` -Il secondo elemento `span` dovrebbe avere l'attributo `class` con il valore `bold right`. +Il secondo elemento `span` dovrebbe avere l'attributo `class` con il valore `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); ``` Il secondo elemento `span` dovrebbe racchiudere il testo `0%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.innerText === '0%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === '0%'); ``` # --seed-- @@ -61,39 +66,44 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastEle ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                  + ``` @@ -125,47 +135,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7e7281626a92bbd62da8.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7e7281626a92bbd62da8.md index 292a13f4d38..1c89356cd4f 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7e7281626a92bbd62da8.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7e7281626a92bbd62da8.md @@ -1,57 +1,62 @@ --- id: 615f7e7281626a92bbd62da8 -title: Step 53 +title: Step 54 challengeType: 0 -dashedName: step-53 +dashedName: step-54 --- # --description-- -Sotto l'ultimo elemento `p`, crea un altro elemento `p` con il testo `Sodium 160mg 7%`. Atorrno al testo `Sodium`, crea un elemento `span` con un attributo `class` impostato su `bold`. Annida il testo `7%` in un altro elemento `span` con l'attributo `class` impostato su `bold right`. +Sotto l'ultimo elemento `p`, crea un altro elemento `p` con il testo `Sodium 160mg 7%`. Atorrno al testo `Sodium`, crea un elemento `span` con un attributo `class` impostato su `bold`. Racchiudi il testo `7%` in un altro elemento `span` con l'attributo `class` impostato su `bold`. Aggiungi anche un altro elemento `span` attorno a `Sodium 160mg` per allinearlo correttamente. # --hints-- -Dovresti creare un nuovo elemento `p` alla fine dell'elemento `.daily-value.sm-text`. +Dovresti creare un nuovo elemento `p` alla fine dell'elemento `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` Il nuovo elemento `p` dovrebbe avere il testo `Sodium 160mg 7%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Sodium 160mg[\s|\n]+7%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Sodium[\s|\n]160mg[\s|\n]+7%/)); ``` -Il nuovo elemento `p` dovrebbe avere due elementi `span`. +Il nuovo elemento `p` dovrebbe avere tre elementi `span`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 2); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 3); ``` -Il primo elemento `span` dovrebbe avere l'attributo `class` con il valore `bold`. +Un elemento `span` dovrebbe racchiudere il testo `Sodium 360mg`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.innerText?.match(/Sodium[\s|\n]160mg/)); ``` -Il primo elemento `span` dovrebbe racchiudere il testo `Sodium`. +Un elemento `span` dovrebbe racchiudere il testo `Sodium`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.innerText === 'Sodium'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.innerText === "Sodium"); ``` -Il secondo elemento `span` dovrebbe avere l'attributo `class` con il valore `bold right`. +L'elemento `span` attorno a `Sodium` dovrebbe avere l'attributo `class` impostato su `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.classList?.contains('bold')); ``` -Il secondo elemento `span` dovrebbe racchiudere il testo `7%`. +Un elemento `span` dovrebbe racchiudere il testo `7%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.innerText === '7%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === '7%'); +``` + +L'elemento `span` attorno a `7%` dovrebbe avere l'attributo `class` impostato su `bold`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); ``` # --seed-- @@ -61,40 +66,45 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastEle ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                  + ``` @@ -126,47 +136,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ecb09de9a938ef94756.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ecb09de9a938ef94756.md index 43df081c8dd..6aa1eb7c1c3 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ecb09de9a938ef94756.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ecb09de9a938ef94756.md @@ -1,57 +1,68 @@ --- id: 615f7ecb09de9a938ef94756 -title: Step 54 +title: Step 55 challengeType: 0 -dashedName: step-54 +dashedName: step-55 --- # --description-- -Aggiungi un altro elemento `p` con il testo `Total Carbohydrate 37g 13%`. Come prima, usa gli elementi `span` per rendere il testo `Total Carbohydrate` in grassetto, e il testo `13%` in grassetto e allineato a destra. +Aggiungi un altro elemento `p` con il testo `Total Carbohydrate 37g 13%`. Come prima, usa gli elementi `span` per rendere il testo `Total Carbohydrate` e `13%` in grassetto. Aggiungi un altro elemento `span` per racchiudere `Total Carbohydrate 37g`, allineare il testo a sinistra e `13%` a destra. # --hints-- -Dovresti creare un nuovo elemento `p` alla fine dell'elemento `.daily-value.sm-text`. +Dovresti creare un nuovo elemento `p` alla fine dell'elemento `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` Il nuovo elemento `p` dovrebbe avere il testo `Total Carbohydrate 37g 13%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Total Carbohydrate 37g[\s|\n]+13%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Total Carbohydrate[\s|\n]+37g[\s|\n]+13%/)); ``` -Il nuovo elemento `p` dovrebbe avere due elementi `span`. +Il nuovo elemento `p` dovrebbe avere tre elementi `span`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 2); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 3); ``` -Il primo elemento `span` dovrebbe avere l'attributo `class` con il valore `bold`. +Un elemento `span` dovrebbe racchiudere il testo `Total Carbohydrate 37g`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.innerText?.match(/Total Carbohydrate[\s|\n]+37g/)); ``` -Il primo elemento `span` dovrebbe racchiudere il testo `Total Carbohydrate`. +Un elemento `span` dovrebbe racchiudere il testo `Total Carbohydrate`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.innerText === 'Total Carbohydrate'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.innerText === 'Total Carbohydrate'); ``` -Il secondo elemento `span` dovrebbe avere l'attributo `class` con il valore `bold right`. +L'elemento `span` attorno a `Total Carbohydrate` dovrebbe avere l'attributo `class` impostato su `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.classList?.contains('bold')); +``` + +Un elemento `span` dovrebbe racchiudere il testo `13%`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === '13%'); +``` + +L'elemento `span` attorno a `13%` dovrebbe avere l'attributo `class` impostato su `bold`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); ``` Il secondo elemento `span` dovrebbe racchiudere il testo `13%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.innerText === '13%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === '13%'); ``` # --seed-- @@ -61,41 +72,46 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastEle ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                  + ``` @@ -127,47 +143,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7fa959ab75948f96a0d6.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7fa959ab75948f96a0d6.md index 83075f0a4d3..ef9083beaeb 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7fa959ab75948f96a0d6.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7fa959ab75948f96a0d6.md @@ -1,8 +1,8 @@ --- id: 615f7fa959ab75948f96a0d6 -title: Step 55 +title: Step 56 challengeType: 0 -dashedName: step-55 +dashedName: step-56 --- # --description-- @@ -11,30 +11,30 @@ Sotto l'ultimo elemento `p`, aggiungi un altro elemento `p` con il testo `Dietar # --hints-- -Dovresti creare un nuovo elemento `p` e `div` alla fine dell'elemento `.daily-value.sm-text`. +Dovresti creare un nuovo elemento `p` e un nuovo `div` alla fine dell'elemento `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` Il nuovo elemento `p` dovrebbe avere il testo `Dietary Fiber 4g`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.innerText.match(/Dietary Fiber[\s|\n]+4g/)); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.innerText.match(/Dietary Fiber[\s|\n]+4g/)); ``` Il nuovo elemento `p` dovrebbe avere l'attributo `class` con il valore `indent no-divider`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('indent')); -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('indent')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('no-divider')); ``` Il nuovo `div` dovrebbe avere l'attributo `class` con il valore `divider`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -44,42 +44,47 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                  + ``` @@ -111,47 +116,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f808d85793195b0f53be9.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f808d85793195b0f53be9.md index 6b2f1c2a16f..45615569f71 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f808d85793195b0f53be9.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f808d85793195b0f53be9.md @@ -1,8 +1,8 @@ --- id: 615f808d85793195b0f53be9 -title: Step 56 +title: Step 57 challengeType: 0 -dashedName: step-56 +dashedName: step-57 --- # --description-- @@ -11,30 +11,30 @@ Crea un altro elemento `p` dopo l'ultimo `.divider` e dagli il testo `Total Suga # --hints-- -Dovresti anche creare dei nuovi elementi `p` e `div` alla fine dell'elemento `.daily-value.sm-text`. +Dovresti creare un nuovo elemento `p` e un nuovo `div` alla fine dell'elemento `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` Il nuovo elemento `p` dovrebbe avere il testo `Total Sugars 12g`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.innerText.match(/Total Sugars[\s|\n]+12g/)); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.innerText.match(/Total Sugars[\s|\n]+12g/)); ``` Il nuovo elemento `p` dovrebbe avere l'attributo `class` con il valore `indent no-divider`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('indent')); -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('indent')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('no-divider')); ``` Il nuovo elemento `div` dovrebbe avere l'attributo `class` con il valore `divider`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -44,44 +44,49 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                  + ``` @@ -113,47 +118,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f829d07b18f96f6f6684b.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f829d07b18f96f6f6684b.md index 4ca58ca2edc..974515b5c3d 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f829d07b18f96f6f6684b.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f829d07b18f96f6f6684b.md @@ -1,21 +1,21 @@ --- id: 615f829d07b18f96f6f6684b -title: Step 57 +title: Step 58 challengeType: 0 -dashedName: step-57 +dashedName: step-58 --- # --description-- -Il vantaggio di creare dei divider è che è possibile applicare classi specifiche per dargli uno stile individualmente. Aggiungi `dbl-indent` all'attributo `class` per l'ultimo `.divider`. +Il vantaggio di creare dei divider è che è possibile applicare classi specifiche per dargli uno stile individualmente. Aggiungi `double-indent` all'attributo `class` per l'ultimo `.divider`. # --hints-- -L'ultimo elemento `.divider` dovrebbe avere `dbl-indent` aggiunto all'attributo `class`. Non rimuovere il valore esistente. +L'ultimo elemento `.divider` dovrebbe avere `double-indent` aggiunto all'attributo `class`. Non rimuovere il valore esistente. ```js -const last = document.querySelector('.daily-value.sm-text')?.lastElementChild; -assert(last?.classList?.contains('dbl-indent')); +const last = document.querySelector('.daily-value.small-text')?.lastElementChild; +assert(last?.classList?.contains('double-indent')); assert(last?.classList?.contains('divider')); ``` @@ -26,46 +26,51 @@ assert(last?.classList?.contains('divider')); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                  + 230
                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + ``` @@ -97,47 +102,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f83ef928ec9982b785b6a.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f83ef928ec9982b785b6a.md index c74d6008508..cf186398ea3 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f83ef928ec9982b785b6a.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f83ef928ec9982b785b6a.md @@ -1,26 +1,26 @@ --- id: 615f83ef928ec9982b785b6a -title: Step 58 +title: Step 59 challengeType: 0 -dashedName: step-58 +dashedName: step-59 --- # --description-- -Crea un selettore `.dbl-indent` e dagli un margine sinistro di `2em`. +Crea un selettore `.double-indent` e dagli un margine sinistro di `2em`. # --hints-- -Dovresti avere un nuovo selettore `.dbl-indent`. +Dovresti avere un nuovo selettore `.double-indent`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.dbl-indent')); +assert(new __helpers.CSSHelp(document).getStyle('.double-indent')); ``` -Il selettore `.dbl-indent` dovrebbe avere una proprietà `margin-left` con il valore `2em`. +Il selettore `.double-indent` dovrebbe avere una proprietà `margin-left` con il valore `2em`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.dbl-indent')?.marginLeft === '2em'); +assert(new __helpers.CSSHelp(document).getStyle('.double-indent')?.marginLeft === '2em'); ``` # --seed-- @@ -30,44 +30,49 @@ assert(new __helpers.CSSHelp(document).getStyle('.dbl-indent')?.marginLeft === ' ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                  + 230
                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + ``` @@ -99,56 +104,70 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } ---fcc-editable-region-- +--fcc-editable-region-- ---fcc-editable-region-- +--fcc-editable-region-- .daily-value p:not(.no-divider) { border-bottom: 1px solid #888989; diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f84f246e8ba98e3cd97be.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f84f246e8ba98e3cd97be.md index 8a27aef91f5..dfdfd695b8d 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f84f246e8ba98e3cd97be.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f84f246e8ba98e3cd97be.md @@ -1,61 +1,60 @@ --- id: 615f84f246e8ba98e3cd97be -title: Step 59 +title: Step 60 challengeType: 0 -dashedName: step-59 +dashedName: step-60 --- # --description-- -Sotto l'elemento `.dbl-indent`, aggiungi un nuovo elemento `p` con il testo `Includes 10g Added Sugars 20%`. Il nuovo elemento `p` dovrebbe essere anche doppiamente indentato e non avere il bordo inferiore. Usa un elemento `span` per rendere il `20%` in grassetto e allineato a destra. +Sotto l'elemento `.double-indent`, aggiungi un nuovo elemento `p` con il testo `Includes 10g Added Sugars 20%`. Il nuovo elemento `p` dovrebbe essere anche doppiamente indentato e non avere il bordo inferiore. Usa un elemento `span` per rendere il `20%` in grassetto e allineato a destra. Poi crea un altro divider dopo l'elemento `p`. # --hints-- -Dovresti creare un nuovo elemento `p` e un nuovo `div` alla fine dell'elemento `.daily-value.sm-text`. +Dovresti creare un nuovo elemento `p` e un nuovo `div` alla fine dell'elemento `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` Il nuovo elemento `p` dovrebbe avere il testo `Includes 10g Added Sugars 20%`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.innerText.match(/Includes 10g Added Sugars[\s|\n]+20%/)); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.innerText.match(/Includes 10g Added Sugars[\s|\n]+20%/)); ``` -Il nuovo elemento `p` dovrebbe avere l'attributo `class` con il valore `dbl-indent no-divider`. +Il nuovo elemento `p` dovrebbe avere l'attributo `class` con il valore `double-indent no-divider`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('dbl-indent')); -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('double-indent')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('no-divider')); ``` Il nuovo elemento `p` dovrebbe avere un elemento `span`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.firstElementChild?.localName === 'span'); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.firstElementChild?.localName === 'span'); ``` -L'elemento `span` dovrebbe avere l'attributo `class` con il valore `bold right`. +L'elemento `span` dovrebbe avere l'attributo `class` con il valore `bold`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.firstElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.firstElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.firstElementChild?.classList?.contains('bold')); ``` L'elemento `span` dovrebbe racchiudere il testo `20%`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type span')?.innerText === '20%'); +assert(document.querySelector('.daily-value.small-text p:last-of-type span')?.innerText === '20%'); ``` Il nuovo elemento `div` dovrebbe avere l'attributo `class` con il valore `divider`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -65,46 +64,51 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                  + ``` @@ -136,54 +140,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f887466db4ba14b5342cc.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f887466db4ba14b5342cc.md index bbf550cdb39..93ff1a90bc0 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f887466db4ba14b5342cc.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f887466db4ba14b5342cc.md @@ -1,8 +1,8 @@ --- id: 615f887466db4ba14b5342cc -title: Step 60 +title: Step 61 challengeType: 0 -dashedName: step-60 +dashedName: step-61 --- # --description-- @@ -13,30 +13,30 @@ Dopo questo elemento, crea un divider grande. # --hints-- -Dovresti creare un nuovo elemento `p` e un nuovo `div` alla fine dell'elemento `.daily-value.sm-text`. +Dovresti creare un nuovo elemento `p` e un nuovo `div` alla fine dell'elemento `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` Il nuovo elemento `p` dovrebbe avere il testo `Protein 3g`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.innerText.match(/Protein[\s|\n]+3g/)); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.innerText.match(/Protein[\s|\n]+3g/)); ``` Il nuovo elemento `p` dovrebbe avere l'attributo `class` con il valore `no-divider`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('no-divider')); ``` -Il nuovo elemento `div` dovrebbe avere l'attributo `class` con il valore `divider lg`. +Il nuovo elemento `div` dovrebbe avere l'attributo `class` con il valore `divider large`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('lg')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('large')); ``` # --seed-- @@ -46,48 +46,53 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                  + ``` @@ -119,54 +124,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f89e055040ba294719d2f.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f89e055040ba294719d2f.md index b68646e7687..1e82d95e280 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f89e055040ba294719d2f.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f89e055040ba294719d2f.md @@ -1,39 +1,40 @@ --- id: 615f89e055040ba294719d2f -title: Step 61 +title: Step 62 challengeType: 0 -dashedName: step-61 +dashedName: step-62 --- # --description-- -Crea un altro elemento `p` sotto il divider grande. Dai all'elemento `p` il testo `Vitamin D 2mcg 10%`. Usa un elemento `span` per allineare il `10%` a destra, ma non metterlo in grassetto. +Crea un altro elemento `p` sotto il divider grande. Dai all'elemento `p` il testo `Vitamin D 2mcg 10%`. + +L'elemento `p` contiene solo testo, puoi racchiudere la percentuale in un elemento `span` in modo che sia considerato un'entità separata dal resto del testo e venga spostato a destra. # --hints-- -Dovresti creare un nuovo elemento `p` alla fine dell'elemento `.daily-value.sm-text`. +Dovresti creare un nuovo elemento `p` alla fine dell'elemento `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` Il nuovo elemento `p` dovrebbe avere il testo `Vitamin D 2mcg 10%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Vitamin D 2mcg[\s|\n]+10%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Vitamin D 2mcg[\s|\n]+10%/)); ``` Il nuovo elemento `p` dovrebbe avere un elemento `span`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 1); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 1); ``` -L'elemento `span` dovrebbe avere l'attributo `class` con il valore `right`. Ricorda di non metterlo in grassetto. +L'elemento `span` non dovrebbe essere in grassetto. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.classList?.contains('right')); -assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.classList?.contains('bold')); +assert(!document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span')?.classList?.contains('bold')); ``` # --seed-- @@ -43,50 +44,55 @@ assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.queryS ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                  + ``` @@ -118,54 +124,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8bfe0f30a1a3c340356b.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8bfe0f30a1a3c340356b.md index 26c92fa59d6..447caa95100 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8bfe0f30a1a3c340356b.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8bfe0f30a1a3c340356b.md @@ -1,8 +1,8 @@ --- id: 615f8bfe0f30a1a3c340356b -title: Step 62 +title: Step 63 challengeType: 0 -dashedName: step-62 +dashedName: step-63 --- # --description-- @@ -11,55 +11,53 @@ Crea un altro elemento `p` e dagli il testo `Calcium 260mg 20%`. Allinea il `20% # --hints-- -Dovresti creare due nuovi elementi `p` alla fine dell'elemento `.daily-value.sm-text`. +Dovresti creare due nuovi elementi `p` alla fine dell'elemento `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); ``` Il primo nuovo elemento `p` dovrebbe avere il testo `Calcium 260mg 20%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.innerText?.match(/Calcium 260mg[\s|\n]+20%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.innerText?.match(/Calcium 260mg[\s|\n]+20%/)); ``` Il primo nuovo elemento `p` dovrebbe avere un elemento `span`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.localName === 'span'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.localName === 'span'); ``` -Il primo elemento `span` dovrebbe avere l'attributo `class` con il valore `right`. Ricorda, non metterlo in grassetto. +Il primo elemento `span` non dovrebbe essere in grassetto. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.classList?.contains('right')); -assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.classList?.contains('bold')); +assert(!document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.classList?.contains('bold')); ``` Il primo elemento `span` dovrebbe racchiudere il testo `20%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.innerText === '20%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.innerText === '20%'); ``` Il secondo nuovo elemento `p` dovrebbe avere il testo `Iron 8mg 45%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Iron 8mg[\s|\n]+45%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Iron 8mg[\s|\n]+45%/)); ``` Il secondo nuovo elemento `p` dovrebbe avere un elemento `span`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.localName === 'span'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.localName === 'span'); ``` -Il secondo elemento `span` dovrebbe avere l'attributo `class` con il valore `right`. Ricorda, non metterlo in grassetto. +Il secondo elemento `span` non dovrebbe essere in grassetto. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('right')); -assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(!document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); ``` # --seed-- @@ -69,51 +67,56 @@ assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstE ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                  + ``` @@ -145,54 +148,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8f1223601fa546e93f31.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8f1223601fa546e93f31.md index 3d13aea822f..84caed45129 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8f1223601fa546e93f31.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8f1223601fa546e93f31.md @@ -1,8 +1,8 @@ --- id: 615f8f1223601fa546e93f31 -title: Step 63 +title: Step 64 challengeType: 0 -dashedName: step-63 +dashedName: step-64 --- # --description-- @@ -11,35 +11,34 @@ Crea l'elemento finale `p` per la sezione `.daily-value`. Dagli il testo `Potass # --hints-- -Dovresti creare un nuovo elemento `p` alla fine dell'elemento `.daily-value.sm-text`. +Dovresti creare un nuovo elemento `p` alla fine dell'elemento `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` Il nuovo elemento `p` dovrebbe avere l'attributo `class` con il valore `no-divider`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('no-divider')); ``` Il nuovo elemento `p` dovrebbe avere il testo `Potassium 235mg 6%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Potassium 235mg[\s|\n]+6%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Potassium 235mg[\s|\n]+6%/)); ``` Il nuovo elemento `p` dovrebbe avere un elemento `span`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 1); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 1); ``` -L'elemento `span` dovrebbe avere l'attributo `class` con il valore `right`. Ricorda di non metterlo in grassetto. +L'elemento `span` non dovrebbe essere in grassetto. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.classList?.contains('right')); -assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.classList?.contains('bold')); +assert(!document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span')?.classList?.contains('bold')); ``` # --seed-- @@ -49,53 +48,58 @@ assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.queryS ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                  + ``` @@ -127,54 +131,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f905fbd1017a65ca224eb.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f905fbd1017a65ca224eb.md index dc8f9aa1267..c531cacc455 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f905fbd1017a65ca224eb.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f905fbd1017a65ca224eb.md @@ -1,8 +1,8 @@ --- id: 615f905fbd1017a65ca224eb -title: Step 64 +title: Step 65 challengeType: 0 -dashedName: step-64 +dashedName: step-65 --- # --description-- @@ -23,11 +23,11 @@ Dovresti creare un nuovo `div` dopo l'elemento `.daily-value`. assert(document.querySelector('.daily-value').nextElementSibling?.localName === 'div'); ``` -Il nuovo `div` dovrebbe avere l'attributo `class` con il valore `divider md`. +Il nuovo `div` dovrebbe avere l'attributo `class` con il valore `divider medium`. ```js assert(document.querySelector('.daily-value')?.nextElementSibling?.classList?.contains('divider')); -assert(document.querySelector('.daily-value')?.nextElementSibling?.classList?.contains('md')); +assert(document.querySelector('.daily-value')?.nextElementSibling?.classList?.contains('medium')); ``` Dovresti creare un elemento `p` dopo il nuovo elemento `div`. @@ -55,55 +55,60 @@ assert.equal(document.querySelector('.label')?.lastElementChild?.innerText, '* T ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Potassium 235mg 6%

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  ---fcc-editable-region-- ---fcc-editable-region-- + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + 230
                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Potassium 235mg 6%

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + --fcc-editable-region-- + + --fcc-editable-region-- +
                                                                                                                                                                                                                                  + ``` @@ -135,54 +140,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f94786869e1a7fec54375.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f94786869e1a7fec54375.md index 1a7568cb176..721760ff140 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f94786869e1a7fec54375.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f94786869e1a7fec54375.md @@ -1,8 +1,8 @@ --- id: 615f94786869e1a7fec54375 -title: Step 65 +title: Step 66 challengeType: 0 -dashedName: step-65 +dashedName: step-66 --- # --description-- @@ -36,54 +36,60 @@ assert(new __helpers.CSSHelp(document).getStyle('.note')?.margin === '5px 0px'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Potassium 235mg 6%

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                                                                                                                                                  + 230
                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Potassium 235mg 6%

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily + diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + ``` @@ -115,54 +121,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f951dff9317a900ef683f.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f951dff9317a900ef683f.md index 9019d74eac4..607c7b86d1c 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f951dff9317a900ef683f.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f951dff9317a900ef683f.md @@ -1,8 +1,8 @@ --- id: 615f951dff9317a900ef683f -title: Step 66 +title: Step 67 challengeType: 0 -dashedName: step-66 +dashedName: step-67 --- # --description-- @@ -35,54 +35,60 @@ assert(new __helpers.CSSHelp(document).getStyle('.note')?.textIndent === '-8px') ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Potassium 235mg 6%

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                                                                                                                                                  + 230
                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Potassium 235mg 6%

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily + diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + ``` @@ -114,54 +120,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } @@ -182,54 +202,60 @@ p { ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  Potassium 235mg 6%

                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                                                                                                                                                  + 230
                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Potassium 235mg 6%

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily + diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + ``` @@ -261,54 +287,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/635bde33c91c80540eae239b.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/635bde33c91c80540eae239b.md new file mode 100644 index 00000000000..304deebf5bd --- /dev/null +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/635bde33c91c80540eae239b.md @@ -0,0 +1,153 @@ +--- +id: 635bde33c91c80540eae239b +title: Step 41 +challengeType: 0 +dashedName: step-41 +--- + +# --description-- + +Il testo `* Daily Value %` dovrebbe essere allineato a destra. Crea un selettore `.right` e usa la proprietà `justify-content` per farlo. + +# --hints-- + +Dovresti avere un selettore `.right`. + +```js +const hasRight = new __helpers.CSSHelp(document).getStyle('.right'); +assert(hasRight); + +``` + +Il selettore `.right` dovrebbe avere la proprietà `justify-content` impostata su `flex-end`. + +```js +const rightJustifyContent = new __helpers.CSSHelp(document).getStyle('.right')?.getPropertyValue('justify-content'); +assert(rightJustifyContent === 'flex-end'); + +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + 230 +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + + +``` + +```css +* { + box-sizing: border-box; +} + +html { + font-size: 16px; +} + +body { + font-family: 'Open Sans', sans-serif; +} + +.label { + border: 2px solid black; + width: 270px; + margin: 20px auto; + padding: 0 7px; +} + +header h1 { + text-align: center; + margin: -4px 0; + letter-spacing: 0.15px +} + +p { + margin: 0; + display: flex; + justify-content: space-between; +} + +.divider { + border-bottom: 1px solid #888989; + margin: 2px 0; +} + +.bold { + font-weight: 800; +} + +.large { + height: 10px; +} + +.large, .medium { + background-color: black; + border: 0; +} + +.medium { + height: 5px; +} + +.small-text { + font-size: 0.85rem; +} + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { + margin: -5px -2px; + font-size: 2em; + font-weight: 700; +} + +.calories-info span { + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +--fcc-editable-region-- + +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6395d33ab5d91bf317107c48.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6395d33ab5d91bf317107c48.md new file mode 100644 index 00000000000..4200d051a93 --- /dev/null +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6395d33ab5d91bf317107c48.md @@ -0,0 +1,117 @@ +--- +id: 6395d33ab5d91bf317107c48 +title: Step 32 +challengeType: 0 +dashedName: step-32 +--- + +# --description-- + +Crea un selettore `.calories-info h2` e rimuovi tutti i margini. + +# --hints-- + +Crea un selettore `.calories-info h2`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info h2')); +``` + +Il selettore `.calories-info h2` dovrebbe avere una proprietà `margin` con il valore `0`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info h2')?.margin === '0px'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + + +``` + +```css +* { + box-sizing: border-box; +} + +html { + font-size: 16px; +} + +body { + font-family: 'Open Sans', sans-serif; +} + +.label { + border: 2px solid black; + width: 270px; + margin: 20px auto; + padding: 0 7px; +} + +header h1 { + text-align: center; + margin: -4px 0; + letter-spacing: 0.15px +} + +p { + margin: 0; + display: flex; + justify-content: space-between; +} + +.divider { + border-bottom: 1px solid #888989; + margin: 2px 0; +} + +.bold { + font-weight: 800; +} + +.large { + height: 10px; +} + +.large, .medium { + background-color: black; + border: 0; +} + +.small-text { + font-size: 0.85rem; +} + +--fcc-editable-region-- + +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6396e33fe478dd264ebbf278.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6396e33fe478dd264ebbf278.md new file mode 100644 index 00000000000..477f8d41d38 --- /dev/null +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6396e33fe478dd264ebbf278.md @@ -0,0 +1,135 @@ +--- +id: 6396e33fe478dd264ebbf278 +title: Step 34 +challengeType: 0 +dashedName: step-34 +--- + +# --description-- + +Crea un nuovo selettore `.calories-info` e assegnagli una proprietà `display` con il valore `flex`. Dagli anche una proprietà `justify-content` impostata su `space-between` e una proprietà `align-items` impostata su `flex-end`. + +# --hints-- + +Dovresti creare un selettore `.calories-info`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info')); +``` + +Il selettore `.calories-info` dovrebbe avere una proprietà `display` con il valore `flex`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info')?.display === 'flex'); +``` + +Il selettore `.calories-info` dovrebbe avere una proprietà `justify-content` con il valore `space-between`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info')?.justifyContent === 'space-between'); +``` + +Il selettore `.calories-info` dovrebbe avere una proprietà `align-items` impostata su `flex-end`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info')?.alignItems === 'flex-end'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + 230 +
                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                  + + +``` + +```css +* { + box-sizing: border-box; +} + +html { + font-size: 16px; +} + +body { + font-family: 'Open Sans', sans-serif; +} + +.label { + border: 2px solid black; + width: 270px; + margin: 20px auto; + padding: 0 7px; +} + +header h1 { + text-align: center; + margin: -4px 0; + letter-spacing: 0.15px +} + +p { + margin: 0; + display: flex; + justify-content: space-between; +} + +.divider { + border-bottom: 1px solid #888989; + margin: 2px 0; +} + +.bold { + font-weight: 800; +} + +.large { + height: 10px; +} + +.large, .medium { + background-color: black; + border: 0; +} + +.small-text { + font-size: 0.85rem; +} + +--fcc-editable-region-- + +--fcc-editable-region-- + +.calories-info h2 { + margin: 0; +} +``` diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c8bf3980c14c438d2aed.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c8bf3980c14c438d2aed.md index cb3940f6ac8..d5a108a716b 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c8bf3980c14c438d2aed.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c8bf3980c14c438d2aed.md @@ -7,7 +7,7 @@ dashedName: step-39 # --description-- -Per ora, fai in modo che l'output della funzione `goStore` sia il messaggio `Going to store.` sulla console. Ad esempio, ecco una funzione il cui output è il messaggio "Hello World". +Per ora, fai in modo che l'output della funzione `goStore` sia il messaggio `Going to store.` sulla console. Ad esempio, ecco una funzione il cui output è il messaggio `Hello World`. ```js function functionName() { diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b0b5053f16111b0b6b5f.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b0b5053f16111b0b6b5f.md index 50b93850e39..921bc7bb9eb 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b0b5053f16111b0b6b5f.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b0b5053f16111b0b6b5f.md @@ -47,7 +47,7 @@ La funzione `update` dovrebbe impostare `button3.onclick` su `fightDragon`. assert.match(update.toString(), /button3\.onclick\s*=\s*fightDragon/); ``` -La funzione `update` dovrebbe impostare `text.innerText` su `You are in the town square. You see a sign that says "Store".`. +La funzione `update` dovrebbe impostare `text.innerText` su `You are in the town square. You see a sign that says \"Store\".`. ```js assert.match(update.toString(), /text\.innerText\s*=\s*"You are in the town square. You see a sign that says \\"Store\\"\."/); diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md index 9b6d3a489f9..9ab6465bf24 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md @@ -7,7 +7,7 @@ dashedName: step-62 # --description-- -L'array `locations` contiene due location: town square e store. Attualmente stai passando l'intero array nella funzione update. Passa soltanto il primo elemento dell'array `locations` aggiungendo `[0]` alla fine della variabile. Ad esempio: `myFunction(arg[0]);`. +L'array `locations` contiene due location: `town square` e `store`. Attualmente stai passando l'intero array nella funzione `update`. Passa soltanto il primo elemento dell'array `locations` aggiungendo `[0]` alla fine della variabile. Ad esempio: `myFunction(arg[0]);`. Questa notazione si chiama notazione a parentesi. I valori in un array sono accessibili tramite il loro indice. Gli indici sono valori numerici e partono da 0 - questo sistema è detto a base zero. `arg[0]` è il primo elemento nell'array `arg`. diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md index aa2923d00a1..52407421da9 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md @@ -7,7 +7,7 @@ dashedName: step-67 # --description-- -Infine, aggiorna l'assegnazione di `text.innerText` in modo che sia uguale a `text` dall'oggetto location. Invece di usare la notazione a parentesi, usa la dot notation. Ecco un esempio di come accedere alla proprietà `name` di un oggetto chiamato `obj`: `obj.name`. +Infine, aggiorna l'assegnazione di `text.innerText` in modo che sia uguale a `text` dall'oggetto `location`. Invece di usare la notazione a parentesi, usa la dot notation. Ecco un esempio di come accedere alla proprietà `name` di un oggetto chiamato `obj`: `obj.name`. # --hints-- diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c89e4272512d44fc1c66.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c89e4272512d44fc1c66.md index a0c3e920c41..c69b2a51361 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c89e4272512d44fc1c66.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c89e4272512d44fc1c66.md @@ -7,7 +7,7 @@ dashedName: step-83 # --description-- -In modo simile alla funzione `buyHealth`, imposta `gold` uguale al suo valore attuale meno 30. Assicurati di farlo all'interno dell'istruzione `if`. +In modo simile alla funzione `buyHealth`, imposta `gold` uguale al suo valore attuale meno `30`. Assicurati di farlo all'interno dell'istruzione `if`. # --hints-- diff --git a/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-javascript/subtract-one-number-from-another-with-javascript.md b/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-javascript/subtract-one-number-from-another-with-javascript.md index e874e0e646c..79eac1bcfba 100644 --- a/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-javascript/subtract-one-number-from-another-with-javascript.md +++ b/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-javascript/subtract-one-number-from-another-with-javascript.md @@ -26,13 +26,13 @@ const myVar = 12 - 6; # --hints-- -変数 `difference` は 12 に等しくなる必要があります。 +変数 `difference` は `12` に等しくなる必要があります。 ```js assert(difference === 12); ``` -45 から 1 つの数値だけを引いてください。 +`45` から 1 つの数値だけを引いてください。 ```js assert(/difference=45-33;?/.test(__helpers.removeWhiteSpace(code))); diff --git a/curriculum/challenges/japanese/05-back-end-development-and-apis/back-end-development-and-apis-projects/exercise-tracker.md b/curriculum/challenges/japanese/05-back-end-development-and-apis/back-end-development-and-apis-projects/exercise-tracker.md index d776b3a4f82..e6065f340e5 100644 --- a/curriculum/challenges/japanese/05-back-end-development-and-apis/back-end-development-and-apis-projects/exercise-tracker.md +++ b/curriculum/challenges/japanese/05-back-end-development-and-apis/back-end-development-and-apis-projects/exercise-tracker.md @@ -14,19 +14,19 @@ dashedName: exercise-tracker - Replit スタータープロジェクトを使用して、プロジェクトを完了させる。 - 使い慣れたサイトビルダーを使用してプロジェクトを完了させる。 必ず GitHub リポジトリのすべてのファイルを取り込む。 -If you use Replit, follow these steps to set up the project: +Replit を使用する場合は、下記の手順でプロジェクトをセットアップしてください。 -- Start by importing the project on Replit. -- Next, you will see a `.replit` window. -- Select `Use run command` and click the `Done` button. +- まず、Replit でプロジェクトをインポートします。 +- すると、`.replit` ファイルのウィンドウが表示されます。 +- `Use run command` を選択して `Done` ボタンをクリックします。 -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +完了したら、プロジェクトの動作デモをどこか公開の場にホストしてください。 そして「回答のリンク」欄に、デモの URL を提出してください。 必要に応じて、プロジェクトのソースコードへのリンクも「GitHub のリンク」欄に提出してください。 # --instructions-- -Your responses should have the following structures. +レスポンスは、以下の構造にしてください。 -Exercise: +エクササイズ: ```js { @@ -38,7 +38,7 @@ Exercise: } ``` -User: +ユーザー: ```js { @@ -47,7 +47,7 @@ User: } ``` -Log: +ログ: ```js { @@ -62,11 +62,11 @@ Log: } ``` -**Hint:** For the `date` property, the `toDateString` method of the `Date` API can be used to achieve the expected output. +** ヒント: ** `date` プロパティについては、`Date` API の `toDateString` メソッド を使用すると期待した出力が得られます。 # --hints-- -You should provide your own project, not the example URL. +サンプルの URL ではなく、自分で作成したプロジェクトを提出する必要があります。 ```js (getUserInput) => { @@ -77,7 +77,7 @@ You should provide your own project, not the example URL. }; ``` -You can `POST` to `/api/users` with form data `username` to create a new user. +フォームデータ `username` を使用して `/api/users` への `POST` リクエストを実行することで、新しいユーザーを作成することができます。 ```js async (getUserInput) => { @@ -94,7 +94,7 @@ async (getUserInput) => { }; ``` -The returned response from `POST /api/users` with form data `username` will be an object with `username` and `_id` properties. +フォームデータ `username` を使用して `POST /api/users` を実行した際のレスポンスは、`username` プロパティおよび `_id` プロパティを持つオブジェクトです。 ```js async (getUserInput) => { @@ -114,7 +114,7 @@ async (getUserInput) => { }; ``` -You can make a `GET` request to `/api/users` to get a list of all users. +`/api/users` への `GET` リクエストを実行することにより、すべてのユーザーのリストを取得できます。 ```js async(getUserInput) => { @@ -127,7 +127,7 @@ async(getUserInput) => { }; ``` -The `GET` request to `/api/users` returns an array. +`/api/users` への `GET` リクエストを実行すると、配列が返されます。 ```js async(getUserInput) => { @@ -142,7 +142,7 @@ async(getUserInput) => { }; ``` -Each element in the array returned from `GET /api/users` is an object literal containing a user's `username` and `_id`. +`GET /api/users` から返される配列の各要素は、ユーザーの `username` および `_id` を含むオブジェクトリテラルです。 ```js async(getUserInput) => { @@ -162,7 +162,7 @@ async(getUserInput) => { }; ``` -You can `POST` to `/api/users/:_id/exercises` with form data `description`, `duration`, and optionally `date`. If no date is supplied, the current date will be used. +`/api/users/:_id/exercises` への `POST` では、フォームデータ `description`、`duration`、および `date` (省略可) を指定できます。 日付を指定しない場合は、現在の日付が使用されます。 ```js async (getUserInput) => { @@ -196,7 +196,7 @@ async (getUserInput) => { }; ``` -The response returned from `POST /api/users/:_id/exercises` will be the user object with the exercise fields added. +`POST /api/users/:_id/exercises` から返されるレスポンスは、エクササイズの各フィールドが追加されたユーザーオブジェクトです。 ```js async (getUserInput) => { @@ -235,7 +235,7 @@ async (getUserInput) => { }; ``` -You can make a `GET` request to `/api/users/:_id/logs` to retrieve a full exercise log of any user. +`/api/users/:_id/logs` への `GET` リクエストを実行すると、任意のユーザーのすべてのエクササイズログを取得できます。 ```js async (getUserInput) => { @@ -274,7 +274,7 @@ async (getUserInput) => { }; ``` -A request to a user's log `GET /api/users/:_id/logs` returns a user object with a `count` property representing the number of exercises that belong to that user. +ユーザーログのリクエスト `GET /api/users/:_id/logs` は、そのユーザーに属するエクササイズの数を表す `count` プロパティを持つユーザーオブジェクトを返します。 ```js async (getUserInput) => { @@ -315,7 +315,7 @@ async (getUserInput) => { }; ``` -A `GET` request to `/api/users/:_id/logs` will return the user object with a `log` array of all the exercises added. +`/api/users/:_id/logs` への `GET` リクエストは、全エクササイズの `log` の配列が追加されたユーザーオブジェクトを返します。 ```js async(getUserInput) => { @@ -359,7 +359,7 @@ async(getUserInput) => { }; ``` -Each item in the `log` array that is returned from `GET /api/users/:_id/logs` is an object that should have a `description`, `duration`, and `date` properties. +`GET /api/users/:_id/logs` から返される `log` 配列内の各アイテムは、`description`、`duration` および `date` プロパティを持つオブジェクトです。 ```js async(getUserInput) => { @@ -406,12 +406,12 @@ async(getUserInput) => { }; ``` -The `description` property of any object in the `log` array that is returned from `GET /api/users/:_id/logs` should be a string. +`GET /api/users/:_id/logs` から返される `log` 配列内のどのオブジェクトの `description` プロパティも、文字列である必要があります。 ```js async(getUserInput) => { const url = getUserInput('url'); - const res = await fetch(url + '/api/users/', { + const res = await fetch(url + '/api/users', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', @@ -453,12 +453,12 @@ async(getUserInput) => { }; ``` -The `duration` property of any object in the `log` array that is returned from `GET /api/users/:_id/logs` should be a number. +`GET /api/users/:_id/logs` から返される `log` 配列内のどのオブジェクトの `duration` プロパティも、数値である必要があります。 ```js async(getUserInput) => { const url = getUserInput('url'); - const res = await fetch(url + '/api/users/', { + const res = await fetch(url + '/api/users', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', @@ -500,12 +500,12 @@ async(getUserInput) => { }; ``` -The `date` property of any object in the `log` array that is returned from `GET /api/users/:_id/logs` should be a string. Use the `dateString` format of the `Date` API. +`GET /api/users/:_id/logs` から返される `log` 配列内のどのオブジェクトの `date` プロパティも、文字列である必要があります。 `Date` API の `dateString` 形式を使用してください。 ```js async(getUserInput) => { const url = getUserInput('url'); - const res = await fetch(url + '/api/users/', { + const res = await fetch(url + '/api/users', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', @@ -547,7 +547,7 @@ async(getUserInput) => { }; ``` -You can add `from`, `to` and `limit` parameters to a `GET /api/users/:_id/logs` request to retrieve part of the log of any user. `from` and `to` are dates in `yyyy-mm-dd` format. `limit` is an integer of how many logs to send back. +`GET /api/users/:_id/logs` リクエストに `from`、`to` および `limit` パラメーターを追加すると、任意のユーザーについてログの一部を取得できます。 `from` および `to` は、`yyyy-mm-dd` 形式の日付です。 `limit` は、返されるログの数を表す整数です。 ```js async (getUserInput) => { diff --git a/curriculum/challenges/japanese/05-back-end-development-and-apis/back-end-development-and-apis-projects/file-metadata-microservice.md b/curriculum/challenges/japanese/05-back-end-development-and-apis/back-end-development-and-apis-projects/file-metadata-microservice.md index 8734e9b6db2..0ac55b04480 100644 --- a/curriculum/challenges/japanese/05-back-end-development-and-apis/back-end-development-and-apis-projects/file-metadata-microservice.md +++ b/curriculum/challenges/japanese/05-back-end-development-and-apis/back-end-development-and-apis-projects/file-metadata-microservice.md @@ -14,21 +14,21 @@ dashedName: file-metadata-microservice - Replit スタータープロジェクトを使用して、プロジェクトを完了させる。 - 使い慣れたサイトビルダーを使用してプロジェクトを完了させる。 必ず GitHub リポジトリのすべてのファイルを取り込む。 -If you use Replit, follow these steps to set up the project: +Replit を使用する場合は、下記の手順でプロジェクトをセットアップしてください。 -- Start by importing the project on Replit. -- Next, you will see a `.replit` window. -- Select `Use run command` and click the `Done` button. +- まず、Replit でプロジェクトをインポートします。 +- すると、`.replit` ファイルのウィンドウが表示されます。 +- `Use run command` を選択して `Done` ボタンをクリックします。 -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +完了したら、プロジェクトの動作デモをどこか公開の場にホストしてください。 そして「回答のリンク」欄に、デモの URL を提出してください。 必要に応じて、プロジェクトのソースコードへのリンクも「GitHub のリンク」欄に提出してください。 # --instructions-- -**HINT:** You can use the `multer` npm package to handle file uploading. +** ヒント: ** `multer` npm パッケージを使用してファイルのアップロードを処理することができます。 # --hints-- -You should provide your own project, not the example URL. +サンプルの URL ではなく、自分で作成したプロジェクトを提出する必要があります。 ```js (getUserInput) => { @@ -40,7 +40,7 @@ You should provide your own project, not the example URL. }; ``` -You can submit a form that includes a file upload. +ファイルのアップロードを含むフォームを送信できます。 ```js async (getUserInput) => { @@ -51,7 +51,7 @@ async (getUserInput) => { }; ``` -The form file input field has the `name` attribute set to `upfile`. +フォームのファイル入力フィールドの `name` 属性が `upfile` に設定されています。 ```js async (getUserInput) => { @@ -62,7 +62,7 @@ async (getUserInput) => { }; ``` -When you submit a file, you receive the file `name`, `type`, and `size` in bytes within the JSON response. +ファイルを送信すると、`name`、`type` および `size` (バイト単位) を含む JSON レスポンスを受け取ります。 ```js async (getUserInput) => { diff --git a/curriculum/challenges/japanese/05-back-end-development-and-apis/back-end-development-and-apis-projects/request-header-parser-microservice.md b/curriculum/challenges/japanese/05-back-end-development-and-apis/back-end-development-and-apis-projects/request-header-parser-microservice.md index 63a02b703f6..f33e933e4d4 100644 --- a/curriculum/challenges/japanese/05-back-end-development-and-apis/back-end-development-and-apis-projects/request-header-parser-microservice.md +++ b/curriculum/challenges/japanese/05-back-end-development-and-apis/back-end-development-and-apis-projects/request-header-parser-microservice.md @@ -14,17 +14,17 @@ dashedName: request-header-parser-microservice - Replit スタータープロジェクトを使用して、プロジェクトを完了させる。 - 使い慣れたサイトビルダーを使用してプロジェクトを完了させる。 必ず GitHub リポジトリのすべてのファイルを取り込む。 -If you use Replit, follow these steps to set up the project: +Replit を使用する場合は、下記の手順でプロジェクトをセットアップしてください。 -- Start by importing the project on Replit. -- Next, you will see a `.replit` window. -- Select `Use run command` and click the `Done` button. +- まず、Replit でプロジェクトをインポートします。 +- すると、`.replit` ファイルのウィンドウが表示されます。 +- `Use run command` を選択して `Done` ボタンをクリックします。 -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +完了したら、プロジェクトの動作デモをどこか公開の場にホストしてください。 そして「回答のリンク」欄に、デモの URL を提出してください。 必要に応じて、プロジェクトのソースコードへのリンクも「GitHub のリンク」欄に提出してください。 # --hints-- -You should provide your own project, not the example URL. +サンプルの URL ではなく、自分で作成したプロジェクトを提出する必要があります。 ```js (getUserInput) => { @@ -36,7 +36,7 @@ You should provide your own project, not the example URL. }; ``` -A request to `/api/whoami` should return a JSON object with your IP address in the `ipaddress` key. +`/api/whoami` へのリクエストに対して、`ipaddress` キーにあなた (リクエストの送信者) の IP アドレスを持つ JSON オブジェクトを返す必要があります。 ```js (getUserInput) => @@ -48,7 +48,7 @@ A request to `/api/whoami` should return a JSON object with your IP address in t ); ``` -A request to `/api/whoami` should return a JSON object with your preferred language in the `language` key. +`/api/whoami` へのリクエストに対して、`language` キーにあなたの優先言語を持つ JSON オブジェクトを返す必要があります。 ```js (getUserInput) => @@ -60,7 +60,7 @@ A request to `/api/whoami` should return a JSON object with your preferred langu ); ``` -A request to `/api/whoami` should return a JSON object with your software in the `software` key. +`/api/whoami` へのリクエストに対して、`software` キーにあなたの使用しているソフトウェア情報を持つ JSON オブジェクトを返す必要があります。 ```js (getUserInput) => diff --git a/curriculum/challenges/japanese/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md b/curriculum/challenges/japanese/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md index b662ec4cf53..4d71e1e0c16 100644 --- a/curriculum/challenges/japanese/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md +++ b/curriculum/challenges/japanese/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md @@ -14,19 +14,19 @@ dashedName: timestamp-microservice - Replit スタータープロジェクトを使用して、プロジェクトを完了させる。 - 使い慣れたサイトビルダーを使用してプロジェクトを完了させる。 必ず GitHub リポジトリのすべてのファイルを取り込む。 -If you use Replit, follow these steps to set up the project: +Replit を使用する場合は、下記の手順でプロジェクトをセットアップしてください。 -- Start by importing the project on Replit. -- Next, you will see a `.replit` window. -- Select `Use run command` and click the `Done` button. +- まず、Replit でプロジェクトをインポートします。 +- すると、`.replit` ファイルのウィンドウが表示されます。 +- `Use run command` を選択して `Done` ボタンをクリックします。 -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +完了したら、プロジェクトの動作デモをどこか公開の場にホストしてください。 そして「回答のリンク」欄に、デモの URL を提出してください。 必要に応じて、プロジェクトのソースコードへのリンクも「GitHub のリンク」欄に提出してください。 -**Note:** Time zones conversion is not a purpose of this project, so assume all sent valid dates will be parsed with `new Date()` as GMT dates. +**注:** タイムゾーンの変換は、このプロジェクトの目的ではありません。そのため、有効な日付が送信された場合、GMT の日時として `new Date()` に解釈されると想定してください。 # --hints-- -You should provide your own project, not the example URL. +サンプルの URL ではなく、自分で作成したプロジェクトを提出する必要があります。 ```js (getUserInput) => { @@ -36,7 +36,7 @@ You should provide your own project, not the example URL. }; ``` -A request to `/api/:date?` with a valid date should return a JSON object with a `unix` key that is a Unix timestamp of the input date in milliseconds (as type Number) +有効な日付を持つ `/api/:date?` へのリクエストに対して、JSON オブジェクトを返し、その `unix` キーの値は入力日付を表す Unix タイムスタンプ (ミリ秒単位で、データ型は Number) の値である必要があります。 ```js (getUserInput) => @@ -54,7 +54,7 @@ A request to `/api/:date?` with a valid date should return a JSON object with a ); ``` -A request to `/api/:date?` with a valid date should return a JSON object with a `utc` key that is a string of the input date in the format: `Thu, 01 Jan 1970 00:00:00 GMT` +有効な日付を持つ `/api/:date?` へのリクエストに対して、JSON オブジェクトを返し、その `utc` キーの値は入力日付を表す `Thu, 01 Jan 1970 00:00:00 GMT` 形式の文字列である必要があります。 ```js (getUserInput) => @@ -72,7 +72,7 @@ A request to `/api/:date?` with a valid date should return a JSON object with a ); ``` -A request to `/api/1451001600000` should return `{ unix: 1451001600000, utc: "Fri, 25 Dec 2015 00:00:00 GMT" }` +`/api/1451001600000` へのリクエストに対して、`{ unix: 1451001600000, utc: "Fri, 25 Dec 2015 00:00:00 GMT" }` を返す必要があります。 ```js (getUserInput) => @@ -89,7 +89,7 @@ A request to `/api/1451001600000` should return `{ unix: 1451001600000, utc: "Fr ); ``` -Your project can handle dates that can be successfully parsed by `new Date(date_string)` +あなたのプロジェクトは、`new Date(date_string)` で正常に解析できる日付を処理することができます。 ```js (getUserInput) => @@ -106,7 +106,7 @@ Your project can handle dates that can be successfully parsed by `new Date(date_ ); ``` -If the input date string is invalid, the api returns an object having the structure `{ error : "Invalid Date" }` +入力された日付文字列が無効な場合、API は `{ error : "Invalid Date" }` という構造のオブジェクトを返します。 ```js (getUserInput) => @@ -120,7 +120,7 @@ If the input date string is invalid, the api returns an object having the struct ); ``` -An empty date parameter should return the current time in a JSON object with a `unix` key +空の日付パラメータに対して、`unix` キーを持ち、現在時刻を表す JSON オブジェクトを返す必要があります。 ```js (getUserInput) => @@ -135,7 +135,7 @@ An empty date parameter should return the current time in a JSON object with a ` ); ``` -An empty date parameter should return the current time in a JSON object with a `utc` key +空の日付パラメータに対して、`utc` キーを持ち、現在時刻を表す JSON オブジェクトを返す必要があります。 ```js (getUserInput) => diff --git a/curriculum/challenges/japanese/05-back-end-development-and-apis/back-end-development-and-apis-projects/url-shortener-microservice.md b/curriculum/challenges/japanese/05-back-end-development-and-apis/back-end-development-and-apis-projects/url-shortener-microservice.md index 05f89c9eed2..83497c95697 100644 --- a/curriculum/challenges/japanese/05-back-end-development-and-apis/back-end-development-and-apis-projects/url-shortener-microservice.md +++ b/curriculum/challenges/japanese/05-back-end-development-and-apis/back-end-development-and-apis-projects/url-shortener-microservice.md @@ -14,21 +14,21 @@ dashedName: url-shortener-microservice - Replit スタータープロジェクトを使用して、プロジェクトを完了させる。 - 使い慣れたサイトビルダーを使用してプロジェクトを完了させる。 必ず GitHub リポジトリのすべてのファイルを取り込む。 -If you use Replit, follow these steps to set up the project: +Replit を使用する場合は、下記の手順でプロジェクトをセットアップしてください。 -- Start by importing the project on Replit. -- Next, you will see a `.replit` window. -- Select `Use run command` and click the `Done` button. +- まず、Replit でプロジェクトをインポートします。 +- すると、`.replit` ファイルのウィンドウが表示されます。 +- `Use run command` を選択して `Done` ボタンをクリックします。 -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +完了したら、プロジェクトの動作デモをどこか公開の場にホストしてください。 そして「回答のリンク」欄に、デモの URL を提出してください。 必要に応じて、プロジェクトのソースコードへのリンクも「GitHub のリンク」欄に提出してください。 # --instructions-- -**HINT:** Do not forget to use a body parsing middleware to handle the POST requests. Also, you can use the function `dns.lookup(host, cb)` from the `dns` core module to verify a submitted URL. +** ヒント: ** POST リクエストを処理するために、ボディ解析ミドルウェアを使用してください。 また、`dns` コアモジュールの `dns.lookup(host, cb)` 関数を使用して、送信された URL を確認することが可能です。 # --hints-- -You should provide your own project, not the example URL. +サンプルの URL ではなく、自分で作成したプロジェクトを提出する必要があります。 ```js (getUserInput) => { @@ -40,7 +40,7 @@ You should provide your own project, not the example URL. }; ``` -You can POST a URL to `/api/shorturl` and get a JSON response with `original_url` and `short_url` properties. Here's an example: `{ original_url : 'https://freeCodeCamp.org', short_url : 1}` +`/api/shorturl` へ URL を POST すると、`original_url` および `short_url` プロパティを持つ JSON レスポンスを取得できます。 例: `{ original_url : 'https://freeCodeCamp.org', short_url : 1}` ```js async (getUserInput) => { @@ -62,7 +62,7 @@ async (getUserInput) => { }; ``` -When you visit `/api/shorturl/`, you will be redirected to the original URL. +`/api/shorturl/` へアクセスすると、元の URL にリダイレクトされます。 ```js async (getUserInput) => { @@ -94,7 +94,7 @@ async (getUserInput) => { }; ``` -If you pass an invalid URL that doesn't follow the valid `http://www.example.com` format, the JSON response will contain `{ error: 'invalid url' }` +有効な `http://www.example.com` という形式に従っていない無効な URL を渡すと、JSON レスポンスで `{ error: 'invalid url' }` が返されます。 ```js async (getUserInput) => { diff --git a/curriculum/challenges/japanese/05-back-end-development-and-apis/basic-node-and-express/get-query-parameter-input-from-the-client.md b/curriculum/challenges/japanese/05-back-end-development-and-apis/basic-node-and-express/get-query-parameter-input-from-the-client.md index 29944fc8ab9..8df274a0bda 100644 --- a/curriculum/challenges/japanese/05-back-end-development-and-apis/basic-node-and-express/get-query-parameter-input-from-the-client.md +++ b/curriculum/challenges/japanese/05-back-end-development-and-apis/basic-node-and-express/get-query-parameter-input-from-the-client.md @@ -20,7 +20,7 @@ API エンドポイントを構築し、`GET /name` でマウントしてくだ # --hints-- -Test 1 : Your API endpoint should respond with `{ "name": "Mick Jagger" }` when the `/name` endpoint is called with `?first=Mick&last=Jagger` +テスト 1: API エンドポイントは、`/name` エンドポイントが `?first=Mick&last=Jagger` を使用して呼び出された場合 `{ "name": "Mick Jagger" }` を返します。 ```js (getUserInput) => @@ -38,7 +38,7 @@ Test 1 : Your API endpoint should respond with `{ "name": "Mick Jagger" }` when ); ``` -Test 2 : Your API endpoint should respond with `{ "name": "Keith Richards" }` when the `/name` endpoint is called with `?first=Keith&last=Richards` +テスト 2: API エンドポイントは、`/name` エンドポイントが `?first=Keith&last=Richards` を使用して呼び出された場合 `{ "name": "Keith Richards" }` を返します。 ```js (getUserInput) => diff --git a/curriculum/challenges/japanese/05-back-end-development-and-apis/basic-node-and-express/meet-the-node-console.md b/curriculum/challenges/japanese/05-back-end-development-and-apis/basic-node-and-express/meet-the-node-console.md index ac8a58bab25..3b0902912dc 100644 --- a/curriculum/challenges/japanese/05-back-end-development-and-apis/basic-node-and-express/meet-the-node-console.md +++ b/curriculum/challenges/japanese/05-back-end-development-and-apis/basic-node-and-express/meet-the-node-console.md @@ -1,6 +1,6 @@ --- id: 587d7fb0367417b2b2512bed -title: ノードコンソールを確認する +title: Node コンソールに触れる challengeType: 2 forumTopicId: 301515 dashedName: meet-the-node-console @@ -14,27 +14,27 @@ dashedName: meet-the-node-console - Replit スタータープロジェクトを使用して、チャレンジを完了させる。 - 使い慣れたサイトビルダーを使用してプロジェクトを完了させる。 必ず GitHub リポジトリのすべてのファイルを取り込む。 -If you use Replit, follow these steps to set up the project: +Replit を使用する場合は、下記の手順でプロジェクトをセットアップしてください。 -- Start by importing the project on Replit. -- Next, you will see a `.replit` window. -- Select `Use run command` and click the `Done` button. +- まず、Replit でプロジェクトをインポートします。 +- すると、`.replit` ファイルのウィンドウが表示されます。 +- `Use run command` を選択して `Done` ボタンをクリックします。 -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. +完了したら、プロジェクトの動作デモをどこか公開の場にホストしてください。 そして「回答のリンク」欄に、デモの URL を提出してください。 -During the development process, it is important to be able to check what’s going on in your code. +開発プロセスでは、コード内で何が起きているかを確認できることが重要です。 -Node is just a JavaScript environment. Like client side JavaScript, you can use the console to display useful debug information. On your local machine, you would see console output in a terminal. On Replit, a terminal is open in the right pane by default. +Node は単なる JavaScript 環境にすぎません。 クライアントサイド JavaScript と同様に、コンソールを使用して有用なデバッグ情報を表示できます。 ローカルマシンでは、ターミナルでコンソール出力を確認できます。 Replit では、デフォルトで右側のペインにターミナルが開きます。 -We recommend to keep the terminal open while working at these challenges. By reading the output in the terminal, you can see any errors that may occur. +チャレンジの作業中はターミナルを開いたままにしておくことをお勧めします。 ターミナルの出力を見て、発生したエラーを確認することができます。 # --instructions-- -Modify the `myApp.js` file to log "Hello World" to the console. +`myApp.js` ファイルを変更して、コンソールログに「Hello World」と出力してください。 # --hints-- -`"Hello World"` should be in the console +`"Hello World"` がコンソールに表示されます。 ```js (getUserInput) => diff --git a/curriculum/challenges/japanese/05-back-end-development-and-apis/basic-node-and-express/serve-json-on-a-specific-route.md b/curriculum/challenges/japanese/05-back-end-development-and-apis/basic-node-and-express/serve-json-on-a-specific-route.md index 917b20de2bb..81be56a2a89 100644 --- a/curriculum/challenges/japanese/05-back-end-development-and-apis/basic-node-and-express/serve-json-on-a-specific-route.md +++ b/curriculum/challenges/japanese/05-back-end-development-and-apis/basic-node-and-express/serve-json-on-a-specific-route.md @@ -18,7 +18,7 @@ HTML サーバーは HTML を提供しますが、API はデータを提供し # --hints-- -エンドポイント `/json` は json オブジェクト `{"message": "Hello json"}` を提供する必要があります。 +エンドポイント `/json` は JSON オブジェクト `{"message": "Hello json"}` を提供する必要があります。 ```js (getUserInput) => diff --git a/curriculum/challenges/japanese/05-back-end-development-and-apis/basic-node-and-express/use-the-.env-file.md b/curriculum/challenges/japanese/05-back-end-development-and-apis/basic-node-and-express/use-the-.env-file.md index a7f9bd54d5a..367ac7c9163 100644 --- a/curriculum/challenges/japanese/05-back-end-development-and-apis/basic-node-and-express/use-the-.env-file.md +++ b/curriculum/challenges/japanese/05-back-end-development-and-apis/basic-node-and-express/use-the-.env-file.md @@ -18,11 +18,11 @@ dashedName: use-the--env-file プロジェクトディレクトリのルートに `.env` ファイルを作成し、変数 `MESSAGE_STYLE=uppercase` を保存してください。 -次に、前のチャレンジで作成した `/json` GET ルートハンドラーで、`process.env.MESSAGE_STYLE` にアクセスし、変数が `uppercase` に等しい場合にレスポンスオブジェクトの `message` を大文字に変換してください。 レスポンスオブジェクトは、 `MESSAGE_STYLE` の値に応じて、`{"message": "Hello json"}` または `{"message": "HELLO JSON"}` のいずれかにする必要があります。 Note that you must read the value of `process.env.MESSAGE_STYLE` **inside** the route handler, not outside of it, due to the way our tests run. +次に、前のチャレンジで作成した `/json` GET ルートハンドラーで、`process.env.MESSAGE_STYLE` にアクセスし、変数が `uppercase` に等しい場合にレスポンスオブジェクトの `message` を大文字に変換してください。 レスポンスオブジェクトは、 `MESSAGE_STYLE` の値に応じて、`{"message": "Hello json"}` または `{"message": "HELLO JSON"}` のいずれかにする必要があります。 テストの都合上、`process.env.MESSAGE_STYLE` の値はルートハンドラーの外側ではなく**内側**で読み取る必要がありますので注意してください。 ** 注: ** Replit を使用している場合は、 `.env` ファイルを作成することはできません。 代わりに、組み込みの SECRETS タブを使用して変数を追加してください。 -ローカル環境で作業している場合は、`dotenv` パッケージが必要です。 このパッケージにより、環境変数が `.env` ファイルから `process.env` に読み込まれます。 `dotenv` パッケージはすでにインストールされており、プロジェクトの `package.json` ファイルに含まれています。 At the top of your `myApp.js` file, add `require('dotenv').config()` to load the environment variables. +ローカル環境で作業している場合は、`dotenv` パッケージが必要です。 このパッケージにより、環境変数が `.env` ファイルから `process.env` に読み込まれます。 `dotenv` パッケージはすでにインストールされており、プロジェクトの `package.json` ファイルに含まれています。 `myApp.js` ファイルの先頭に `require('dotenv').config()` を追加して、環境変数を読み込んでください。 # --hints-- diff --git a/curriculum/challenges/japanese/05-back-end-development-and-apis/managing-packages-with-npm/how-to-use-package.json-the-core-of-any-node.js-project-or-npm-package.md b/curriculum/challenges/japanese/05-back-end-development-and-apis/managing-packages-with-npm/how-to-use-package.json-the-core-of-any-node.js-project-or-npm-package.md index 3d34f27dc6f..e5d4dd7187e 100644 --- a/curriculum/challenges/japanese/05-back-end-development-and-apis/managing-packages-with-npm/how-to-use-package.json-the-core-of-any-node.js-project-or-npm-package.md +++ b/curriculum/challenges/japanese/05-back-end-development-and-apis/managing-packages-with-npm/how-to-use-package.json-the-core-of-any-node.js-project-or-npm-package.md @@ -14,19 +14,19 @@ dashedName: how-to-use-package-json-the-core-of-any-node-js-project-or-npm-packa - Replit スタータープロジェクトを使用して、チャレンジを完了させる。 - 使い慣れたサイトビルダーを使用してプロジェクトを完了させる。 必ず GitHub リポジトリのすべてのファイルを取り込む。 -If you use Replit, follow these steps to set up the project: +Replit を使用する場合は、下記の手順でプロジェクトをセットアップしてください。 -- Start by importing the project on Replit. -- Next, you will see a `.replit` window. -- Select `Use run command` and click the `Done` button. +- まず、Replit でプロジェクトをインポートします。 +- すると、`.replit` ファイルのウィンドウが表示されます。 +- `Use run command` を選択して `Done` ボタンをクリックします。 -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. +完了したら、プロジェクトの動作デモをどこか公開の場にホストしてください。 そして「回答のリンク」欄に、デモの URL を提出してください。 -The `package.json` file is the center of any Node.js project or npm package. It stores information about your project, similar to how the <head> section of an HTML document describes the content of a webpage. It consists of a single JSON object where information is stored in key-value pairs. There are only two required fields; "name" and "version", but it’s good practice to provide additional information about your project that could be useful to future users or maintainers. +`package.json` ファイルは、Node.js プロジェクトまたは npm パッケージの中心となります。 HTML ドキュメントの <head> セクションでウェブページの内容を記述するのと同じように、このファイルにはプロジェクトに関する情報を保存します。 ファイルは単一の JSON オブジェクトで構成され、そこに情報がキーと値のペアで保存されます。 必須のフィールドは「name」と「version」の 2 つのみですが、将来のユーザーや保守作業者に役立つように、プロジェクトに関する追加情報を記述しておくことをお勧めします。 -If you look at the file tree of your project, you will find the package.json file on the top level of the tree. This is the file that you will be improving in the next couple of challenges. +プロジェクトのファイルツリーを見ると、package.json ファイルはツリーの最上位のレベルにあります。 以降のチャレンジではこのファイルに改良を加えていきます。 -One of the most common pieces of information in this file is the `author` field. It specifies who created the project, and can consist of a string or an object with contact or other details. An object is recommended for bigger projects, but a simple string like the following example will do for this project. +このファイルで最もよく使われる情報の 1 つは、`author` フィールドです。 これはプロジェクトの作成者を指定するもので、連絡先などの詳細を記した文字列またはオブジェクトで構成できます。 より大きなプロジェクトではオブジェクトが推奨されますが、このプロジェクトでは次の例のような単純な文字列を使用します。 ```json "author": "Jane Doe", @@ -34,13 +34,13 @@ One of the most common pieces of information in this file is the `author` field. # --instructions-- -Add your name as the `author` of the project in the package.json file. +package.json ファイルで、プロジェクトの `author` の名前を追加してください。 -**Note:** Remember that you’re writing JSON, so all field names must use double-quotes (") and be separated with a comma (,). +**注: ** JSON を記述しているので、すべてのフィールド名に二重引用符 (") を使用し、コンマ (,) で区切る必要があります。 # --hints-- -package.json should have a valid "author" key +package.json に、有効な「author」キーを記述する必要があります。 ```js (getUserInput) => diff --git a/curriculum/challenges/japanese/05-back-end-development-and-apis/mongodb-and-mongoose/install-and-set-up-mongoose.md b/curriculum/challenges/japanese/05-back-end-development-and-apis/mongodb-and-mongoose/install-and-set-up-mongoose.md index 7b0d27b1c2c..242c8309cb4 100644 --- a/curriculum/challenges/japanese/05-back-end-development-and-apis/mongodb-and-mongoose/install-and-set-up-mongoose.md +++ b/curriculum/challenges/japanese/05-back-end-development-and-apis/mongodb-and-mongoose/install-and-set-up-mongoose.md @@ -14,25 +14,25 @@ dashedName: install-and-set-up-mongoose - Replit スタータープロジェクトを使用して、チャレンジを完了させる。 - 使い慣れたサイトビルダーを使用してプロジェクトを完了させる。 必ず GitHub リポジトリのすべてのファイルを取り込む。 -If you use Replit, follow these steps to set up the project: +Replit を使用する場合は、下記の手順でプロジェクトをセットアップしてください。 -- Start by importing the project on Replit. -- Next, you will see a `.replit` window. -- Select `Use run command` and click the `Done` button. +- まず、Replit でプロジェクトをインポートします。 +- すると、`.replit` ファイルのウィンドウが表示されます。 +- `Use run command` を選択して `Done` ボタンをクリックします。 -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. +完了したら、プロジェクトの動作デモをどこか公開の場にホストしてください。 そして「回答のリンク」欄に、デモの URL を提出してください。 -In this challenge, you will set up a MongoDB Atlas database and import the required packages to connect to it. +このチャレンジでは、MongoDB の Atlas データベースを設定し、それに接続するために必要なパッケージをインポートします。 -Follow this tutorial to set up a hosted database on MongoDB Atlas. +チュートリアルに従い、MongoDB Atlas にホストされたデータベースを設定してください。 # --instructions-- -`mongoose@^5.11.15` has been added to your project’s `package.json` file. First, require mongoose as `mongoose` in `myApp.js`. Next, create a `.env` file and add a `MONGO_URI` variable to it. Its value should be your MongoDB Atlas database URI. Be sure to surround the URI with single or double quotes, and remember that you can't use spaces around the `=` in environment variables. For example, `MONGO_URI='VALUE'`. +`mongoose@^5.11.15` をプロジェクトの `package.json` ファイルに追加してあります。 まず、`myApp.js` で `mongoose` を require してください。 次に、`.env` ファイルを作成し、`MONGO_URI` 変数を追加してください。 変数の値は、あなたの MongoDB Atlas データベースの URI である必要があります。 URI は一重引用符または二重引用符で囲んでください。また、環境変数では `=` の前後に空白を使用できないことに注意してください。 たとえば、`MONGO_URI='VALUE'` などとします。 -**Note:** If you are using Replit, you cannot create a `.env` file. Instead, use the built-in SECRETS tab to add the variable. Do not surround the values with quotes when using the SECRETS tab. +** 注: **Replit を使用している場合は、`.env` ファイルを作成することはできません。 代わりに、組み込みの SECRETS タブを使用して変数を追加してください。 SECRETS タブを使用する場合は、値を引用符で囲まないでください。 -When you are done, connect to the database using the following syntax: +完了したら、次の構文を使用してデータベースに接続してください。 ```js mongoose.connect(, { useNewUrlParser: true, useUnifiedTopology: true }); @@ -40,7 +40,7 @@ mongoose.connect(, { useNewUrlParser: true, useUnifiedTopology: true } # --hints-- -"mongoose version ^5.11.15" dependency should be in package.json +"mongoose version ^5.11.15" という依存関係が package.json に存在する必要があります。 ```js (getUserInput) => @@ -60,7 +60,7 @@ mongoose.connect(, { useNewUrlParser: true, useUnifiedTopology: true } ); ``` -"mongoose" should be connected to a database +"mongoose" をデータベースに接続する必要があります。 ```js (getUserInput) => diff --git a/curriculum/challenges/japanese/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md b/curriculum/challenges/japanese/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md index 6a87dbcfc89..d5baf51bcde 100644 --- a/curriculum/challenges/japanese/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md +++ b/curriculum/challenges/japanese/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. +完了したら、プロジェクトの動作デモをどこか公開の場にホストしてください。 そして「回答のリンク」欄に、デモの URL を提出してください。 A template engine enables you to use static template files (such as those written in *Pug*) in your app. At runtime, the template engine replaces variables in a template file with actual values which can be supplied by your server. Then it transforms the template into a static HTML file that is sent to the client. This approach makes it easier to design an HTML page and allows for displaying variables on the page without needing to make an API call from the client. diff --git a/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-and-testing-with-chai/learn-how-javascript-assertions-work.md b/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-and-testing-with-chai/learn-how-javascript-assertions-work.md index 4a2d46d2f91..de255811e07 100644 --- a/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-and-testing-with-chai/learn-how-javascript-assertions-work.md +++ b/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-and-testing-with-chai/learn-how-javascript-assertions-work.md @@ -14,13 +14,13 @@ dashedName: learn-how-javascript-assertions-work - Replit スタータープロジェクトを使用して、チャレンジを完了させる。 - 使い慣れたサイトビルダーを使用してプロジェクトを完了させる。 必ず GitHub リポジトリのすべてのファイルを取り込む。 -If you use Replit, follow these steps to set up the project: +Replit を使用する場合は、下記の手順でプロジェクトをセットアップしてください。 -- Start by importing the project on Replit. -- Next, you will see a `.replit` window. -- Select `Use run command` and click the `Done` button. +- まず、Replit でプロジェクトをインポートします。 +- すると、`.replit` ファイルのウィンドウが表示されます。 +- `Use run command` を選択して `Done` ボタンをクリックします。 -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. +完了したら、プロジェクトの動作デモをどこか公開の場にホストしてください。 そして「回答のリンク」欄に、デモの URL を提出してください。 # --instructions-- diff --git a/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-projects/american-british-translator.md b/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-projects/american-british-translator.md index bab292fdf01..285dbe0b3af 100644 --- a/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-projects/american-british-translator.md +++ b/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-projects/american-british-translator.md @@ -14,13 +14,13 @@ dashedName: american-british-translator - Replit スタータープロジェクトを使用して、プロジェクトを完了させる。 - 使い慣れたサイトビルダーを使用してプロジェクトを完了させる。 必ず GitHub リポジトリのすべてのファイルを取り込む。 -If you use Replit, follow these steps to set up the project: +Replit を使用する場合は、下記の手順でプロジェクトをセットアップしてください。 -- Start by importing the project on Replit. -- Next, you will see a `.replit` window. -- Select `Use run command` and click the `Done` button. +- まず、Replit でプロジェクトをインポートします。 +- すると、`.replit` ファイルのウィンドウが表示されます。 +- `Use run command` を選択して `Done` ボタンをクリックします。 -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +完了したら、プロジェクトの動作デモをどこか公開の場にホストしてください。 そして「回答のリンク」欄に、デモの URL を提出してください。 必要に応じて、プロジェクトのソースコードへのリンクも「GitHub のリンク」欄に提出してください。 # --instructions-- @@ -29,36 +29,36 @@ When you are done, make sure a working demo of your project is hosted somewhere - Create all of the unit/functional tests in `tests/1_unit-tests.js` and `tests/2_functional-tests.js` - See the JavaScript files in `/components` for the different spelling and terms your application should translate - To run the tests on Replit, set `NODE_ENV` to `test` without quotes in the `.env` file -- To run the tests in the console, use the command `npm run test`. To open the Replit console, press Ctrl+Shift+P (Cmd if on a Mac) and type "open shell" +- コンソールでテストを実行するには、コマンド `npm run test` を使用してください。 Replit コンソールを開くには、Ctrl+Shift+P (Macの場合はCmd) を押して「open shell」と入力してください。 -Write the following tests in `tests/1_unit-tests.js`: +`tests/1_unit-tests.js` に以下のテストを記述してください。 -- Translate `Mangoes are my favorite fruit.` to British English -- Translate `I ate yogurt for breakfast.` to British English -- Translate `We had a party at my friend's condo.` to British English -- Translate `Can you toss this in the trashcan for me?` to British English -- Translate `The parking lot was full.` to British English -- Translate `Like a high tech Rube Goldberg machine.` to British English -- Translate `To play hooky means to skip class or work.` to British English -- Translate `No Mr. Bond, I expect you to die.` to British English -- Translate `Dr. Grosh will see you now.` to British English -- Translate `Lunch is at 12:15 today.` to British English -- Translate `We watched the footie match for a while.` to American English -- Translate `Paracetamol takes up to an hour to work.` to American English -- Translate `First, caramelise the onions.` to American English -- Translate `I spent the bank holiday at the funfair.` to American English -- Translate `I had a bicky then went to the chippy.` to American English -- Translate `I've just got bits and bobs in my bum bag.` to American English -- Translate `The car boot sale at Boxted Airfield was called off.` to American English -- Translate `Have you met Mrs Kalyani?` to American English -- Translate `Prof Joyner of King's College, London.` to American English -- Translate `Tea time is usually around 4 or 4.30.` to American English -- Highlight translation in `Mangoes are my favorite fruit.` -- Highlight translation in `I ate yogurt for breakfast.` -- Highlight translation in `We watched the footie match for a while.` -- Highlight translation in `Paracetamol takes up to an hour to work.` +- `Mangoes are my favorite fruit.` をイギリス英語に変換してください +- `I ate yogurt for breakfast.` をイギリス英語に変換してください +- `We had a party at my friend's condo.` をイギリス英語に変換してください +- `Can you toss this in the trashcan for me?` をイギリス英語に変換してください +- `The parking lot was full.` をイギリス英語に変換してください +- `Like a high tech Rube Goldberg machine.` をイギリス英語に変換してください +- `To play hooky means to skip class or work.` をイギリス英語に変換してください +- `No Mr. Bond, I expect you to die.` をイギリス英語に変換してください +- `Dr. Grosh will see you now.` をイギリス英語に変換してください +- `Lunch is at 12:15 today.` をイギリス英語に変換してください +- `We watched the footie match for a while.` をアメリカ英語に変換してください +- `Paracetamol takes up to an hour to work.` をアメリカ英語に変換してください +- `First, caramelise the onions.` をアメリカ英語に変換してください +- `I spent the bank holiday at the funfair.` をアメリカ英語に変換してください +- `I had a bicky then went to the chippy.` をアメリカ英語に変換してください +- `I've just got bits and bobs in my bum bag.` をアメリカ英語に変換してください +- `The car boot sale at Boxted Airfield was called off.` をアメリカ英語に変換してください +- `Have you met Mrs Kalyani?` をアメリカ英語に変換してください +- `Prof Joyner of King's College, London.` をアメリカ英語に変換してください +- `Tea time is usually around 4 or 4.30.` をアメリカ英語に変換してください +- `Mangoes are my favorite fruit.` の変換部分をハイライト表示してください +- `I ate yogurt for breakfast.` の変換部分をハイライト表示してください +- `We watched the footie match for a while.` の変換部分をハイライト表示してください +- `Paracetamol takes up to an hour to work.` の変換部分をハイライト表示してください -Write the following tests in `tests/2_functional-tests.js`: +次のテストを `tests/2_functional-tests.js` に記述してください。 - Translation with text and locale fields: POST request to `/api/translate` - Translation with text and invalid locale field: POST request to `/api/translate` @@ -69,7 +69,7 @@ Write the following tests in `tests/2_functional-tests.js`: # --hints-- -You should provide your own project, not the example URL. +サンプルの URL ではなく、自分で作成したプロジェクトを提出する必要があります。 ```js (getUserInput) => { diff --git a/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-projects/issue-tracker.md b/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-projects/issue-tracker.md index 11e51e1fa8c..f1126ff047e 100644 --- a/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-projects/issue-tracker.md +++ b/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-projects/issue-tracker.md @@ -20,17 +20,17 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. 必要に応じて、プロジェクトのソースコードへのリンクも「GitHub のリンク」欄に提出してください。 # --instructions-- - Complete the necessary routes in `/routes/api.js` -- Create all of the functional tests in `tests/2_functional-tests.js` -- Copy the `sample.env` file to `.env` and set the variables appropriately -- To run the tests uncomment `NODE_ENV=test` in your `.env` file -- To run the tests in the console, use the command `npm run test`. To open the Replit console, press Ctrl+Shift+P (Cmd if on a Mac) and type "open shell" +- `tests/2_functional-tests.js` にすべての機能テストを作成してください。 +- `sample.env` ファイルを `.env` ファイルにコピーし、変数を適切に設定してください。 +- テストを実行するには、`.env` ファイルの `NODE_ENV=test` をコメント解除してください。 +- コンソールでテストを実行するには、コマンド `npm run test` を使用してください。 Replit コンソールを開くには、Ctrl+Shift+P (Macの場合はCmd) を押して「open shell」と入力してください。 -Write the following tests in `tests/2_functional-tests.js`: +`tests/2_functional-tests.js` に次のテストを記述してください。 - Create an issue with every field: POST request to `/api/issues/{project}` - Create an issue with only required fields: POST request to `/api/issues/{project}` @@ -49,7 +49,7 @@ Write the following tests in `tests/2_functional-tests.js`: # --hints-- -You can provide your own project, not the example URL. +サンプルの URL ではなく、自分で作成したプロジェクトを提出してください。 ```js (getUserInput) => { @@ -342,7 +342,7 @@ async (getUserInput) => { }; ``` -All 14 functional tests are complete and passing. +14 件の機能テストがすべて記述され、成功する状態になっています。 ```js async (getUserInput) => { diff --git a/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md b/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md index ad715808168..7dcffe5c907 100644 --- a/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md +++ b/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md @@ -14,13 +14,13 @@ dashedName: metric-imperial-converter - Replit スタータープロジェクトを使用して、プロジェクトを完了させる。 - 使い慣れたサイトビルダーを使用してプロジェクトを完了させる。 必ず GitHub リポジトリのすべてのファイルを取り込む。 -If you use Replit, follow these steps to set up the project: +Replit を使用する場合は、下記の手順でプロジェクトをセットアップしてください。 -- Start by importing the project on Replit. -- Next, you will see a `.replit` window. -- Select `Use run command` and click the `Done` button. +- まず、Replit でプロジェクトをインポートします。 +- すると、`.replit` ファイルのウィンドウが表示されます。 +- `Use run command` を選択して `Done` ボタンをクリックします。 -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +完了したら、プロジェクトの動作デモをどこか公開の場にホストしてください。 そして「回答のリンク」欄に、デモの URL を提出してください。 必要に応じて、プロジェクトのソースコードへのリンクも「GitHub のリンク」欄に提出してください。 # --instructions-- @@ -28,9 +28,9 @@ When you are done, make sure a working demo of your project is hosted somewhere - Complete the necessary routes in `/routes/api.js` - Copy the `sample.env` file to `.env` and set the variables appropriately - To run the tests uncomment `NODE_ENV=test` in your `.env` file -- To run the tests in the console, use the command `npm run test`. To open the Replit console, press Ctrl+Shift+P (Cmd if on a Mac) and type "open shell" +- コンソールでテストを実行するには、コマンド `npm run test` を使用してください。 Replit コンソールを開くには、Ctrl+Shift+P (Macの場合はCmd) を押して「open shell」と入力してください。 -Write the following tests in `tests/1_unit-tests.js`: +`tests/1_unit-tests.js` に以下のテストを記述してください。 - `convertHandler` should correctly read a whole number input. - `convertHandler` should correctly read a decimal number input. @@ -49,7 +49,7 @@ Write the following tests in `tests/1_unit-tests.js`: - `convertHandler` should correctly convert `lbs` to `kg`. - `convertHandler` should correctly convert `kg` to `lbs`. -Write the following tests in `tests/2_functional-tests.js`: +次のテストを `tests/2_functional-tests.js` に記述してください。 - Convert a valid input such as `10L`: `GET` request to `/api/convert`. - Convert an invalid input such as `32g`: `GET` request to `/api/convert`. @@ -263,7 +263,7 @@ async getUserInput => { }; ``` -All 16 unit tests are complete and passing. +16 件のユニットテストがすべて記述され、成功する状態になっています。 ```js async getUserInput => { @@ -288,7 +288,7 @@ async getUserInput => { }; ``` -All 5 functional tests are complete and passing. +5 件の機能テストがすべて記述され、成功する状態になっています。 ```js async getUserInput => { diff --git a/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-projects/personal-library.md b/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-projects/personal-library.md index 42e563b24de..fe89eeceb60 100644 --- a/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-projects/personal-library.md +++ b/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-projects/personal-library.md @@ -14,13 +14,13 @@ dashedName: personal-library - Replit スタータープロジェクトを使用して、プロジェクトを完了させる。 - 使い慣れたサイトビルダーを使用してプロジェクトを完了させる。 必ず GitHub リポジトリのすべてのファイルを取り込む。 -If you use Replit, follow these steps to set up the project: +Replit を使用する場合は、下記の手順でプロジェクトをセットアップしてください。 -- Start by importing the project on Replit. -- Next, you will see a `.replit` window. -- Select `Use run command` and click the `Done` button. +- まず、Replit でプロジェクトをインポートします。 +- すると、`.replit` ファイルのウィンドウが表示されます。 +- `Use run command` を選択して `Done` ボタンをクリックします。 -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +完了したら、プロジェクトの動作デモをどこか公開の場にホストしてください。 そして「回答のリンク」欄に、デモの URL を提出してください。 必要に応じて、プロジェクトのソースコードへのリンクも「GitHub のリンク」欄に提出してください。 # --instructions-- @@ -31,7 +31,7 @@ When you are done, make sure a working demo of your project is hosted somewhere # --hints-- -You can provide your own project, not the example URL. +サンプルの URL ではなく、自分で作成したプロジェクトを提出してください。 ```js (getUserInput) => { @@ -193,7 +193,7 @@ async (getUserInput) => { }; ``` -All 10 functional tests required are complete and passing. +10 件の機能テストがすべて記述され、成功する状態になっています。 ```js async (getUserInput) => { diff --git a/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-projects/sudoku-solver.md b/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-projects/sudoku-solver.md index 6626c815584..1dcfcafcc72 100644 --- a/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-projects/sudoku-solver.md +++ b/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-projects/sudoku-solver.md @@ -14,13 +14,13 @@ dashedName: sudoku-solver - Replit スタータープロジェクトを使用して、プロジェクトを完了させる。 - 使い慣れたサイトビルダーを使用してプロジェクトを完了させる。 必ず GitHub リポジトリのすべてのファイルを取り込む。 -If you use Replit, follow these steps to set up the project: +Replit を使用する場合は、下記の手順でプロジェクトをセットアップしてください。 -- Start by importing the project on Replit. -- Next, you will see a `.replit` window. -- Select `Use run command` and click the `Done` button. +- まず、Replit でプロジェクトをインポートします。 +- すると、`.replit` ファイルのウィンドウが表示されます。 +- `Use run command` を選択して `Done` ボタンをクリックします。 -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +完了したら、プロジェクトの動作デモをどこか公開の場にホストしてください。 そして「回答のリンク」欄に、デモの URL を提出してください。 必要に応じて、プロジェクトのソースコードへのリンクも「GitHub のリンク」欄に提出してください。 # --instructions-- @@ -31,9 +31,9 @@ When you are done, make sure a working demo of your project is hosted somewhere - All routing logic can go into `/routes/api.js` - See the `puzzle-strings.js` file in `/controllers` for some sample puzzles your application should solve - To run the challenge tests on this page, set `NODE_ENV` to `test` without quotes in the `.env` file -- To run the tests in the console, use the command `npm run test`. To open the Replit console, press Ctrl+Shift+P (Cmd if on a Mac) and type "open shell" +- コンソールでテストを実行するには、コマンド `npm run test` を使用してください。 Replit コンソールを開くには、Ctrl+Shift+P (Macの場合はCmd) を押して「open shell」と入力してください。 -Write the following tests in `tests/1_unit-tests.js`: +`tests/1_unit-tests.js` に以下のテストを記述してください。 - Logic handles a valid puzzle string of 81 characters - Logic handles a puzzle string with invalid characters (not 1-9 or `.`) @@ -352,7 +352,7 @@ async (getUserInput) => { }; ``` -All 12 unit tests are complete and passing. See `/tests/1_unit-tests.js` for the expected behavior you should write tests for. +12 件のユニットテストがすべて記述され、成功する状態になっています。 テストを記述すべき期待動作については、`/tests/1_unit-tests.js` を参照してください。 ```js async (getUserInput) => { @@ -377,7 +377,7 @@ async (getUserInput) => { }; ``` -All 14 functional tests are complete and passing. See `/tests/2_functional-tests.js` for the expected functionality you should write tests for. +14 件の機能テストがすべて記述され、成功する状態になっています。 テストを記述すべき期待される機能については、`/tests/2_functional-tests.js` を参照してください。 ```js async (getUserInput) => { diff --git a/curriculum/challenges/japanese/08-data-analysis-with-python/data-analysis-with-python-projects/sea-level-predictor.md b/curriculum/challenges/japanese/08-data-analysis-with-python/data-analysis-with-python-projects/sea-level-predictor.md index 6855c0e566b..09b6e56d33f 100644 --- a/curriculum/challenges/japanese/08-data-analysis-with-python/data-analysis-with-python-projects/sea-level-predictor.md +++ b/curriculum/challenges/japanese/08-data-analysis-with-python/data-analysis-with-python-projects/sea-level-predictor.md @@ -28,7 +28,7 @@ Python カリキュラムの対話式教育コンテンツを引き続き開発 データを使用して、次のタスクを完了してください。 - Use Pandas to import the data from `epa-sea-level.csv`. -- Use matplotlib to create a scatter plot using the `Year` column as the x-axis and the `CSIRO Adjusted Sea Level` column as the y-axix. +- Use matplotlib to create a scatter plot using the `Year` column as the x-axis and the `CSIRO Adjusted Sea Level` column as the y-axis. - Use the `linregress` function from `scipy.stats` to get the slope and y-intercept of the line of best fit. Plot the line of best fit over the top of the scatter plot. Make the line go through the year 2050 to predict the sea level rise in 2050. - Plot a new line of best fit just using the data from year 2000 through the most recent year in the dataset. Make the line also go through the year 2050 to predict the sea level rise in 2050 if the rate of rise continues as it has since the year 2000. - The x label should be `Year`, the y label should be `Sea Level (inches)`, and the title should be `Rise in Sea Level`. diff --git a/curriculum/challenges/japanese/09-information-security/information-security-projects/anonymous-message-board.md b/curriculum/challenges/japanese/09-information-security/information-security-projects/anonymous-message-board.md index 98932b746b3..fb917fcfe87 100644 --- a/curriculum/challenges/japanese/09-information-security/information-security-projects/anonymous-message-board.md +++ b/curriculum/challenges/japanese/09-information-security/information-security-projects/anonymous-message-board.md @@ -22,7 +22,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --instructions-- diff --git a/curriculum/challenges/japanese/09-information-security/information-security-projects/secure-real-time-multiplayer-game.md b/curriculum/challenges/japanese/09-information-security/information-security-projects/secure-real-time-multiplayer-game.md index 9cf04dbd16c..1106b539998 100644 --- a/curriculum/challenges/japanese/09-information-security/information-security-projects/secure-real-time-multiplayer-game.md +++ b/curriculum/challenges/japanese/09-information-security/information-security-projects/secure-real-time-multiplayer-game.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --instructions-- diff --git a/curriculum/challenges/japanese/09-information-security/information-security-projects/stock-price-checker.md b/curriculum/challenges/japanese/09-information-security/information-security-projects/stock-price-checker.md index 6efd8fdc2fd..db44c1420fe 100644 --- a/curriculum/challenges/japanese/09-information-security/information-security-projects/stock-price-checker.md +++ b/curriculum/challenges/japanese/09-information-security/information-security-projects/stock-price-checker.md @@ -24,7 +24,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. Optionally, also submit a link to your project's source code in the `GitHub Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --instructions-- diff --git a/curriculum/challenges/japanese/09-information-security/information-security-with-helmetjs/install-and-require-helmet.md b/curriculum/challenges/japanese/09-information-security/information-security-with-helmetjs/install-and-require-helmet.md index b9ef6d95d1b..60c98b6b301 100644 --- a/curriculum/challenges/japanese/09-information-security/information-security-with-helmetjs/install-and-require-helmet.md +++ b/curriculum/challenges/japanese/09-information-security/information-security-with-helmetjs/install-and-require-helmet.md @@ -20,7 +20,7 @@ If you use Replit, follow these steps to set up the project: - Next, you will see a `.replit` window. - Select `Use run command` and click the `Done` button. -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the `Solution Link` field. +When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. Helmet helps you secure your Express apps by setting various HTTP headers. diff --git a/curriculum/challenges/japanese/10-coding-interview-prep/algorithms/implement-binary-search.md b/curriculum/challenges/japanese/10-coding-interview-prep/algorithms/implement-binary-search.md index c0386f5e324..1b980c9020c 100644 --- a/curriculum/challenges/japanese/10-coding-interview-prep/algorithms/implement-binary-search.md +++ b/curriculum/challenges/japanese/10-coding-interview-prep/algorithms/implement-binary-search.md @@ -10,9 +10,10 @@ dashedName: implement-binary-search 二分探索はソートされた配列内で要素を検索するアルゴリズムで、その時間計算量は **O(log(n))** です。 次のように演算が行われます。 -1. ソートされた配列内の中央の `value` (値) を探します。 `value == target` であれば、「見つけた!」 を返します。 +1. ソートされた配列内の中央の `value` (値) を探します。 If `value == target` return `true` (The value has been found and the search is complete). 1. 中央の `value < target` であれば、次の比較で配列の右半分を検索します。 1. 中央の `value > target` であれば、次の比較で配列の左半分を検索します。 +1. If after searching the whole array the value is not present, return `false` (The array has been searched and the value is not in the array). このように配列を連続的に半減させており、時間計算量は log(n) になります。 このチャレンジでは、あなたがどのような経路をたどって目標値に到達したかを提示していただきます。 @@ -20,7 +21,7 @@ dashedName: implement-binary-search 二分探索アルゴリズムを配列に実装し、配列内で目標値を見つけるためにたどった経路 (各回の中間値比較) を返すような関数 `binarySearch` を記述してください。 -この関数は、ソートされた整数配列と目標値を入力として取ります。 そして目標値を見つけるまで、元の配列の各 2 分割で見つけた中間値が含まれる配列を返します (通りがけ順)。 目標値は、返される配列の最後の要素でなければなりません。 値が見つからない場合は、文字列 `Value Not Found` (値が見つかりません) を返します。 +この関数は、ソートされた整数配列と目標値を入力として取ります。 そして目標値を見つけるまで、元の配列の各 2 分割で見つけた中間値が含まれる配列を返します (通りがけ順)。 目標値は、返される配列の最後の要素でなければなりません。 If the value is not found, return the string `Value Not Found`. 例えば、`binarySearch([1,2,3,4,5,6,7], 5)` は `[4,6,5]` を返します。 diff --git a/curriculum/challenges/japanese/10-coding-interview-prep/take-home-projects/build-a-nightlife-coordination-app.md b/curriculum/challenges/japanese/10-coding-interview-prep/take-home-projects/build-a-nightlife-coordination-app.md index 171bfc0520c..55c6c077b4c 100644 --- a/curriculum/challenges/japanese/10-coding-interview-prep/take-home-projects/build-a-nightlife-coordination-app.md +++ b/curriculum/challenges/japanese/10-coding-interview-prep/take-home-projects/build-a-nightlife-coordination-app.md @@ -22,7 +22,7 @@ Build a full stack JavaScript app that is functionally similar to this: `. For example, an opening paragraph tag looks like this: `

                                                                                                                                                                                                                                  `. + +Closing tags tell the browser where an element ends. They are almost the same as opening tags; the only difference is that they have a forward slash before the keyword. For example, a closing paragraph tag looks like this: `

                                                                                                                                                                                                                                  `. + +A full paragraph element looks like this: + +element diagram + +You can think of elements as containers for content. The opening and closing tags tell the browser what content the element contains. The browser can then use that information to determine how it should interpret and format the content. + +There are some HTML elements that do not have a closing tag. These elements often look like this: `
                                                                                                                                                                                                                                  ` or ``, but some can also be used without the closing forward slash such as `
                                                                                                                                                                                                                                  ` or ``. These are known as self-closing tags or empty elements because they don’t wrap any content. You will encounter a few of these in later lessons, but for the most part, elements will have both opening and closing tags. + +HTML has a vast list of predefined tags that you can use to create all kinds of different elements. It is important to use the correct tags for content. Using the correct tags can have a big impact on two aspects of your sites: how they are ranked in search engines; and how accessible they are to users who rely on assistive technologies, like screen readers, to use the internet. + +Using the correct elements for content is called semantic HTML. You will explore this in much more depth later on in the curriculum. + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s [Introduction to HTML video](https://www.youtube.com/watch?v=LGQuIIv2RVA&list=PL4-IK0AVhVjM0xE0K2uZRvsM7LkIhsPT-) + +## --text-- + +What are HTML tags? + +## --answers-- + +HTML tags tell the browser what content an element contains. + +--- + +HTML tags tell the browser when to load its content. + +--- + +HTML tags tell the browser what content the next element contains. + + +## --video-solution-- + +1 diff --git a/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/elements-and-tags-question-b.md b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/elements-and-tags-question-b.md new file mode 100644 index 00000000000..9e8720616fb --- /dev/null +++ b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/elements-and-tags-question-b.md @@ -0,0 +1,50 @@ +--- +id: 637f4e1672c65bc8e73dfe1f +videoId: LGQuIIv2RVA +title: Elements and Tags Question B +challengeType: 15 +dashedName: elements-and-tags-question-b +--- + +# --description-- + +Almost all elements on an HTML page are just pieces of content wrapped in opening and closing HTML tags. + +Opening tags tell the browser this is the start of an HTML element. They are comprised of a keyword enclosed in angle brackets <>. For example, an opening paragraph tag looks like this: `

                                                                                                                                                                                                                                  `. + +Closing tags tell the browser where an element ends. They are almost the same as opening tags; the only difference is that they have a forward slash before the keyword. For example, a closing paragraph tag looks like this: `

                                                                                                                                                                                                                                  `. + +A full paragraph element looks like this: + +element diagram + +You can think of elements as containers for content. The opening and closing tags tell the browser what content the element contains. The browser can then use that information to determine how it should interpret and format the content. + +There are some HTML elements that do not have a closing tag. These elements often look like this: `
                                                                                                                                                                                                                                  ` or ``, but some can also be used without the closing forward slash such as `
                                                                                                                                                                                                                                  ` or ``. These are known as self-closing tags or empty elements because they don’t wrap any content. You will encounter a few of these in later lessons, but for the most part, elements will have both opening and closing tags. + +HTML has a vast list of predefined tags that you can use to create all kinds of different elements. It is important to use the correct tags for content. Using the correct tags can have a big impact on two aspects of your sites: how they are ranked in search engines; and how accessible they are to users who rely on assistive technologies, like screen readers, to use the internet. + +Using the correct elements for content is called semantic HTML. You will explore this in much more depth later on in the curriculum. + +# --question-- + +## --text-- + +What are the three parts of most HTML elements? + +## --answers-- + +An opening tag, self closing tag, and content. + +--- + +An opening tag, closing tag, and content. + +--- + +An opening tag, closing tag, and attribute. + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/html-boilerplate-question-a.md b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/html-boilerplate-question-a.md new file mode 100644 index 00000000000..d563ebf0ac3 --- /dev/null +++ b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/html-boilerplate-question-a.md @@ -0,0 +1,55 @@ +--- +id: 637f4e1c72c65bc8e73dfe20 +videoId: V8UAEoOvqFg +title: HTML Boilerplate Question A +challengeType: 15 +dashedName: html-boilerplate-question-a +--- + +# --description-- + +To demonstrate an HTML boilerplate, you first need an HTML file to work with. + +Create a new folder on your computer and name it `html-boilerplate`. Within that folder create a new file and name it `index.html`. + +You’re probably already familiar with a lot of different types of files, for example doc, pdf, and image files. + +To let the computer know you want to create an HTML file, you need to append the filename with the `.html` extension as you have done when creating the `index.html` file. + +It is worth noting that you named your HTML file index. You should always name the HTML file that will contain the homepage of your websites `index.html`. This is because web servers will by default look for an index.html page when users land on your websites - and not having one will cause big problems. + +## The DOCTYPE + +Every HTML page starts with a doctype declaration. The doctype’s purpose is to tell the browser what version of HTML it should use to render the document. The latest version of HTML is HTML5, and the doctype for that version is simply ``. + +The doctypes for older versions of HTML were a bit more complicated. For example, this is the doctype declaration for HTML4: + +```html + +``` + +However, you probably won’t ever want to be using an older version of HTML, and so you’ll always use ``. + +Open the `index.html` file created earlier in your text editor and add `` to the very first line. + +# --question-- +## --text-- + +What is the purpose of the `DOCTYPE` declaration? + +## --answers-- + +It tells the browser which version of HTML to use to render the document. + +--- + +It tells the browser that this document uses JavaScript. + +--- + +It tells the browser the title of the document. + + +## --video-solution-- + +1 diff --git a/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/html-boilerplate-question-b.md b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/html-boilerplate-question-b.md new file mode 100644 index 00000000000..7a528432239 --- /dev/null +++ b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/html-boilerplate-question-b.md @@ -0,0 +1,47 @@ +--- +id: 637f4e2872c65bc8e73dfe21 +videoId: V8UAEoOvqFg +title: HTML Boilerplate Question B +challengeType: 15 +dashedName: html-boilerplate-question-b +--- + +# --description-- + +After you declare the doctype, you need to provide an `` element. This is what’s known as the root element of the document, meaning that every other element in the document will be a descendant of it. + +This becomes more important later on when you learn about manipulating HTML with JavaScript. For now, just know that the `html` element should be included on every HTML document. + +Back in the `index.html` file, let’s add the `` element by typing out its opening and closing tags, like so: + +```html + + + +``` + +## What is the lang attribute? +`lang` specifies the language of the text content in that element. This attribute is primarily used for improving accessibility of the webpage. It allows assistive technologies, for example screen readers, to adapt according to the language and invoke correct pronunciation. + +# --question-- + +## --text-- + +What is the `html` element? + +## --answers-- + +It is the root element in the document and tells the browser which version of HTML it should use. + +--- + +It is the root element in the document and all other elements should descend from it. + +--- + +It is the root element in the document and all other elements should come after it. + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/html-boilerplate-question-c.md b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/html-boilerplate-question-c.md new file mode 100644 index 00000000000..76ceb2841e5 --- /dev/null +++ b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/html-boilerplate-question-c.md @@ -0,0 +1,66 @@ +--- +id: 637f4e2f72c65bc8e73dfe22 +videoId: LGQuIIv2RVA +title: HTML Boilerplate Question C +challengeType: 15 +dashedName: html-boilerplate-question-c +--- + +# --description-- + +The `` element is where you put important meta-information about your webpages, and stuff required for your webpages to render correctly in the browser. Inside the ``, you should not use any element that displays content on the webpage. + +## The Charset Meta Element +You should always have the `meta` tag for the charset encoding of the webpage in the head element: ``. + +Setting the encoding is very important because it ensures that the webpage will display special symbols and characters from different languages correctly in the browser. + +## Title Element +Another element you should always include in the head of an HTML document is the `title` element: + +```html +My First Webpage +``` + +The `title` element is used to give webpages a human-readable title which is displayed in your webpage’s browser tab. + +If you didn’t include a `title` element, the webpage’s title would default to its file name. In your case that would be `index.html`, which isn’t very meaningful for users; this would make it very difficult to find your webpage if the user has many browser tabs open. + +There are many more elements that can go within the `head` of an HTML document. However, for now it’s only crucial to know about the two elements you have covered here. You will introduce more elements that go into the `head` throughout the rest of the curriculum. + +Back in `index.html` file, let’s add a `head` element with a `charset` `meta` element and a `title` within it. The head element goes within the HTML element and should always be the first element under the opening `` tag: + + +```html + + + + + + My First Webpage + + +``` + +# --question-- + +## --text-- + +What is the purpose of the `head` element? + +## --answers-- + +The `head` element is used to display all elements that are displayed on the webpage. + +--- + +The `head` element is used to display important information about your webpage and is used to render web pages correctly with `meta` elements. + +--- + +The `head` element is used to display the header content on top of the webpage. + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/html-boilerplate-question-d.md b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/html-boilerplate-question-d.md new file mode 100644 index 00000000000..302b6a95d44 --- /dev/null +++ b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/html-boilerplate-question-d.md @@ -0,0 +1,48 @@ +--- +id: 637f4e3672c65bc8e73dfe23 +videoId: V8UAEoOvqFg +title: HTML Boilerplate Question D +challengeType: 15 +dashedName: html-boilerplate-question-d +--- + +# --description-- + +The final element needed to complete the HTML boilerplate is the `` element. This is where all the content that will be displayed to users will go - the text, images, lists, links, and so on. + +To complete the boilerplate, add a `body` element to the `index.html` file. The `body` element also goes within the `html` element and is always below the `head` element, like so: + +# --question-- + +## --assignment-- + +Watch and follow along to Kevin Powell’s brilliant Building your first web page video above. + +--- + +Build some muscle memory by deleting the contents of the `index.html` file and trying to write out all the boilerplate again from memory. Don’t worry if you have to peek at the lesson content the first few times if you get stuck. Just keep going until you can do it a couple of times from memory. + +--- + +Run your boilerplate through this [HTML validator](https://www.freeformatter.com/html-validator.html). Validators ensure your markup is correct and are an excellent learning tool, as they provide feedback on syntax errors you may be making often and aren’t aware of, such as missing closing tags and extra spaces in your HTML. + +## --text-- + +What is the purpose of the `body` element? + +## --answers-- + +This is where all important information about the webpage is displayed such as the `title` and `meta` tags. + +--- + +This is where you tell the browser how to render the webpage correctly. + +--- + +This is where all content will be displayed on the page such images, text, and links. + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-a.md b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-a.md new file mode 100644 index 00000000000..aa20f137e89 --- /dev/null +++ b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-a.md @@ -0,0 +1,42 @@ +--- +id: 6374f208de18c50e48ba767b +videoId: LGQuIIv2RVA +title: Introduction To HTML and CSS Question A +challengeType: 15 +dashedName: introduction-to-html-and-css-question-a +--- + +# --description-- + +HTML and CSS are two languages that work together to create everything that you see when you look at something on the internet. HTML is the raw data that a webpage is built out of. All the text, links, cards, lists, and buttons are created in HTML. CSS is what adds style to those plain elements. HTML puts information on a webpage, and CSS positions that information, gives it color, changes the font, and makes it look great! + +Many helpful resources out there keep referring to HTML and CSS as programming languages, but if you want to get technical, labeling them as such is not quite accurate. This is because they are only concerned with presenting information. They are not used to program logic. JavaScript, which you will learn in the next section, is a programming language because it’s used to make webpages do things. Yet, there is quite a lot you can do with just HTML and CSS, and you will definitely need them both. Throughout our curriculum, the following lessons focus on giving you the tools you need to succeed once you reach JavaScript content. + +# --question-- + +## --assignment-- + +Read
                                                                                                                                                                                                                                  the HTML vs CSS vs JavaScript article. It is a quick overview of the relationships between HTML, CSS, and JavaScript. + +## --text-- + +Which of the following statements is true? + +## --answers-- + +CSS is used to create the basic structure of a webpage, and HTML is used to add style. + +--- + +HTML is used to create the basic structure of a webpage, and CSS is used to add style. + +--- + +HTML and CSS are used to add style to a webpage, and JavaScript is used to create the basic structure. + + +## --video-solution-- + +2 + + diff --git a/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-b.md b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-b.md new file mode 100644 index 00000000000..cd9cf900330 --- /dev/null +++ b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-b.md @@ -0,0 +1,37 @@ +--- +id: 6376327e2724a688c04636e3 +videoId: LGQuIIv2RVA +title: Introduction To HTML and CSS Question B +challengeType: 15 +dashedName: introduction-to-html-and-css-question-b +--- + +# --description-- + + +HTML and CSS are two languages that work together to create everything that you see when you look at something on the internet. HTML is the raw data that a webpage is built out of. All the text, links, cards, lists, and buttons are created in HTML. CSS is what adds style to those plain elements. HTML puts information on a webpage, and CSS positions that information, gives it color, changes the font, and makes it look great! + +Many helpful resources out there keep referring to HTML and CSS as programming languages, but if you want to get technical, labeling them as such is not quite accurate. This is because they are only concerned with presenting information. They are not used to program logic. JavaScript, which you will learn in the next section, is a programming language because it’s used to make webpages do things. Yet, there is quite a lot you can do with just HTML and CSS, and you will definitely need them both. Throughout our curriculum, the following lessons focus on giving you the tools you need to succeed once you reach JavaScript content. + +# --question-- + +## --text-- + +Between HTML and CSS, which should you use to add paragraphs of text on a webpage? + +## --answers-- + +CSS + +--- + +JavaScript + +--- + +HTML + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-c.md b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-c.md new file mode 100644 index 00000000000..eb759394680 --- /dev/null +++ b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-c.md @@ -0,0 +1,34 @@ +--- +id: 637633162724a688c04636e4 +videoId: LGQuIIv2RVA +title: Introduction To HTML and CSS Question C +challengeType: 15 +dashedName: introduction-to-html-and-css-question-c +--- + +# --description-- + +HTML and CSS are two languages that work together to create everything that you see when you look at something on the internet. HTML is the raw data that a webpage is built out of. All the text, links, cards, lists, and buttons are created in HTML. CSS is what adds style to those plain elements. HTML puts information on a webpage, and CSS positions that information, gives it color, changes the font, and makes it look great! + +Many helpful resources out there keep referring to HTML and CSS as programming languages, but if you want to get technical, labeling them as such is not quite accurate. This is because they are only concerned with presenting information. They are not used to program logic. JavaScript, which you will learn in the next section, is a programming language because it’s used to make webpages do things. Yet, there is quite a lot you can do with just HTML and CSS, and you will definitely need them both. Throughout our curriculum, the following lessons focus on giving you the tools you need to succeed once you reach JavaScript content. +# --question-- + +## --text-- + +Between HTML and CSS, which should you use to change the font and background color of a button? + +## --answers-- + +You should use CSS to change the background color and font of a button. + +--- + +You should use JavaScript to change the background color and font of a button. + +--- + +You should use HTML to change the background color and font of a button. + +## --video-solution-- + +1 diff --git a/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-d.md b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-d.md new file mode 100644 index 00000000000..9e9ee049b75 --- /dev/null +++ b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-d.md @@ -0,0 +1,35 @@ +--- +id: 637633672724a688c04636e5 +videoId: LGQuIIv2RVA +title: Introduction To HTML and CSS Question D +challengeType: 15 +dashedName: introduction-to-html-and-css-question-d +--- + +# --description-- + +HTML and CSS are two languages that work together to create everything that you see when you look at something on the internet. HTML is the raw data that a webpage is built out of. All the text, links, cards, lists, and buttons are created in HTML. CSS is what adds style to those plain elements. HTML puts information on a webpage, and CSS positions that information, gives it color, changes the font, and makes it look great! + +Many helpful resources out there keep referring to HTML and CSS as programming languages, but if you want to get technical, labeling them as such is not quite accurate. This is because they are only concerned with presenting information. They are not used to program logic. JavaScript, which you will learn in the next section, is a programming language because it’s used to make webpages do things. Yet, there is quite a lot you can do with just HTML and CSS, and you will definitely need them both. Throughout our curriculum, the following lessons focus on giving you the tools you need to succeed once you reach JavaScript content. + +# --question-- + +## --text-- + +What is the difference between HTML, CSS, and JavaScript? + +## --answers-- + +HTML is for creating interactive elements, CSS is for the look and feel, and JavaScript is for creating the structure of a webpage. + +--- + +CSS is for the look and feel, JavaScript is for creating interactive elements, and HTML is for creating the structure of a webpage. + +--- + +JavaScript is for the look and feel, CSS is for creating the structure, and HTML is for creating interactive elements of a webpage. + +## --video-solution-- + +2 diff --git a/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/links-and-images-question-a.md b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/links-and-images-question-a.md new file mode 100644 index 00000000000..b4d237448f3 --- /dev/null +++ b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/links-and-images-question-a.md @@ -0,0 +1,66 @@ +--- +id: 637f704072c65bc8e73dfe36 +videoId: tsEQgGjSmkM +title: Links and Images Question A +challengeType: 15 +dashedName: links-and-images-question-a +--- + +# --description-- + +To get some practice using links and images throughout this lesson you need an HTML project to work with. + +- Create a new directory named `odin-links-and-images`. + +- Within that directory, create a new file named `index.html`. + +- Fill in the usual HTML boilerplate. + +- Finally, add the following `h1` to the `body`: `

                                                                                                                                                                                                                                  Homepage

                                                                                                                                                                                                                                  ` + +## Anchor Elements +To create a link in HTML, you use the anchor element. An anchor element is defined by wrapping the text or another HTML element you want to be a link with an `` tag. Add the following to the `body` of the `index.html` page you created and open it in the browser: + +```html +click me +``` + +You may have noticed that clicking this link doesn’t do anything. This is because an anchor tag on its own won’t know where you want to link to. You have to tell it a destination to go to. You do this by using an HTML attribute. + +An HTML attribute gives additional information to an HTML element and always goes in the element’s opening tag. An attribute is usually made up of two parts: a name, and a value; however, not all attributes require a value. In your case, you need to add a `href` (hyperlink reference) attribute to the opening anchor tag. The value of the `href` attribute is the destination you want your link to go to. + +Add the following `href` attribute to the anchor element you created previously and try clicking it again, don’t forget to refresh the browser so the new changes can be applied. + +```html +click me +``` + +By default, any text wrapped with an anchor tag without a `href` attribute will look like plain text. If the `href` attribute is present, the browser will give the text a blue color and underline it to signify it is a link. + +It’s worth noting you can use anchor tags to link to any kind of resource on the internet, not just other HTML documents. You can link to videos, pdf files, images, and so on, but for the most part, you will be linking to other HTML documents. + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s HTML Links video above. + +## --text-- + +What HTML tag is used to create a link? + +## --answers-- + +`` + +--- + +`

                                                                                                                                                                                                                                  ` + +--- + +`

                                                                                                                                                                                                                                    ` + +## --video-solution-- + +1 diff --git a/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/links-and-images-question-b.md b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/links-and-images-question-b.md new file mode 100644 index 00000000000..164fb01214f --- /dev/null +++ b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/links-and-images-question-b.md @@ -0,0 +1,55 @@ +--- +id: 637f703572c65bc8e73dfe35 +videoId: tsEQgGjSmkM +title: Links and Images Question B +challengeType: 15 +dashedName: links-and-images-question-b +--- + +# --description-- + +To get some practice using links and images throughout this lesson you need an HTML project to work with. + +- Create a new directory named odin-links-and-images. + +- Within that directory, create a new file named index.html. + +- Fill in the usual HTML boilerplate. + +- finally, add the following h1 to the body: `

                                                                                                                                                                                                                                    Homepage

                                                                                                                                                                                                                                    ` + +## Anchor Elements +To create a link in HTML, you use the anchor element. An anchor element is defined by wrapping the text or another HTML element you want to be a link with an `
                                                                                                                                                                                                                                    ` tag. Add the following to the body of the index.html page you created and open it in the browser: + +```html +click me +``` + +You may have noticed that clicking this link doesn’t do anything. This is because an anchor tag on its own won’t know where you want to link to. You have to tell it a destination to go to. You do this by using an HTML attribute. An HTML attribute gives additional information to an HTML element and always goes in the element’s opening tag. An attribute is usually made up of two parts: a name, and a value; however, not all attributes require a value. In your case, you need to add a href (hyperlink reference) attribute to the opening anchor tag. The value of the href attribute is the destination you want your link to go to. Add the following href attribute to the anchor element you created previously and try clicking it again, don’t forget to refresh the browser so the new changes can be applied. + +```html +click me +``` + +By default, any text wrapped with an anchor tag without a `href` attribute will look like plain text. If the `href` attribute is present, the browser will give the text a blue color and underline it to signify it is a link. It’s worth noting you can use anchor tags to link to any kind of resource on the internet, not just other HTML documents. You can link to videos, pdf files, images, and so on, but for the most part, you will be linking to other HTML documents. + +# --question-- +## --text-- + +What is an attribute? +## --answers-- + +An HTML attribute gives additional information to an HTML element and always goes in the element’s closing tag. + +--- + +An HTML attribute is used to tell the browser what the element contains. + +--- + +An HTML attribute gives additional information to an HTML element and always goes in the element’s opening tag. + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/links-and-images-question-c.md b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/links-and-images-question-c.md new file mode 100644 index 00000000000..c8a3913d77e --- /dev/null +++ b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/links-and-images-question-c.md @@ -0,0 +1,56 @@ +--- +id: 637f703072c65bc8e73dfe34 +videoId: tsEQgGjSmkM +title: Links and Images Question C +challengeType: 15 +dashedName: links-and-images-question-c +--- + +# --description-- + +To get some practice using links and images throughout this lesson you need an HTML project to work with. + +- Create a new directory named odin-links-and-images. + +- Within that directory, create a new file named index.html. + +- Fill in the usual HTML boilerplate. + +- finally, add the following h1 to the body: `

                                                                                                                                                                                                                                    Homepage

                                                                                                                                                                                                                                    ` + +## Anchor Elements +To create a link in HTML, you use the anchor element. An anchor element is defined by wrapping the text or another HTML element you want to be a link with an `` tag. Add the following to the body of the index.html page you created and open it in the browser: + +```html +click me +``` + +You may have noticed that clicking this link doesn’t do anything. This is because an anchor tag on its own won’t know where you want to link to. You have to tell it a destination to go to. You do this by using an HTML attribute. An HTML attribute gives additional information to an HTML element and always goes in the element’s opening tag. An attribute is usually made up of two parts: a name, and a value; however, not all attributes require a value. In your case, you need to add a href (hyperlink reference) attribute to the opening anchor tag. The value of the href attribute is the destination you want your link to go to. Add the following href attribute to the anchor element you created previously and try clicking it again, don’t forget to refresh the browser so the new changes can be applied. + +```html +click me +``` + +By default, any text wrapped with an anchor tag without a `href` attribute will look like plain text. If the `href` attribute is present, the browser will give the text a blue color and underline it to signify it is a link. It’s worth noting you can use anchor tags to link to any kind of resource on the internet, not just other HTML documents. You can link to videos, pdf files, images, and so on, but for the most part, you will be linking to other HTML documents. + +# --question-- + +## --text-- + +What attribute tells links where to go to? + +## --answers-- + +`src` + +--- + +`href` + +--- + +`link` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/links-and-images-question-d.md b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/links-and-images-question-d.md new file mode 100644 index 00000000000..2b6a665eb87 --- /dev/null +++ b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/links-and-images-question-d.md @@ -0,0 +1,112 @@ +--- +id: 637f702872c65bc8e73dfe33 +videoId: ta3Oxx7Yqbo +title: Links and Images Question D +challengeType: 15 +dashedName: links-and-images-question-d +--- + +# --description-- + + +Generally, there are two kinds of links you will create: + +- Links to pages on other websites on the internet + +- Links to pages located on your own websites + + +## Absolute Links +Links to pages on other websites on the internet are called absolute links. A typical absolute link will be made up of the following parts: `protocol://domain/path`. An absolute link will always contain the protocol and domain of the destination. + +You’ve already seen an absolute link in action. The link you created to The Odin Project’s About page earlier was an absolute link as it contains the protocol and domain. + +`https://www.theodinproject.com/about` + +## Relative Links +Links to other pages within your own website are called relative links. Relative links do not include the domain name, since it is another page on the same site, it assumes the domain name will be the same as the page you created the link on. + +Relative links only include the file path to the other page, relative to the page you are creating the link on. This is quite abstract, let’s see this in action using an example. + +Within the `odin-links-and-images` directory, create another HTML file named `about.html` and paste the following code into it: + +```html + + + + + Odin Links and Images + + + +

                                                                                                                                                                                                                                    About Page

                                                                                                                                                                                                                                    + + +``` + +Back in the index page, add the following anchor element to create a link to the about page: + +```html + +

                                                                                                                                                                                                                                    Homepage

                                                                                                                                                                                                                                    + click me + + About + +``` + +Open the index file in a browser and click on the about link to make sure it is all wired together correctly. Clicking the link should go to the about page you just created. + +This works because the index and about page are in the same directory. That means you can simply use its name (`about.html`) as the link’s href value. + +But you will usually want to organize your website directories a little better. Normally you would only have the `index.html` at the root directory and all other HTML files in their own directory. + +Create a directory named `pages` within the `odin-links-and-images` directory and move the `about.html` file into this new directory. + +Refresh the index page in the browser and then click on the about link. It will now be broken. This is because the location of the about page file has changed. + +To fix this, you just need to update the about link `href` value to include the `pages/` directory since that is the new location of the about file relative to the index file. + +```html + +

                                                                                                                                                                                                                                    Homepage

                                                                                                                                                                                                                                    + About + +``` + +Refresh the index page in the browser and try clicking the about link again, it should now be back in working order. + +In many cases, this will work just fine; however, you can still run into unexpected issues with this approach. Prepending `./` before the link will in most cases prevent such issues. By adding `./` you are specifying to your code that it should start looking for the file/directory relative to the **current** directory. + +```html + +

                                                                                                                                                                                                                                    Homepage

                                                                                                                                                                                                                                    + About + +``` + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s HTML File Structure video above. + +## --text-- + +What is the difference between an absolute and a relative link? + +## --answers-- + +An absolute link is a link to another page on the current website. A relative link is a link to another website. + +--- + +An absolute link is a link to another website. A relative link is a link another page on the current website. + +--- + +There is no difference between absolute and relative links. + +## --video-solution-- + +2 diff --git a/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/links-and-images-question-e.md b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/links-and-images-question-e.md new file mode 100644 index 00000000000..a935ae3262a --- /dev/null +++ b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/links-and-images-question-e.md @@ -0,0 +1,98 @@ +--- +id: 637f702372c65bc8e73dfe32 +videoId: 0xoztJCHpbQ +title: Links and Images Question E +challengeType: 15 +dashedName: links-and-images-question-e +--- + +# --description-- + +Websites would be fairly boring if they could only display text. Luckily HTML provides a wide variety of elements for displaying all sorts of different media. The most widely used of these is the image element. + +To display an image in HTML you use the `` element. Unlike the other elements you have encountered, the `` element is self-closing. Empty, self-closing HTML elements do not need a closing tag. + +Instead of wrapping content with an opening and closing tag, it embeds an image into the page using a `src` attribute which tells the browser where the image file is located. The `src` attribute works much like the `href` attribute for anchor tags. It can embed an image using both absolute and relative paths. + +For example, using an absolute path you can display an image located on The Odin Project site: + + + +To use images that you have on your own websites, you can use a relative path. + +- Create a new directory named `images` within the `odin-links-and-images` project. + +- Next, download [this image](https://unsplash.com/photos/Mv9hjnEUHR4/download?force=true&w=640) and move it into the `images` directory you just created. + +- Rename the image to `dog.jpg`. + +Finally add the image to the `index.html` file: + +```html + +

                                                                                                                                                                                                                                    Homepage

                                                                                                                                                                                                                                    + click me + + About + + + +``` + +Save the `index.html` file and open it in a browser to view Charles in all his glory. + + +## Parent Directories + +What if you want to use the dog image in the about page? You would first have to go up one level out of the pages directory into its parent directory so you could then access the images directory. + +To go to the parent directory you need to use two dots in the relative filepath like this: `../.` Let’s see this in action, within the body of the `about.html` file, add the following image below the heading you added earlier: + +```html + +``` + +To break this down: + +- First, you are going to the parent directory of the pages directory which is `odin-links-and-images`. + +- Then, from the parent directory, you can go into the `images` directory. + +- Finally, you can access the `dog.jpg` file. + +Using the metaphor we used earlier, using `../` in a filepath is kind of like stepping out from the room you are currently in to the main hallway so you can go to another room. + +## `Alt` attribute + +Besides the `src` attribute, every image element should also have an `alt` (alternative text) attribute. + +The `alt` attribute is used to describe an image. It will be used in place of the image if it cannot be loaded. It is also used with screen readers to describe what the image is to visually impaired users. + +This is how the The Odin Project logo example you used earlier looks with an `alt` attribute included: + + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s HTML Images Video above. + +## --text-- + +Which tag is used to display an image? + +## --answers-- + +`` + +--- + +`` + +--- + +`` + +## --video-solution-- + +3 diff --git a/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/links-and-images-question-f.md b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/links-and-images-question-f.md new file mode 100644 index 00000000000..ba4eb809e5d --- /dev/null +++ b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/links-and-images-question-f.md @@ -0,0 +1,94 @@ +--- +id: 637f701c72c65bc8e73dfe31 +videoId: 0xoztJCHpbQ +title: Links and Images Question F +challengeType: 15 +dashedName: links-and-images-question-f +--- + +# --description-- + +Websites would be fairly boring if they could only display text. Luckily HTML provides a wide variety of elements for displaying all sorts of different media. The most widely used of these is the image element. + +To display an image in HTML you use the `` element. Unlike the other elements you have encountered, the `` element is self-closing. Empty, self-closing HTML elements do not need a closing tag. + +Instead of wrapping content with an opening and closing tag, it embeds an image into the page using a src attribute which tells the browser where the image file is located. The src attribute works much like the href attribute for anchor tags. It can embed an image using both absolute and relative paths. + +For example, using an absolute path you can display an image located on The Odin Project site: + + + +To use images that you have on your own websites, you can use a relative path. + +- Create a new directory named `images` within the `odin-links-and-images` project. + +- Next, download [this image](https://unsplash.com/photos/Mv9hjnEUHR4/download?force=true&w=640) and move it into the images directory you just created. + +- Rename the image to `dog.jpg`. + +Finally add the image to the `index.html` file: + +```html + +

                                                                                                                                                                                                                                    Homepage

                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                    click me + + About + + + +``` + +Save the `index.html` file and open it in a browser to view Charles in all his glory. + + +## Parent Directories + +What if you want to use the dog image in the about page? You would first have to go up one level out of the pages directory into its parent directory so you could then access the images directory. + +To go to the parent directory you need to use two dots in the relative filepath like this: `../.` Let’s see this in action, within the body of the `about.html` file, add the following image below the heading you added earlier: + +```html + +``` + +To break this down: + +- First, you are going to the parent directory of the pages directory which is `odin-links-and-images`. + +- Then, from the parent directory, you can go into the `images` directory. + +- Finally, you can access the `dog.jpg` file. + +Using the metaphor we used earlier, using `../` in a filepath is kind of like stepping out from the room you are currently in to the main hallway so you can go to another room. + +## Alt attribute + +Besides the src attribute, every image element should also have an alt (alternative text) attribute. + +The alt attribute is used to describe an image. It will be used in place of the image if it cannot be loaded. It is also used with screen readers to describe what the image is to visually impaired users. + +This is how the The Odin Project logo example you used earlier looks with an alt attribute included: + + +# --question-- + +## --text-- + +What two attributes do images always need to have? + +## --answers-- + +`href` and `alt` + +--- + +`name` and `href` + +--- + +`alt` and `src` + +## --video-solution-- + +3 diff --git a/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/links-and-images-question-g.md b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/links-and-images-question-g.md new file mode 100644 index 00000000000..d1a6fcd4406 --- /dev/null +++ b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/links-and-images-question-g.md @@ -0,0 +1,94 @@ +--- +id: 637f701572c65bc8e73dfe30 +videoId: 0xoztJCHpbQ +title: Links and Images Question G +challengeType: 15 +dashedName: links-and-images-question-g +--- + +# --description-- + +Websites would be fairly boring if they could only display text. Luckily HTML provides a wide variety of elements for displaying all sorts of different media. The most widely used of these is the image element. + +To display an image in HTML you use the `` element. Unlike the other elements you have encountered, the `` element is self-closing. Empty, self-closing HTML elements do not need a closing tag. + +Instead of wrapping content with an opening and closing tag, it embeds an image into the page using a src attribute which tells the browser where the image file is located. The src attribute works much like the href attribute for anchor tags. It can embed an image using both absolute and relative paths. + +For example, using an absolute path you can display an image located on The Odin Project site: + + + +To use images that you have on your own websites, you can use a relative path. + +- Create a new directory named `images` within the `odin-links-and-images` project. + +- Next, download [this image](https://unsplash.com/photos/Mv9hjnEUHR4/download?force=true&w=640) and move it into the images directory you just created. + +- Rename the image to `dog.jpg`. + +Finally add the image to the `index.html` file: + +```html + +

                                                                                                                                                                                                                                    Homepage

                                                                                                                                                                                                                                    + click me + + About + + + +``` + +Save the `index.html` file and open it in a browser to view Charles in all his glory. + + +## Parent Directories + +What if you want to use the dog image in the about page? You would first have to go up one level out of the pages directory into its parent directory so you could then access the images directory. + +To go to the parent directory you need to use two dots in the relative filepath like this: `../.` Let’s see this in action, within the body of the `about.html` file, add the following image below the heading you added earlier: + +```html + +``` + +To break this down: + +- First, you are going to the parent directory of the pages directory which is `odin-links-and-images`. + +- Then, from the parent directory, you can go into the `images` directory. + +- Finally, you can access the `dog.jpg` file. + +Using the metaphor we used earlier, using `../` in a filepath is kind of like stepping out from the room you are currently in to the main hallway so you can go to another room. + +## Alt attribute + +Besides the src attribute, every image element should also have an alt (alternative text) attribute. + +The alt attribute is used to describe an image. It will be used in place of the image if it cannot be loaded. It is also used with screen readers to describe what the image is to visually impaired users. + +This is how the The Odin Project logo example you used earlier looks with an alt attribute included: + + +# --question-- + +## --text-- + +How do you access a parent directory in a filepath? + +## --answers-- + +`../` + +--- + +`./` + +--- + +`.../` + +## --video-solution-- + +1 diff --git a/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/links-and-images-question-h.md b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/links-and-images-question-h.md new file mode 100644 index 00000000000..cfd73fcfbc1 --- /dev/null +++ b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/links-and-images-question-h.md @@ -0,0 +1,98 @@ +--- +id: 637f700b72c65bc8e73dfe2f +videoId: 0xoztJCHpbQ +title: Links and Images Question H +challengeType: 15 +dashedName: links-and-images-question-h +--- + +# --description-- + +Websites would be fairly boring if they could only display text. Luckily HTML provides a wide variety of elements for displaying all sorts of different media. The most widely used of these is the image element. + +To display an image in HTML you use the `` element. Unlike the other elements you have encountered, the `` element is self-closing. Empty, self-closing HTML elements do not need a closing tag. + +Instead of wrapping content with an opening and closing tag, it embeds an image into the page using a src attribute which tells the browser where the image file is located. The src attribute works much like the href attribute for anchor tags. It can embed an image using both absolute and relative paths. + +For example, using an absolute path you can display an image located on The Odin Project site: + + + +To use images that you have on your own websites, you can use a relative path. + +- Create a new directory named `images` within the `odin-links-and-images` project. + +- Next, download [this image](https://unsplash.com/photos/Mv9hjnEUHR4/download?force=true&w=640) and move it into the images directory you just created. + +- Rename the image to `dog.jpg`. + +Finally add the image to the `index.html` file: + +```html + +

                                                                                                                                                                                                                                    Homepage

                                                                                                                                                                                                                                    + click me + + About + + + +``` + +Save the `index.html` file and open it in a browser to view Charles in all his glory. + + +## Parent Directories + +What if you want to use the dog image in the about page? You would first have to go up one level out of the pages directory into its parent directory so you could then access the images directory. + +To go to the parent directory you need to use two dots in the relative filepath like this: `../.` Let’s see this in action, within the body of the `about.html` file, add the following image below the heading you added earlier: + +```html + +``` + +To break this down: + +- First, you are going to the parent directory of the pages directory which is `odin-links-and-images`. + +- Then, from the parent directory, you can go into the `images` directory. + +- Finally, you can access the `dog.jpg` file. + +Using the metaphor we used earlier, using `../` in a filepath is kind of like stepping out from the room you are currently in to the main hallway so you can go to another room. + +## Alt attribute + +Besides the src attribute, every image element should also have an alt (alternative text) attribute. + +The alt attribute is used to describe an image. It will be used in place of the image if it cannot be loaded. It is also used with screen readers to describe what the image is to visually impaired users. + +This is how the The Odin Project logo example you used earlier looks with an alt attribute included: + + +# --question-- + +## --assignment-- + +Read about the four main image formats that can be used on the web. + +## --text-- + +What are the four main image formats that you can use for images on the web? + +## --answers-- + +TIFF, GIF, PNG, and SVG. + +--- + +JPG, PNG, GIF, and SVG. + +--- + +JPG, PDF, SVG, and GIF. + +## --video-solution-- + +2 diff --git a/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/project-create-a-recipe-page.md b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/project-create-a-recipe-page.md new file mode 100644 index 00000000000..657a3f6e32d --- /dev/null +++ b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/project-create-a-recipe-page.md @@ -0,0 +1,204 @@ +--- +id: 6391d1a4f7ac71efd0621380 +title: Build a Recipe Page Project +challengeType: 14 +dashedName: project-create-a-recipe-page +--- + +# --description-- + +The website will consist of a main index page which will have links to a few recipes. The website won’t look very pretty by the time you’ve finished. + +**User Stories:** + +1. Your recipe page should contain a `DOCTYPE` tag. +1. Your recipe page should include an `html` element with a `head` and `body` element as children. +1. You should have a `title` element within the `head` element with the text `The Odin Recipes`. +1. You should see an `h1` element that has the text `Creamy Chocolate Fudge`. +1. You should see an image with the url `*placeholder-fcc-cdn*` with a fitting `alt` text. +1. There should be an `h2` element with the text `Description` under the image. +1. You should see a couple of paragraphs under `Description` that describe the recipe. +1. There should be an `h2` element with the text `Ingredients` +1. Under the `Ingredients` heading there should be an unordered list with the ingredients needed for the recipe. +1. Under the list of ingredients add another heading called `Steps`. +1. You should see an ordered list with a couple of steps needed to complete the recipe. +1. Under the steps there should be an `h2` element with the text `More Recipes` +1. You should see a couple of links to other recipes inside an unordered list which has a couple of list items with anchor elements within. +1. These anchor elements should have `href` attribute with the value set to `#` + +# --hints-- + +You should have a `DOCTYPE` tag. + +```js +assert(code.match(//gi)); +``` + +You should have a `html` element with `head` and `body` element. + +```js +const html = document.querySelectorAll('html')[0]; +const head = document.querySelectorAll('html > head')[0]; +const body = document.querySelectorAll('html > body')[0]; + +assert(html && head && body); +``` + +You should have a `title` element within the `head` element that contains the text `The Odin Recipes`. + +```js +assert(document.querySelectorAll('HEAD > TITLE')[0].innerText == 'The Odin Recipes'); +``` + +You should have a `h1` element within your `body` element that contains the text `Creamy Chocolate Fudge`. + +```js +assert(document.querySelectorAll('BODY > H1')[0].innerText == 'Creamy Chocolate Fudge'); +``` + +You should have an image with the url `*placeholder-fcc-cdn*` with an `alt` attribute that has a fitting text. + +```js +const img = document.querySelectorAll('IMG')[0]; + +assert(img && img.alt !='' && img.src === 'https://i.imgur.com/p0J5baJ.jpg') +``` + +You should have an `h2` element with the text `Description`. + +```js +const h2 = document.querySelectorAll('H2')[0]; + +assert(h2.innerText == 'Description'); +``` + +You should have at least two `p` elements describing the recipe. + +```js +const paragraphs = document.querySelectorAll('P'); + +assert(paragraphs.length > 1); +``` + +You should have an `h2` element with the text `Ingredients`. + +```js +const h2 = document.querySelectorAll('H2')[1]; + +assert(h2.innerText == 'Ingredients'); +``` + +You should have an unordered list `
                                                                                                                                                                                                                                      ` with some ingredients as the list items `
                                                                                                                                                                                                                                    • `. + +```js +const unorderedList = document.querySelectorAll('UL')[0]; +const listItems = document.querySelectorAll('UL > LI'); + +assert(unorderedList && listItems && listItems.length > 1); +``` + +You should have an `h2` element with the text `Steps`. + +```js +const h2 = document.querySelectorAll('H2')[2]; + +assert(h2.innerText == 'Steps'); +``` + +You should have a `
                                                                                                                                                                                                                                        ` with the the steps as the list items `
                                                                                                                                                                                                                                      1. `. + +```js +const orderedList = document.querySelectorAll('OL')[0]; +const listItems = document.querySelectorAll('OL > LI'); + +assert(orderedList && listItems && listItems.length > 1); +``` + +You should have an `h2` element with the text `More Recipes`. + +```js +const h2 = document.querySelectorAll('H2')[3]; + +assert(h2.innerText == 'More Recipes'); +``` + +You should have an unordered list `
                                                                                                                                                                                                                                          ` element with list items `
                                                                                                                                                                                                                                        • ` that contain `` tags which lead to other recipes. + +```js +const unorderedList = document.querySelectorAll('UL')[1]; +const listItems = unorderedList.querySelectorAll('LI'); + +const allAreListItems = unorderedList.children.length == listItems.length; + +const containsAnchors = [...listItems].every(function(listItem) { + return listItem.querySelector("a") !== null; +}); + +assert(unorderedList && allAreListItems && containsAnchors && listItems.length > 1); +``` + +Your anchor tags linking to the recipes should have a `href` attribute with the value set to `#` + +```js +const anchorTags = document.querySelectorAll("a"); + +const allAnchorsHaveHrefHash = [...anchorTags].every(function(anchorTag) { + return anchorTag.hasAttribute("href") && anchorTag.getAttribute("href") === "#"; +}); + +assert(allAnchorsHaveHrefHash && anchorTags.length > 0); +``` + +# --seed-- + +## --seed-contents-- + +```html + +``` + +```css + +``` + +## --solutions-- + +```html + + + + The Odin Recipes + + +

                                                                                                                                                                                                                                          Creamy Chocolate Fudge

                                                                                                                                                                                                                                          + A delicious chocolate fudge dessert +

                                                                                                                                                                                                                                          Description

                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                          This recipe is for a rich and creamy chocolate fudge that is sure to satisfy your sweet tooth. It's perfect for a special occasion or as a tasty treat for any time of the year.

                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                          This recipe is easy to follow and only requires a few simple ingredients. With just a few steps, you'll be able to create a delicious dessert that everyone will love.

                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                          Ingredients

                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                          • 1 cup sugar
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • 1/2 cup unsalted butter
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • 1/4 cup milk
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • 1/4 cup cocoa powder
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • 1/4 cup chocolate chips
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • 1/4 tsp salt
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          • 1 tsp vanilla extract
                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                          Steps

                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                          1. In a medium saucepan, melt the butter over medium heat.
                                                                                                                                                                                                                                          2. +
                                                                                                                                                                                                                                          3. Add the sugar, milk, cocoa powder, and salt to the saucepan and stir until well combined.
                                                                                                                                                                                                                                          4. +
                                                                                                                                                                                                                                          5. Bring the mixture to a boil, stirring constantly, and then reduce the heat to low and simmer for 5 minutes.
                                                                                                                                                                                                                                          6. +
                                                                                                                                                                                                                                          7. Remove the saucepan from the heat and stir in the chocolate chips and vanilla extract until the chocolate is melted and the mixture is smooth.
                                                                                                                                                                                                                                          8. +
                                                                                                                                                                                                                                          9. Pour the fudge into a greased 8-inch square pan and let it cool completely before cutting into squares.
                                                                                                                                                                                                                                          10. +
                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                          More Recipes

                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                          + + +``` diff --git a/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-a.md b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-a.md new file mode 100644 index 00000000000..f4625eb7e31 --- /dev/null +++ b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-a.md @@ -0,0 +1,65 @@ +--- +id: 637f4e3e72c65bc8e73dfe24 +videoId: kcHKFZBVtf4 +title: Understand Ordered and Unordered List Question A +challengeType: 15 +dashedName: understand-ordered-and-unordered-list-question-a +--- + +# --description-- + +If you want to have a list of items where the order doesn’t matter, like a shopping list of items that can be bought in any order, then you can use an unordered list. + +Unordered lists are created using the `
                                                                                                                                                                                                                                            ` element, and each item within the list is created using the list item element `
                                                                                                                                                                                                                                          • `. + +Each list item in an unordered list begins with a bullet point: + + + +If you instead want to create a list of items where the order does matter, like step-by-step instructions for a recipe, or your top 10 favorite TV shows, then you can use an ordered list. + +Ordered lists are created using the `
                                                                                                                                                                                                                                              ` element. Each individual item in them is again created using the list item element `
                                                                                                                                                                                                                                            1. `. However, each list item in an ordered list begins with a number instead: + + + +# --question-- + +## --assignment-- + +Watch the first three minutes of Kevin Powell's video on Ordered and Unordered lists above. + +--- + +Make an unordered shopping list of your favorite foods. + +--- + +Make an ordered list of todo’s you need to get done today. + +--- + +Make an unordered list of places you’d like to visit someday. + +--- + +Make an ordered list of your all time top 5 favorite video games or movies. + +## --text-- + +What HTML tag is used to create an unordered list? + +## --answers-- + +`
                                                                                                                                                                                                                                            2. ` + +--- + +`
                                                                                                                                                                                                                                                ` + +--- + +`
                                                                                                                                                                                                                                                  ` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-b.md b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-b.md new file mode 100644 index 00000000000..4c6822fc504 --- /dev/null +++ b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-b.md @@ -0,0 +1,45 @@ +--- +id: 637f4e4672c65bc8e73dfe25 +videoId: LGQuIIv2RVA +title: Understand Ordered and Unordered List Question B +challengeType: 15 +dashedName: understand-ordered-and-unordered-list-question-b +--- + +# --description-- + +If you want to have a list of items where the order doesn’t matter, like a shopping list of items that can be bought in any order, then you can use an unordered list. + +Unordered lists are created using the `
                                                                                                                                                                                                                                                    ` element, and each item within the list is created using the list item element `
                                                                                                                                                                                                                                                  • `. + +Each list item in an unordered list begins with a bullet point: + + + +If you instead want to create a list of items where the order does matter, like step-by-step instructions for a recipe, or your top 10 favorite TV shows, then you can use an ordered list. + +Ordered lists are created using the `
                                                                                                                                                                                                                                                      ` element. Each individual item in them is again created using the list item element `
                                                                                                                                                                                                                                                    1. `. However, each list item in an ordered list begins with a number instead: + + + +# --question-- + +## --text-- + +What HTML tag is used to create an ordered list? + +## --answers-- + +`
                                                                                                                                                                                                                                                        ` + +--- + +`
                                                                                                                                                                                                                                                      1. ` + +--- + +`
                                                                                                                                                                                                                                                          ` + +## --video-solution-- + +1 diff --git a/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-c.md b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-c.md new file mode 100644 index 00000000000..c766990ca22 --- /dev/null +++ b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-c.md @@ -0,0 +1,45 @@ +--- +id: 637f4e5172c65bc8e73dfe26 +videoId: LGQuIIv2RVA +title: Understand Ordered and Unordered List Question C +challengeType: 15 +dashedName: understand-ordered-and-unordered-list-question-c +--- + +# --description-- + +If you want to have a list of items where the order doesn’t matter, like a shopping list of items that can be bought in any order, then you can use an unordered list. + +Unordered lists are created using the `
                                                                                                                                                                                                                                                            ` element, and each item within the list is created using the list item element `
                                                                                                                                                                                                                                                          • `. + +Each list item in an unordered list begins with a bullet point: + + + +If you instead want to create a list of items where the order does matter, like step-by-step instructions for a recipe, or your top 10 favorite TV shows, then you can use an ordered list. + +Ordered lists are created using the `
                                                                                                                                                                                                                                                              ` element. Each individual item in them is again created using the list item element `
                                                                                                                                                                                                                                                            1. `. However, each list item in an ordered list begins with a number instead: + + + +# --question-- + +## --text-- + +What HTML tag is used to create list items within both unordered and ordered lists? + +## --answers-- + +`
                                                                                                                                                                                                                                                                ` + +--- + +`
                                                                                                                                                                                                                                                              1. ` + +--- + +`
                                                                                                                                                                                                                                                                  ` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/working-with-text-question-a.md b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/working-with-text-question-a.md new file mode 100644 index 00000000000..8698b62aca8 --- /dev/null +++ b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/working-with-text-question-a.md @@ -0,0 +1,60 @@ +--- +id: 637f4e5872c65bc8e73dfe27 +videoId: yqcd-XkxZNM +title: Working With Text Question A +challengeType: 15 +dashedName: working-with-text-question-a +--- + +# --description-- + +What would you expect the following text to output on an HTML page? + +```html + + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor + incididunt ut labore et dolore magna aliqua. + + Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris + nisi ut aliquip ex ea commodo consequat. + +``` + +It looks like two paragraphs of text, and so you might expect it to display in that way. However that is not the case, as you can see in the output below: + + + +When the browser encounters new lines like this in your HTML, it will compress them down into one single space. The result of this compression is that all of the text is clumped together into one long line. + +If you want to create paragraphs in HTML, you need to use the paragraph element, which will add a newline after each of your paragraphs. A paragraph element is defined by wrapping text content with a `

                                                                                                                                                                                                                                                                  ` tag. + +Changing our example from before to use paragraph elements fixes the issue: + + + +# --question-- + +## --assignment-- + +Watch and follow along to Kevin Powell’s HTML Paragraph and Headings Video above. + +## --text-- + +How do you create a paragraph in HTML? + +## --answers-- + +`

                                                                                                                                                                                                                                                                  This is a paragraph

                                                                                                                                                                                                                                                                  ` + +--- + +`

                                                                                                                                                                                                                                                                  This is a paragraph

                                                                                                                                                                                                                                                                  ` + +--- + +`This is a paragraph` + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/working-with-text-question-b.md b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/working-with-text-question-b.md new file mode 100644 index 00000000000..a74d8d11452 --- /dev/null +++ b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/working-with-text-question-b.md @@ -0,0 +1,40 @@ +--- +id: 637f4e5f72c65bc8e73dfe28 +videoId: yqcd-XkxZNM +title: Working With Text Question B +challengeType: 15 +dashedName: working-with-text-question-b +--- + +# --description-- + +Headings are different from other HTML text elements: they are displayed larger and bolder than other text to signify that they are headings. + +There are 6 different levels of headings starting from `

                                                                                                                                                                                                                                                                  ` to `

                                                                                                                                                                                                                                                                  `. The number within a heading tag represents that heading’s level. The largest and most important heading is `h1`, while `h6` is the tiniest heading at the lowest level. + +Headings are defined much like paragraphs. For example, to create an `h1` heading, we wrap our heading text in a `

                                                                                                                                                                                                                                                                  ` tag. + + + +Using the correct level of heading is important as levels provide a hierarchy to the content. An `h1` heading should always be used for the heading of the overall page, and the lower level headings should be used as the headings for content in smaller sections of the page. + +# --question-- +## --text-- + +How many different levels of headings are there and what is the difference between them? + +## --answers-- + +There are 5 different levels of headings. `h5` is the smallest and least important heading, and `h1` is the largest and most important heading. + +--- + +There are 6 different levels of headings. `h6` is the largest and most important heading, and `h1` is the smallest and least important heading. + +--- + +There are 6 different levels of headings. `h1` is the largest and most important heading, and `h6` is the smallest and least important heading. + +## --video-solution-- + +3 diff --git a/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/working-with-text-question-c.md b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/working-with-text-question-c.md new file mode 100644 index 00000000000..6ccf0e06658 --- /dev/null +++ b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/working-with-text-question-c.md @@ -0,0 +1,47 @@ +--- +id: 637f4e6672c65bc8e73dfe29 +videoId: gW6cBZLUk6M +title: Working With Text Question C +challengeType: 15 +dashedName: working-with-text-question-c +--- + +# --description-- + +The `` element makes text bold. It also semantically marks text as important; this affects tools, like screen readers, that users with visual impairments will rely on to use your website. The tone of voice on some screen readers will change to communicate the importance of the text within a `strong` element. To define a `strong` element you wrap text content in a `` tag. + +You can use `strong` on its own: + + + +But you will probably find yourself using the `strong` element much more in combination with other text elements, like this: + + + +Sometimes you will want to make text bold without giving it an important meaning. You’ll learn how to do that in the CSS lessons later in the curriculum. + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s HTML Bold and Italic Text Video above. + +## --text-- + +What element should you use to make text bold and important? + +## --answers-- + +`This is an important message` + +--- + +`

                                                                                                                                                                                                                                                                  This is an important message

                                                                                                                                                                                                                                                                  ` + +--- + +`This is an important message` + +## --video-solution-- + +3 diff --git a/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/working-with-text-question-d.md b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/working-with-text-question-d.md new file mode 100644 index 00000000000..d6647f9a7ea --- /dev/null +++ b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/working-with-text-question-d.md @@ -0,0 +1,39 @@ +--- +id: 637f4e6e72c65bc8e73dfe2a +videoId: gW6cBZLUk6M +title: Working With Text Question D +challengeType: 15 +dashedName: working-with-text-question-d +--- + +# --description-- + +The `em` element makes text italic. It also semantically places emphasis on the text, which again may affect things like screen readers. To define an emphasized element you wrap text content in a `` tag. + +To use `em` on its own: + + +Again, like the `strong` element, you will find yourself mostly using the `em` element with other text elements: + + + +# --question-- +## --text-- + +What element should you use to make text italicized to add emphasis? + +## --answers-- + +`This is an italic message` + +--- + +`This is an italic message` + +--- + +`This is an italic message` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/working-with-text-question-e.md b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/working-with-text-question-e.md new file mode 100644 index 00000000000..d022a6331e9 --- /dev/null +++ b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/working-with-text-question-e.md @@ -0,0 +1,66 @@ +--- +id: 637f4e7972c65bc8e73dfe2b +videoId: gW6cBZLUk6M +title: Working With Text Question E +challengeType: 15 +dashedName: working-with-text-question-e +--- + +# --description-- + +You may have noticed that in all the examples in this lesson you indent any elements that are within other elements. This is known as nesting elements. + +When you nest elements within other elements, you create a parent and child relationship between them. The nested elements are the children and the element they are nested within is the parent. + +In the following example, the `body` element is the parent and the `p` is the child: + +```html + + + + +

                                                                                                                                                                                                                                                                  Lorem ipsum dolor sit amet.

                                                                                                                                                                                                                                                                  + + +``` + +Just as in human relationships, HTML parent elements can have many children. Elements at the same level of nesting are considered to be siblings. + +For example, the two `p` elements in the following code are siblings, since they are both children of the `body` tag and are at the same level of nesting as each other: + +```html + + + + +

                                                                                                                                                                                                                                                                  Lorem ipsum dolor sit amet.

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Ut enim ad minim veniam.

                                                                                                                                                                                                                                                                  + + +``` + +You use indentation to make the level of nesting clear and readable for yourselves and other developers who will work with your HTML in the future. It is recommended to indent any child elements by two spaces. + +The parent, child, and sibling relationships between elements will become much more important later when you start styling your HTML with CSS and adding behavior with JavaScript. For now, however, it is just important to know the distinction between how elements are related and the terminology used to describe their relationships. + +# --question-- + +## --text-- + +What relationship do two elements have if they are at the same level of nesting? + +## --answers-- + +The elements are each other's parents. + +--- + +The elements are each other's children. + +--- + +The elements are siblings. + +## --video-solution-- + +3 diff --git a/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/working-with-text-question-f.md b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/working-with-text-question-f.md new file mode 100644 index 00000000000..2ace3f4e36d --- /dev/null +++ b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/working-with-text-question-f.md @@ -0,0 +1,67 @@ +--- +id: 637f4e8072c65bc8e73dfe2c +videoId: gW6cBZLUk6M +title: Working With Text Question F +challengeType: 15 +dashedName: working-with-text-question-f +--- + +# --description-- + +You may have noticed that in all the examples in this lesson you indent any elements that are within other elements. This is known as nesting elements. + +When you nest elements within other elements, you create a parent and child relationship between them. The nested elements are the children and the element they are nested within is the parent. + +In the following example, the body element is the parent and the paragraph is the child: + +```html + + + + +

                                                                                                                                                                                                                                                                  Lorem ipsum dolor sit amet.

                                                                                                                                                                                                                                                                  + + +``` + +Just as in human relationships, HTML parent elements can have many children. Elements at the same level of nesting are considered to be siblings. + +For example, the two paragraphs in the following code are siblings, since they are both children of the body tag and are at the same level of nesting as each other: + +```html + + + + +

                                                                                                                                                                                                                                                                  Lorem ipsum dolor sit amet.

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Ut enim ad minim veniam.

                                                                                                                                                                                                                                                                  + + +``` + +You use indentation to make the level of nesting clear and readable for yourselves and other developers who will work with your HTML in the future. It is recommended to indent any child elements by two spaces. + +The parent, child, and sibling relationships between elements will become much more important later when you start styling your HTML with CSS and adding behavior with JavaScript. For now, however, it is just important to know the distinction between how elements are related and the terminology used to describe their relationships. + +# --question-- + +## --text-- + +What relationship does an element have with any nested element within it? + +## --answers-- + +The element within the other element is called the parent element. + +--- + +The element within the other element is called the child element. + +--- + +The element within the other element is called the sibling element. + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/working-with-text-question-g.md b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/working-with-text-question-g.md new file mode 100644 index 00000000000..fe83f0ef062 --- /dev/null +++ b/curriculum/challenges/japanese/10-coding-interview-prep/the-odin-project/working-with-text-question-g.md @@ -0,0 +1,49 @@ +--- +id: 637f4e8772c65bc8e73dfe2d +videoId: gW6cBZLUk6M +title: Working With Text Question G +challengeType: 15 +dashedName: working-with-text-question-g +--- + +# --description-- + +HTML comments are not visible to the browser; they allow us to comment on your code so that other developers or your future selves can read them and get some context about something that might not be clear in the code. + +Writing an HTML comment is simple: You just enclose the comment with ``tags. For example: + +```html +

                                                                                                                                                                                                                                                                  View the html to see the hidden comments

                                                                                                                                                                                                                                                                  + + + +

                                                                                                                                                                                                                                                                  Some paragraph text

                                                                                                                                                                                                                                                                  + + +``` + +# --question-- + +## --assignment-- + +To get some practice working with text in HTML, create a plain blog article page which uses different headings, uses paragraphs, and has some text in the paragraphs bolded and italicized. You can use [Lorem Ipsum](https://loremipsum.io) to generate dummy text, in place of real text as you build your sites. + +## --text-- + +How do you create HTML comments? + +## --answers-- + +`/* This is an HTML comment */` + +--- + +`` + +--- + +`<-- This is an HTML comment --!>` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d1ac33c68d27dcda5796.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d1ac33c68d27dcda5796.md index e1d53436b37..333d40644cf 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d1ac33c68d27dcda5796.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d1ac33c68d27dcda5796.md @@ -14,13 +14,25 @@ dashedName: step-23 `transform` プロパティを使用して要素を回転させる必要があります。 ```js -assert.notEmpty(new __helpers.CSSHelp(document).getStyle('.back-mountain')?.transform); +const backMountain = new __helpers.CSSHelp(document).getStyle('.back-mountain'); + +if (backMountain?.transform) { + assert.notEmpty(backMountain?.transform); +} else { + assert.notEmpty(backMountain?.rotate); +} ``` `.back-mountain` には `transform` の `--fcc-expected--` を設定する必要がありますが、`--fcc-actual--` が設定されています。 ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.back-mountain')?.transform, 'rotate(45deg)'); +const backMountain = new __helpers.CSSHelp(document).getStyle('.back-mountain'); + +if (backMountain?.transform) { + assert.equal(backMountain?.transform, 'rotate(45deg)'); +} else { + assert.equal(backMountain?.rotate, '45deg'); +} ``` `.back-mountain` には `left` プロパティが必要です。 diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d229b0e542520cd91c685.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d229b0e542520cd91c685.md index 4b240ab1c36..bdf54582a9f 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d229b0e542520cd91c685.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d229b0e542520cd91c685.md @@ -14,13 +14,25 @@ dashedName: step-84 `.foot.left` の `transform` を `rotate(80deg)` に設定する必要があります。 ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.foot.left').getPropVal('transform', true), 'rotate(80deg)'); +const leftFoot = new __helpers.CSSHelp(document).getStyle('.foot.left'); + +if (leftFoot?.transform) { + assert.equal(leftFoot.getPropVal('transform', true), 'rotate(80deg)'); +} else { + assert.equal(leftFoot.getPropVal('rotate', true), '80deg'); +} ``` `.foot.right` の `transform` を `rotate(-80deg)` に設定する必要があります。 ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.foot.right').getPropVal('transform', true), 'rotate(-80deg)'); +const rightFoot = new __helpers.CSSHelp(document).getStyle('.foot.right'); + +if (rightFoot?.transform) { + assert.equal(rightFoot.getPropVal('transform', true), 'rotate(-80deg)'); +} else { + assert.equal(rightFoot.getPropVal('rotate', true), '-80deg'); +} ``` # --seed-- diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2d4e80400325ff89664a.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2d4e80400325ff89664a.md index f5500147bf2..a75867bb9e3 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2d4e80400325ff89664a.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2d4e80400325ff89664a.md @@ -14,7 +14,14 @@ dashedName: step-91 `.arm.left` の `transform` を `rotate(130deg) scaleX(-1)` に設定する必要があります。 ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.arm.left').getPropVal('transform', true), 'rotate(130deg)scaleX(-1)'); +const leftArm = new __helpers.CSSHelp(document).getStyle('.arm.left'); + +if (leftArm?.rotate && leftArm?.transform) { + assert.equal(leftArm.getPropVal('rotate', true), '130deg'); + assert.equal(leftArm.getPropVal('transform', true), 'scaleX(-1)'); +} else { + assert.equal(leftArm.getPropVal('transform', true), 'rotate(130deg)scaleX(-1)'); +} ``` # --seed-- @@ -281,7 +288,6 @@ body { top: 35%; left: 5%; transform-origin: top left; - } --fcc-editable-region-- diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2ebc81ba81271460850d.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2ebc81ba81271460850d.md index ee9d1f634c4..0124ea93076 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2ebc81ba81271460850d.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2ebc81ba81271460850d.md @@ -14,7 +14,13 @@ dashedName: step-92 `.arm.right` の `transform` を `rotate(-45deg)` に設定する必要があります。 ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.arm.right')?.getPropVal('transform', true), 'rotate(-45deg)'); +const rightArm = new __helpers.CSSHelp(document).getStyle('.arm.right'); + +if (rightArm?.transform) { + assert.equal(rightArm?.getPropVal('transform', true), 'rotate(-45deg)'); +} else { + assert.equal(rightArm?.getPropVal('rotate', true), '-45deg'); +} ``` # --seed-- @@ -287,7 +293,6 @@ body { .arm.right { top: 0%; right: -5%; - } --fcc-editable-region-- diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d32c7fa21f32aaa91d499.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d32c7fa21f32aaa91d499.md index c3a63ec8771..67506cae0c9 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d32c7fa21f32aaa91d499.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d32c7fa21f32aaa91d499.md @@ -14,7 +14,16 @@ dashedName: step-97 `10%` 経由点の `transform` を `rotate(110deg) scaleX(-1)` に設定する必要があります。 ```js -assert([...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '10%')?.style?.transform?.replace(/\s+/g, '') === 'rotate(110deg)scaleX(-1)'); +const wave10Percent = [...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '10%'); +const rotateProp = wave10Percent?.style?.rotate?.replace(/\s+/g, ''); +const transformProp = wave10Percent?.style?.transform?.replace(/\s+/g, ''); + +if (rotateProp && transformProp) { + assert(rotateProp === '110deg'); + assert(transformProp === 'scaleX(-1)'); +} else { + assert(transformProp === 'rotate(110deg)scaleX(-1)'); +} ``` # --seed-- diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d333b738e3c2b5d58b095.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d333b738e3c2b5d58b095.md index 611404ac59e..7cc3d0fdc3e 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d333b738e3c2b5d58b095.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d333b738e3c2b5d58b095.md @@ -14,7 +14,16 @@ dashedName: step-98 `20%` 経由点の `transform` を `rotate(130deg) scaleX(-1)` に設定する必要があります。 ```js -assert([...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '20%')?.style?.transform?.replace(/\s+/g, '') === 'rotate(130deg)scaleX(-1)'); +const wave20Percent = [...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '20%'); +const transformProp = wave20Percent?.style?.transform?.replace(/\s+/g, ''); +const rotateProp = wave20Percent?.style?.rotate?.replace(/\s+/g, ''); + +if (rotateProp && transformProp) { + assert(rotateProp === '130deg'); + assert(transformProp === 'scaleX(-1)'); +} else { + assert(transformProp === 'rotate(130deg)scaleX(-1)'); +} ``` # --seed-- diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d337765b9f02c10e93722.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d337765b9f02c10e93722.md index e1dcbd8c204..6faa1f95f88 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d337765b9f02c10e93722.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d337765b9f02c10e93722.md @@ -14,13 +14,31 @@ dashedName: step-99 `30%` 経由点の `transform` を `rotate(110deg) scaleX(-1)` に設定する必要があります。 ```js -assert([...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '30%')?.style?.transform?.replace(/\s+/g, '') === 'rotate(110deg)scaleX(-1)'); +const wave30Percent = [...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '30%'); +const transformProp = wave30Percent?.style?.transform?.replace(/\s+/g, ''); +const rotateProp = wave30Percent?.style?.rotate?.replace(/\s+/g, ''); + +if (rotateProp && transformProp) { + assert(rotateProp === '110deg'); + assert(transformProp === 'scaleX(-1)'); +} else { + assert(transformProp === 'rotate(110deg)scaleX(-1)'); +} ``` `40%` 経由点の `transform` を `rotate(130deg) scaleX(-1)` に設定する必要があります。 ```js -assert([...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '40%')?.style?.transform?.replace(/\s+/g, '') === 'rotate(130deg)scaleX(-1)'); +const wave40Percent = [...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '40%'); +const transformProp = wave40Percent?.style?.transform?.replace(/\s+/g, ''); +const rotateProp = wave40Percent?.style?.rotate?.replace(/\s+/g, ''); + +if (rotateProp && transformProp) { + assert(rotateProp === '130deg'); + assert(transformProp === 'scaleX(-1)'); +} else { + assert(transformProp === 'rotate(130deg)scaleX(-1)'); +} ``` # --seed-- diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98f0.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98f0.md index 8d674e59fcc..3ae02ef3572 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98f0.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98f0.md @@ -16,11 +16,11 @@ gradient-type( ); ``` -上の例では、上部が `color1` の色、下部が `color2` の色となり、その合間は一方からもう一方の色へと均等に変化します。 では `.bb1a` に、タイプ `linear-gradient` のグラデーションを `background` プロパティに追加してください。1 番目の色として`--building-color1` を使用し、2 番目の色として `--window-color1` を 使用してください。 +上の例では、上部が `color1` の色、下部が `color2` の色となり、その合間は一方からもう一方の色へと均等に変化します。 In `.bb1a`, add a `background` property below the `background-color` property. Set it as a gradient of type `linear-gradient` that uses `--building-color1` as the first color and `--window-color1` as the second. # --hints-- -`.bb1a` に `background` を適用する必要があります。 +You should apply a `background` to `.bb1a` right after the `background-color`. ```js assert(new __helpers.CSSHelp(document).getStyle('.bb1a')?.background); diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa2407b521be39a3de7be1.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa2407b521be39a3de7be1.md index d2be74d2fa2..dfc941bfba3 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa2407b521be39a3de7be1.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa2407b521be39a3de7be1.md @@ -45,7 +45,7 @@ assert(document.querySelector('a').getAttribute('target') === '_blank');

                                                                                                                                                                                                                                                                  Cat Photos

                                                                                                                                                                                                                                                                  --fcc-editable-region-- -

                                                                                                                                                                                                                                                                  See more cat photos in our gallery.

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  See more cat photos in our gallery.

                                                                                                                                                                                                                                                                  --fcc-editable-region-- A cute orange cat lying on its back. diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2abbe7d18d49a1e0e1c8.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2abbe7d18d49a1e0e1c8.md index 4294aa6571d..5456c6cdf90 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2abbe7d18d49a1e0e1c8.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2abbe7d18d49a1e0e1c8.md @@ -39,13 +39,15 @@ assert(document.querySelector('h1')?.innerText === 'Nutrition Facts'); --fcc-editable-region-- - - - Nutrition Label - - - + + + Nutrition Label + + + + + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2d4150fe0d4cbd0f2628.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2d4150fe0d4cbd0f2628.md index eb0737c216d..0adb4d3f859 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2d4150fe0d4cbd0f2628.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2d4150fe0d4cbd0f2628.md @@ -43,14 +43,16 @@ assert(document.querySelector('p')?.innerText === '8 servings per container'); --fcc-editable-region-- - - - Nutrition Label - - -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  - + + + Nutrition Label + + + +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  + + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34948891834dd77655a6.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34948891834dd77655a6.md index dbc0c41e577..215263b521f 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34948891834dd77655a6.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34948891834dd77655a6.md @@ -43,15 +43,17 @@ assert(document.querySelectorAll('p')?.[1]?.innerText === 'Serving size 2/3 cup --fcc-editable-region-- - - - Nutrition Label - - -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  - + + + Nutrition Label + + + +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  + + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34ecc1091b4fd5a8a484.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34ecc1091b4fd5a8a484.md index cc46f5c3d13..89fa9e21539 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34ecc1091b4fd5a8a484.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34ecc1091b4fd5a8a484.md @@ -49,16 +49,18 @@ assert(links.find(link => link?.getAttribute('href') === 'https://fonts.googleap --fcc-editable-region-- - - - Nutrition Label - - -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  - + + + Nutrition Label + + + + +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f357957e370510f21ea16.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f357957e370510f21ea16.md index e883da684eb..b6e1ae11bb5 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f357957e370510f21ea16.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f357957e370510f21ea16.md @@ -32,17 +32,19 @@ assert(new __helpers.CSSHelp(document).getStyle('body')?.fontFamily === '"Open S ```html - - - Nutrition Label - - - - -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f378014c2da526a109c81.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f378014c2da526a109c81.md index 224c1559f37..bdd8818f9de 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f378014c2da526a109c81.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f378014c2da526a109c81.md @@ -30,17 +30,19 @@ assert(new __helpers.CSSHelp(document).getStyle('html')?.fontSize === '16px'); ```html - - - Nutrition Label - - - - -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38279e5c3d53692ea441.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38279e5c3d53692ea441.md index 93cef9b4ffb..e32cd61f75a 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38279e5c3d53692ea441.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38279e5c3d53692ea441.md @@ -37,18 +37,20 @@ assert(children?.every(child => child?.parentElement?.classList?.contains('label ```html - - - Nutrition Label - - - + + + + Nutrition Label + + + + --fcc-editable-region-- - -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  - + +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38cabc64e3556f98cc1a.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38cabc64e3556f98cc1a.md index 391cc2a001d..2516766afd4 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38cabc64e3556f98cc1a.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38cabc64e3556f98cc1a.md @@ -32,19 +32,21 @@ assert(new __helpers.CSSHelp(document).getStyle('.label')?.border === '2px solid ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3949f58e12577dcefb00.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3949f58e12577dcefb00.md index be311bec40e..07491d5e4b0 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3949f58e12577dcefb00.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3949f58e12577dcefb00.md @@ -26,19 +26,21 @@ assert(new __helpers.CSSHelp(document).getStyle('.label')?.width === '270px'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f39d7da41b15851fa3fb9.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f39d7da41b15851fa3fb9.md index 49ada7977b8..6a2acfdecee 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f39d7da41b15851fa3fb9.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f39d7da41b15851fa3fb9.md @@ -30,19 +30,21 @@ assert(new __helpers.CSSHelp(document).getStyle('.label')?.padding === '0px 7px' ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3b091162165948e1cb33.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3b091162165948e1cb33.md index ea62867938e..da73b754f5a 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3b091162165948e1cb33.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3b091162165948e1cb33.md @@ -32,19 +32,21 @@ assert(new __helpers.CSSHelp(document).getStyle('*')?.boxSizing === 'border-box' ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3cafd794015aa9547a6d.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3cafd794015aa9547a6d.md index bfd1452731d..9506cc464b3 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3cafd794015aa9547a6d.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3cafd794015aa9547a6d.md @@ -32,19 +32,21 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')?.fontWeight === '800'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3d9e59db4b5b8e960762.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3d9e59db4b5b8e960762.md index cd78fe2b907..d14a6666b26 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3d9e59db4b5b8e960762.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3d9e59db4b5b8e960762.md @@ -24,19 +24,21 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')?.textAlign === 'center'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e1b7233ee5c7595771f.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e1b7233ee5c7595771f.md index aa3246ae525..9f071134677 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e1b7233ee5c7595771f.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e1b7233ee5c7595771f.md @@ -24,19 +24,21 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')?.margin === '-4px 0px'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e4af8008c5d494d3afe.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e4af8008c5d494d3afe.md index 059b9087d39..5addba6061c 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e4af8008c5d494d3afe.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e4af8008c5d494d3afe.md @@ -30,19 +30,21 @@ assert(new __helpers.CSSHelp(document).getStyle('p')?.margin === '0px'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3ed16592445e57941aec.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3ed16592445e57941aec.md index 3ab88ad1fa8..a6677dcb633 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3ed16592445e57941aec.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3ed16592445e57941aec.md @@ -44,21 +44,23 @@ assert(document.querySelector('.divider')?.previousElementSibling?.localName === ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  --fcc-editable-region-- - + ``` diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f405b89a7ec5f8e2d11f4.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f405b89a7ec5f8e2d11f4.md index 26b90fc374a..968b377c4a0 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f405b89a7ec5f8e2d11f4.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f405b89a7ec5f8e2d11f4.md @@ -36,20 +36,22 @@ assert(new __helpers.CSSHelp(document).getStyle('.divider')?.margin === '2px 0px ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f40b01f680e608d360ed4.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f40b01f680e608d360ed4.md index 2a49f161a4d..6df4c6cd33d 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f40b01f680e608d360ed4.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f40b01f680e608d360ed4.md @@ -26,20 +26,22 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')?.letterSpacing === '0.15px ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4172e9eec061d6456221.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4172e9eec061d6456221.md index 50e1e3a4b48..9fe6be16536 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4172e9eec061d6456221.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4172e9eec061d6456221.md @@ -32,22 +32,24 @@ assert(!document.querySelector('p')?.classList?.contains('bold')); ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  --fcc-editable-region-- - + ``` diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f41c979787462e76dab90.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f41c979787462e76dab90.md index 5b419343534..52637bfbb1e 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f41c979787462e76dab90.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f41c979787462e76dab90.md @@ -44,20 +44,22 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f423cf65d5864132a0956.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f423cf65d5864132a0956.md index a00870033f1..4604ebcedcb 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f423cf65d5864132a0956.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f423cf65d5864132a0956.md @@ -24,22 +24,24 @@ assert(document.querySelector('h1')?.classList?.contains('bold')); ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  --fcc-editable-region-- - + ``` diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f42a021625f656101ef93.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f42a021625f656101ef93.md index e2a8c613135..02ee49f9beb 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f42a021625f656101ef93.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f42a021625f656101ef93.md @@ -9,7 +9,7 @@ dashedName: step-22 重要度が同じ要素の水平方向の間隔によって、テキストが読みやすくなります。 -`2/3 cup (55g)` というテキストを `span` 要素で囲み、その `class` 属性を `right` に設定してください。 +Wrap the text `2/3 cup (55g)` in a `span` element. # --hints-- @@ -19,19 +19,13 @@ dashedName: step-22 assert(document.querySelector('span')); ``` -新しい `span` 要素の `class` 属性を `right` に設定する必要があります。 - -```js -assert(document.querySelector('span')?.classList?.contains('right')); -``` - -`span` 要素は `2/3 cup (55g)` というテキストを持つ必要があります。 +Your `span` element should have the text `2/3 cup (55g)`. ```js assert(document.querySelector('span')?.textContent?.trim() === '2/3 cup (55g)'); ``` -`p` 要素は変わらず `Serving size 2/3 cup (55g)` というテキストを持つ必要があります。 +Your `p` element should still have the text `Serving size 2/3 cup (55g)`. ```js assert(document.querySelectorAll('p')?.[1]?.innerText === 'Serving size 2/3 cup (55g)'); @@ -44,22 +38,24 @@ assert(document.querySelectorAll('p')?.[1]?.innerText === 'Serving size 2/3 cup ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  --fcc-editable-region-- - + ``` diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4bfb9de4a16703b56eb6.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4bfb9de4a16703b56eb6.md index 007d300e13f..4858dd412c0 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4bfb9de4a16703b56eb6.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4bfb9de4a16703b56eb6.md @@ -7,22 +7,20 @@ dashedName: step-23 # --description-- -`float` プロパティは、要素をコンテナーの左右に寄せ、他のコンテンツ (テキストなど) が回り込むように配置するために使われます。 - -新しく `.right` セレクターを作成し、`float` プロパティを `right` に設定してください。 +Now we can add the horizontal spacing using `flex`. In your `p` selector, add a `display` property set to `flex` and a `justify-content` property set to `space-between`. # --hints-- -新しく `.right` セレクターを作成する必要があります。 +Your `p` selector should have a `display` property set to `flex`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.right')); +assert(new __helpers.CSSHelp(document).getStyle('p')?.display === 'flex'); ``` -`.right` セレクターの `float` プロパティを `right` に設定する必要があります。 +Your `p` selector should have a `justify-content` property set to `space-between`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.right')?.float === 'right'); +assert(new __helpers.CSSHelp(document).getStyle('p')?.justifyContent === 'space-between'); ``` # --seed-- @@ -32,20 +30,22 @@ assert(new __helpers.CSSHelp(document).getStyle('.right')?.float === 'right'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + ``` @@ -75,9 +75,11 @@ h1 { letter-spacing: 0.15px } +--fcc-editable-region-- p { margin: 0; } +--fcc-editable-region-- .divider { border-bottom: 1px solid #888989; @@ -87,8 +89,4 @@ p { .bold { font-weight: 800; } - ---fcc-editable-region-- - ---fcc-editable-region-- ``` diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ce9d877b668417c0c42.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ce9d877b668417c0c42.md index 81d3e32d29e..f5da5b20541 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ce9d877b668417c0c42.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ce9d877b668417c0c42.md @@ -40,22 +40,24 @@ assert(children?.[3]?.localName === 'p'); ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  --fcc-editable-region-- - + ``` @@ -87,6 +89,8 @@ h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -97,8 +101,4 @@ p { .bold { font-weight: 800; } - -.right { - float: right; -} ``` diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4dde9d72e3694cb9ee3b.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4dde9d72e3694cb9ee3b.md index 4aeb1e0e1ea..51a47cfdff5 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4dde9d72e3694cb9ee3b.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4dde9d72e3694cb9ee3b.md @@ -39,22 +39,24 @@ assert(style?.letterSpacing === '0.15px'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + ``` @@ -88,6 +90,8 @@ h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -98,8 +102,4 @@ p { .bold { font-weight: 800; } - -.right { - float: right; -} ``` diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ec58334106a4170c2a8.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ec58334106a4170c2a8.md index c5d4f2d9010..7a47825713f 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ec58334106a4170c2a8.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ec58334106a4170c2a8.md @@ -7,7 +7,7 @@ dashedName: step-26 # --description-- -`header` 要素の下に新しく `div` 要素を追加して、`class` 属性を `divider lg` に設定してください。 +Create a new `div` element below your `header` element, and give it a `class` attribute set to `divider large`. # --hints-- @@ -23,12 +23,12 @@ assert(document.querySelectorAll('div')?.length === 3); assert(document.querySelector('.label')?.lastElementChild?.localName === 'div'); ``` -新しい `div` 要素の `class` 属性を `divider lg` に設定する必要があります。 +Your new `div` element should have the `class` attribute set to `divider large`. ```js const div = document.querySelector('.label')?.lastElementChild; assert(div?.classList?.contains('divider')); -assert(div?.classList?.contains('lg')); +assert(div?.classList?.contains('large')); ``` # --seed-- @@ -38,25 +38,27 @@ assert(div?.classList?.contains('lg')); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  --fcc-editable-region-- --fcc-editable-region-- -
                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                  + ``` @@ -88,6 +90,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -98,8 +102,4 @@ p { .bold { font-weight: 800; } - -.right { - float: right; -} ``` diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4f9e4a40566b776a8f38.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4f9e4a40566b776a8f38.md index 4114884f24c..e83aed4ebb9 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4f9e4a40566b776a8f38.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4f9e4a40566b776a8f38.md @@ -7,32 +7,32 @@ dashedName: step-27 # --description-- -新しく `.lg` セレクターを作成して、`height` プロパティを `10px` に設定してください。 更に `.lg, .md` セレクターを作成し、`background-color` プロパティを `black` に設定してください。 +Create a new `.large` selector and give it a `height` property set to `10px`. Also create an `.large, .medium` selector and set the `background-color` property to `black`. # --hints-- -新しく `.lg` セレクターが必要です。 +You should have a new `.large` selector. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg')); +assert(new __helpers.CSSHelp(document).getStyle('.large')); ``` -`.lg` セレクターの `height` プロパティを `10px` に設定する必要があります。 +Your `.large` selector should have a `height` property set to `10px`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg')?.height === '10px'); +assert(new __helpers.CSSHelp(document).getStyle('.large')?.height === '10px'); ``` -新しく `.lg, .md` セレクターが必要です。 +You should have a new `.large, .medium` selector. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')); +assert(new __helpers.CSSHelp(document).getStyle('.large, .medium')); ``` -`.lg, .md` セレクターの `background-color` プロパティを `black` に設定する必要があります。 +Your `.large, .medium` selector should have a `background-color` property set to `black`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')?.backgroundColor === 'black'); +assert(new __helpers.CSSHelp(document).getStyle('.large, .medium')?.backgroundColor === 'black'); ``` # --seed-- @@ -42,23 +42,25 @@ assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')?.backgroundColor === ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + ``` @@ -90,6 +92,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -101,10 +105,6 @@ p { font-weight: 800; } -.right { - float: right; -} - --fcc-editable-region-- --fcc-editable-region-- diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f50473cc0196c6dd3892a.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f50473cc0196c6dd3892a.md index 6333476dd52..de7a1cd3c2f 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f50473cc0196c6dd3892a.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f50473cc0196c6dd3892a.md @@ -7,16 +7,16 @@ dashedName: step-28 # --description-- -`.lg` 要素の下端に、まだ細い境界線があることに気が付くかもしれません。 これをリセットするには、`.lg, .md` セレクターの `border` プロパティを `0` に設定してください。 +You may notice there is still a small border at the bottom of your `.large` element. To reset this, give your `.large, .medium` selector a `border` property set to `0`. -注: `md`(medium) クラスは、ステップ 37 で栄養成分表示ラベルの細いバーに利用されます。 +Note: the `medium`(medium) class will be utilized in step 37 for the thinner bars of the nutrition label. # --hints-- -`.lg, .md` セレクターの `border` プロパティを `0` に設定する必要があります。 +Your `.large, .medium` selector should have a `border` property set to `0`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')?.borderWidth === '0px'); +assert(new __helpers.CSSHelp(document).getStyle('.large, .medium')?.borderWidth === '0px'); ``` # --seed-- @@ -26,23 +26,25 @@ assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')?.borderWidth === '0p ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + ``` @@ -74,6 +76,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -85,16 +89,12 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } --fcc-editable-region-- -.lg, .md { +.large, .medium { background-color: black; } --fcc-editable-region-- diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51257a8a516d80b6c743.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51257a8a516d80b6c743.md index 6376a5a05c1..333949a0ed5 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51257a8a516d80b6c743.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51257a8a516d80b6c743.md @@ -7,7 +7,7 @@ dashedName: step-29 # --description-- -`.lg` 要素の下に新しい `div` を作成して、`class` 属性を `calories-info` に設定してください。 +Create a new `div` below your `.large` element and give it a `class` attribute set to `calories-info`. # --hints-- @@ -23,10 +23,10 @@ assert(document.querySelectorAll('div')?.length === 4); assert(document.querySelector('.label')?.lastElementChild?.classList?.contains('calories-info')); ``` -新しい `div` は `.lg` 要素の後に置く必要があります。 +Your new `div` should come after the `.large` element. ```js -assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('lg')); +assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('large')); ``` # --seed-- @@ -36,26 +36,28 @@ assert(document.querySelector('.label')?.lastElementChild?.previousElementSiblin ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  --fcc-editable-region-- --fcc-editable-region-- -
                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                  + ``` @@ -87,6 +89,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -98,15 +102,11 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51e4e5b24a6e80eccce1.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51e4e5b24a6e80eccce1.md index 0a2c999e5c2..dfc7151caf2 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51e4e5b24a6e80eccce1.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51e4e5b24a6e80eccce1.md @@ -7,27 +7,39 @@ dashedName: step-30 # --description-- -`.calories-info` 要素内に `p` 要素を作成してください。 その `p` 要素の `class` 属性を `bold sm-text` に設定し、テキストを `Amount per serving` としてください。 +Within your `.calories-info` element, create a `div` element. Give that `div` element a `class` attribute set to `left-container`. Within the newly created `div` element, create a `h2` element with the text `Amount per serving`. Give the `h2` element a `class` attribute set to `bold small-text`. # --hints-- -`.calories-info` 要素の中に新しい `p` 要素を作成する必要があります。 +You should create a new `div` element within your `.calories-info` element. ```js -assert(document.querySelector('.calories-info')?.children?.[0]?.localName === 'p'); +assert(document.querySelector('.calories-info')?.children?.[0]?.localName === 'div'); ``` -新しい `p` 要素の `class` 属性を `bold sm-text` に設定する必要があります。 +Your new `div` element should have a `class` attribute set to `left-container`. ```js -assert(document.querySelector('.calories-info')?.children?.[0]?.classList.contains('bold')); -assert(document.querySelector('.calories-info')?.children?.[0]?.classList.contains('sm-text')); +assert(document.querySelector('.calories-info')?.children?.[0]?.classList.contains('left-container')); ``` -新しい `p` 要素には `Amount per serving` というテキストが必要です。 +You should create a new `h2` element within your `.left-container` element. ```js -assert(document.querySelector('.calories-info')?.children?.[0]?.innerText === 'Amount per serving'); +assert(document.querySelector('.left-container')?.children?.[0]?.localName === 'h2'); +``` + +Your new `h2` element should have a `class` attribute set to `bold small-text`. + +```js +assert(document.querySelector('.left-container')?.children?.[0]?.classList.contains('bold')); +assert(document.querySelector('.left-container')?.children?.[0]?.classList.contains('small-text')); +``` + +Your new `h2` element should have the text `Amount per serving`. + +```js +assert(document.querySelector('.left-container')?.children?.[0]?.innerText === 'Amount per serving'); ``` # --seed-- @@ -37,28 +49,30 @@ assert(document.querySelector('.calories-info')?.children?.[0]?.innerText === 'A ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  ---fcc-editable-region-- -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  --fcc-editable-region-- +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  - +--fcc-editable-region-- +
                                                                                                                                                                                                                                                                  + ``` @@ -90,6 +104,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -101,15 +117,11 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md index 436eeae8e10..1b282626765 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md @@ -9,20 +9,20 @@ dashedName: step-31 `rem` という単位は `root em` を表し、`html` 要素のフォントサイズに比例します。 -`.sm-text` セレクターを作成し、`font-size` を `0.85rem` に設定してください。この値を計算すると約 `13.6px` になります。(`html` の `font-size` を `16px` に設定したことを思い出してください。) +Create an `.small-text` selector and set the `font-size` to `0.85rem`, which would calculate to be roughly `13.6px` (remember that you set your `html` to have a `font-size` of `16px`). # --hints-- -`.sm-text` セレクターが必要です。 +You should have an `.small-text` selector. ```js -assert(new __helpers.CSSHelp(document).getStyle('.sm-text')); +assert(new __helpers.CSSHelp(document).getStyle('.small-text')); ``` -`.sm-text` セレクターの `font-size` プロパティを `0.85rem` に設定する必要があります。 +Your `.small-text` selector should have a `font-size` property set to `0.85rem`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.sm-text')?.fontSize === '0.85rem'); +assert(new __helpers.CSSHelp(document).getStyle('.small-text')?.fontSize === '0.85rem'); ``` # --seed-- @@ -32,26 +32,30 @@ assert(new __helpers.CSSHelp(document).getStyle('.sm-text')?.fontSize === '0.85r ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                  + ``` @@ -83,6 +87,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -94,15 +100,11 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5486b8fd4b71633f69b0.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5486b8fd4b71633f69b0.md index 0e2b25beca8..55f8a88d67a 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5486b8fd4b71633f69b0.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5486b8fd4b71633f69b0.md @@ -1,51 +1,50 @@ --- id: 615f5486b8fd4b71633f69b0 -title: ステップ 32 +title: Step 33 challengeType: 0 -dashedName: step-32 +dashedName: step-33 --- # --description-- -`.sm-text` 要素の下に新しい `h1` 要素を作成し、テキストを `Calories 230` としてください。 テキストの `230` の部分を `span` 要素で囲み、その `class` を `right` に設定してください。 +Below your `.small-text` element, create a new `p` element with the text `Calories`. Also below the `.left-container` element, create a new `span` element with the text `230`. # --hints-- -`.calories-info` 要素の中に新しい `h1` 要素が必要です。 +You should have a new `p` element within your `.calories-info` element. ```js -assert(document.querySelector('.calories-info')?.querySelector('h1')) +assert(document.querySelector('.calories-info')?.querySelector('p')) ``` -`h1` 要素は `.sm-text` 要素の後に置く必要があります。 +You should have a new `span` element within your `.calories-info` element. ```js -assert(document.querySelector('.sm-text')?.nextElementSibling?.localName === 'h1'); +assert(document.querySelector('.calories-info')?.querySelector('span')) ``` -`h1` 要素のテキストは `Calories 230` にする必要があります。 +Your `p` element should come after your `.small-text` element. ```js -// the float: right property does weird things to the inner text. -assert(document.querySelector('.calories-info')?.lastElementChild?.innerText.match(/Calories[\s|\n]*230/)); +assert(document.querySelector('.small-text')?.nextElementSibling?.localName === 'p'); ``` -新しい `h1` 要素内に `span` 要素を作成する必要があります。 +Your `p` element should have the text `Calories`. ```js -assert(document.querySelector('.calories-info')?.lastElementChild?.querySelector('span')); +assert(document.querySelector('.left-container')?.lastElementChild?.innerText === 'Calories'); ``` -`span` 要素の `class` を `right` に設定する必要があります。 +Your `span` element should come after your `.left-container` element. ```js -assert(document.querySelector('.calories-info')?.lastElementChild?.querySelector('span')?.classList?.contains('right')); +assert(document.querySelector('.left-container')?.nextElementSibling?.localName ==='span'); ``` `span` 要素のテキストは `230` にする必要があります。 ```js -assert(document.querySelector('.calories-info')?.lastElementChild?.querySelector('span')?.innerText === '230'); +assert(document.querySelector('.calories-info')?.lastElementChild?.innerText === '230'); ``` # --seed-- @@ -55,28 +54,32 @@ assert(document.querySelector('.calories-info')?.lastElementChild?.querySelector ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

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

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  ---fcc-editable-region--
                                                                                                                                                                                                                                                                  - +--fcc-editable-region-- +
                                                                                                                                                                                                                                                                  + ``` @@ -108,6 +111,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -119,20 +124,20 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } + +.calories-info h2 { + margin: 0; +} ``` diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f575b50b91e72af079480.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f575b50b91e72af079480.md index a1385cfe46a..14f20ffb784 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f575b50b91e72af079480.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f575b50b91e72af079480.md @@ -1,29 +1,41 @@ --- id: 615f575b50b91e72af079480 -title: ステップ 33 +title: Step 35 challengeType: 0 -dashedName: step-33 +dashedName: step-35 --- # --description-- -新しく `.calories-info h1` セレクターを作成し、上下のマージンを `-5px` に、左右のマージンを `-2px` に設定してください。 +Create a new `.left-container p` selector setting the top and bottom margin to `-5px`, and the left and right margin to `-2px`. Also set the `font-size` to `2em` and `font-weight` to `700`. # --hints-- -新しく `.calories-info h1` セレクターが必要です。 +You should have a new `.left-container p` selector. ```js -assert(new __helpers.CSSHelp(document).getStyle('.calories-info h1')); +assert(new __helpers.CSSHelp(document).getStyle('.left-container p')); ``` -新しい `.calories-info h1` セレクターの `margin` プロパティを `-5px -2px` に設定する必要があります。 +Your new `.left-container p` selector should have a `margin` property set to `-5px -2px`. ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marginTop, '-5px'); -assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marginBottom, '-5px'); -assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marginLeft, '-2px'); -assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marginRight, '-2px'); +assert.equal(new __helpers.CSSHelp(document).getStyle('.left-container p')?.marginTop, '-5px'); +assert.equal(new __helpers.CSSHelp(document).getStyle('.left-container p')?.marginBottom, '-5px'); +assert.equal(new __helpers.CSSHelp(document).getStyle('.left-container p')?.marginLeft, '-2px'); +assert.equal(new __helpers.CSSHelp(document).getStyle('.left-container p')?.marginRight, '-2px'); +``` + +Your new `.left-container p` selector should have a `font-size` property set to `2em`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.left-container p')?.fontSize === '2em'); +``` + +Your new `.left-container p` selector should have a `font-weight` property set to `700`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.left-container p')?.fontWeight === '700'); ``` # --seed-- @@ -33,27 +45,32 @@ assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marg ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                                                  + 230
                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                  + ``` @@ -85,6 +102,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -96,23 +115,29 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + --fcc-editable-region-- --fcc-editable-region-- diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5af373a68e744a3c5a76.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5af373a68e744a3c5a76.md index d2a4d35d7d5..5890430c5d6 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5af373a68e744a3c5a76.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5af373a68e744a3c5a76.md @@ -1,13 +1,13 @@ --- id: 615f5af373a68e744a3c5a76 -title: ステップ 34 +title: Step 36 challengeType: 0 -dashedName: step-34 +dashedName: step-36 --- # --description-- -`.calories-info span` セレクターを作成し、`font-size` を `1.2em` に設定してください。 +Create a `.calories-info span` selector, set its `font-size` to `2.4em` and `font-weight` to `700`. # --hints-- @@ -17,10 +17,16 @@ dashedName: step-34 assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')); ``` -`.calories-info span` セレクターの `font-size` プロパティを `1.2em` に設定する必要があります。 +Your `.calories-info span` selector should have a `font-size` property set to `2.4em`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.fontSize === '1.2em'); +assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.fontSize === '2.4em'); +``` + +Your `.calories-info span` selector should have a `font-weight` property set to `700`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.fontWeight === '700'); ``` # --seed-- @@ -30,27 +36,32 @@ assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.fontSize ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                                                  + 230
                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                  + ``` @@ -82,6 +93,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -93,25 +106,33 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; + font-size: 2em; + font-weight: 700; } --fcc-editable-region-- diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5fd85d0062761f288364.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5fd85d0062761f288364.md index f2f44c0b7b2..d25e7066bef 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5fd85d0062761f288364.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5fd85d0062761f288364.md @@ -1,22 +1,22 @@ --- id: 615f5fd85d0062761f288364 -title: ステップ 36 +title: Step 37 challengeType: 0 -dashedName: step-36 +dashedName: step-37 --- # --description-- タイポグラフィは科学というより芸術のようなものであることも多いです。 正しいと思う見た目になるまで、配置などを微調整しなければならないこともあるでしょう。 -`.calories-info span` セレクターの `margin-top` を `-7px` に設定してください。 これで `230` のテキストが適切な位置に移動されます。 +Give your `.calories-info span` selector a `margin` set to `-7px -2px`. これで `230` のテキストが適切な位置に移動されます。 # --hints-- -`.calories-info span` セレクターの `margin-top` を `-7px` に設定してください。 +Your `.calories-info span` selector should have a `margin` set to `-7px -2px`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.marginTop === '-7px'); +assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.margin === '-7px -2px'); ``` # --seed-- @@ -26,27 +26,32 @@ assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.marginTo ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                                                  + 230
                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                  + ``` @@ -78,6 +83,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -89,31 +96,39 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } --fcc-editable-region-- .calories-info span { - font-size: 1.2em; + font-size: 2.4em; + font-weight: 700; } --fcc-editable-region-- ``` diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f61338c8ca176d6445574.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f61338c8ca176d6445574.md index fb94a6bd218..fff98d5cdd1 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f61338c8ca176d6445574.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f61338c8ca176d6445574.md @@ -1,13 +1,13 @@ --- id: 615f61338c8ca176d6445574 -title: ステップ 37 +title: Step 38 challengeType: 0 -dashedName: step-37 +dashedName: step-38 --- # --description-- -`.calories-info` 要素の下に `div` を追加して `class` 属性を `divider md` に設定してください。 +Below your `.calories-info` element, add a `div` with the `class` attribute set to `divider medium`. # --hints-- @@ -17,11 +17,11 @@ dashedName: step-37 assert(document.querySelectorAll('.label > div')?.length === 3) ``` -新しい `div` の `class` 属性を `divider md` に設定する必要があります。 この div が `.label` 要素内の最後の要素になるようにしてください。 +Your new `div` should have the `class` attribute set to `divider medium`. この div が `.label` 要素内の最後の要素になるようにしてください。 ```js const div = document.querySelector('.label')?.lastElementChild; -assert(div?.classList?.contains('divider') && div?.classList?.contains('md')); +assert(div?.classList?.contains('divider') && div?.classList?.contains('medium')); ``` # --seed-- @@ -31,30 +31,35 @@ assert(div?.classList?.contains('divider') && div?.classList?.contains('md')); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                                                  + 230 +
                                                                                                                                                                                                                                                                  --fcc-editable-region-- --fcc-editable-region-- -
                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                  + ``` @@ -86,6 +91,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -97,30 +104,38 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; } ``` diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f666ac5edea782feb7e75.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f666ac5edea782feb7e75.md index 25a37672aa2..f074a2cf764 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f666ac5edea782feb7e75.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f666ac5edea782feb7e75.md @@ -1,26 +1,26 @@ --- id: 615f666ac5edea782feb7e75 -title: ステップ 38 +title: Step 39 challengeType: 0 -dashedName: step-38 +dashedName: step-39 --- # --description-- -`.md` セレクターを作成し、`height` プロパティを `5px` に設定してください。 +Create an `.medium` selector and give it a `height` property of `5px`. # --hints-- -`.md` セレクターを作成する必要があります。 +You should create an `.medium` selector. ```js -assert(new __helpers.CSSHelp(document).getStyle('.md')); +assert(new __helpers.CSSHelp(document).getStyle('.medium')); ``` -`.md` セレクターの `height` プロパティを `5px` に設定する必要があります。 +Your `.medium` selector should have a `height` property set to `5px`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.md')?.height === '5px'); +assert(new __helpers.CSSHelp(document).getStyle('.medium')?.height === '5px'); ``` # --seed-- @@ -30,28 +30,33 @@ assert(new __helpers.CSSHelp(document).getStyle('.md')?.height === '5px'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  + 230
                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + ``` @@ -83,6 +88,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -94,15 +101,11 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } @@ -111,17 +114,29 @@ p { --fcc-editable-region-- -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; } ``` diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f671b6d1919792745aa5d.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f671b6d1919792745aa5d.md index ea86ad954ea..c94f3fdbe7f 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f671b6d1919792745aa5d.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f671b6d1919792745aa5d.md @@ -1,29 +1,29 @@ --- id: 615f671b6d1919792745aa5d -title: ステップ 39 +title: Step 40 challengeType: 0 -dashedName: step-39 +dashedName: step-40 --- # --description-- -`.md` の要素の下に新しい `div` 要素を作成してください。 その `class` 属性を `daily-value sm-text` に設定してください。 この新しい `div` 内に `p` 要素を追加して、テキストを `% Daily Value *`、`class` 属性を `right bold` に設定してください。 +Create a new `div` element below your `.medium` element. Give it a `class` attribute set to `daily-value small-text`. Within this new `div`, add a `p` element with the text `% Daily Value *`, and set the `class` attribute to `bold right`. # --hints-- -`.md` 要素の後に新しい `div` 要素を作成する必要があります。 +You should create a new `div` element after your `.medium` element. ```js assert(document.querySelector('.label')?.lastElementChild?.localName === 'div'); assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('divider')); -assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('md')); +assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('medium')); ``` -新しい `div` の `class` 属性を `daily-value sm-text` に設定する必要があります。 +Your new `div` should have a `class` attribute set to `daily-value small-text`. ```js assert(document.querySelector('.label')?.lastElementChild?.classList?.contains('daily-value')); -assert(document.querySelector('.label')?.lastElementChild?.classList?.contains('sm-text')); +assert(document.querySelector('.label')?.lastElementChild?.classList?.contains('small-text')); ``` 新しい `div` 要素内に `p` 要素が 1 つ必要です。 @@ -38,11 +38,11 @@ assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.lo assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.textContent === '% Daily Value *'); ``` -新しい `p` 要素の `class` 属性を `right bold` に設定する必要があります。 +Your new `p` element should have a `class` attribute set to `bold right`. ```js -assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.classList?.contains('right')); assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.classList?.contains('right')); ``` # --seed-- @@ -52,32 +52,36 @@ assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.cl ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  ---fcc-editable-region-- ---fcc-editable-region-- + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                                                  + 230
                                                                                                                                                                                                                                                                  - + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                  + + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                  + ``` @@ -109,6 +113,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -120,34 +126,42 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; } ``` diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6823d0815b7a991f2a75.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6823d0815b7a991f2a75.md index 8919c005946..a370733f842 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6823d0815b7a991f2a75.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6823d0815b7a991f2a75.md @@ -1,32 +1,32 @@ --- id: 615f6823d0815b7a991f2a75 -title: ステップ 40 +title: Step 42 challengeType: 0 -dashedName: step-40 +dashedName: step-42 --- # --description-- -`float` のスタイルがあるために、新しい `p` 要素がラベルの境界線の外に出てしまいます。 既存の `.divider` 要素を参考にして、`p` 要素の後に新しい仕切り線を追加してください。 +Use your existing `.divider` element as an example to add a new divider after the `p` element. # --hints-- -`.daily-value.sm-text` 要素の中に新しい `div` 要素を作成する必要があります。 +You should create a new `div` within your `.daily-value` element. ```js -assert(document.querySelectorAll('.daily-value.sm-text > div')?.length === 1) +assert(document.querySelectorAll('.daily-value.small-text > div')?.length === 1) ``` 新しい `div` の `class` 属性を `divider` に設定する必要があります。 ```js -assert(document.querySelector('.daily-value.sm-text > div')?.classList?.contains('divider')) +assert(document.querySelector('.daily-value.small-text > div')?.classList?.contains('divider')) ``` 新しい `div` は `p` 要素の後に置く必要があります。 ```js -assert(document.querySelector('.daily-value.sm-text > div')?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text > div')?.previousElementSibling?.localName === 'p'); ``` # --seed-- @@ -36,34 +36,38 @@ assert(document.querySelector('.daily-value.sm-text > div')?.previousElementSibl ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                  + ``` @@ -95,6 +99,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -106,34 +112,46 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } ``` diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6b2d164f81809efd9bdc.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6b2d164f81809efd9bdc.md index 22c4aeddcd4..b9bf725708b 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6b2d164f81809efd9bdc.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6b2d164f81809efd9bdc.md @@ -1,56 +1,62 @@ --- id: 615f6b2d164f81809efd9bdc -title: ステップ 42 +title: Step 43 challengeType: 0 -dashedName: step-42 +dashedName: step-43 --- # --description-- -最後の `.divider` 要素の下に、`p` 要素を作成してテキストを `Total Fat 8g 10%` にしてください。 `Total Fat` の部分を `span` 要素で囲み、`class` を `bold` に設定してください。 また `10%` の部分を別の `span` 要素で囲み、`class` を `bold right` に設定してください。 +最後の `.divider` 要素の下に、`p` 要素を作成してテキストを `Total Fat 8g 10%` にしてください。 `Total Fat` の部分を `span` 要素で囲み、`class` を `bold` に設定してください。 Wrap `10%` in another `span` element with the `class` set to `bold`. Also wrap the words `Total Fat 8g` in an additional `span` element for alignment. # --hints-- `.daily-value` 要素の最後に新しい `p` 要素を作成する必要があります。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` 新しい `p` 要素は `Total Fat 8g 10%` というテキストを持つ必要があります。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Total Fat 8g[\s|\n]+10%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Total Fat[\s|\n]+8g[\s|\n]+10%/)); ``` -`p` 要素内に `span` 要素が 2 つ必要です。 +Your `p` element should have three `span` elements. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 2); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 3); ``` -1 つ目の `span` 要素は `Total Fat` というテキストを囲む必要があります。 +One `span` element should wrap the text `Total Fat`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.innerText === 'Total Fat'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span > span')?.innerText === 'Total Fat'); ``` -1 つ目の `span` 要素の `class` を `bold` に設定する必要があります。 +The `span` element around `Total Fat` should have the `class` set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.className === 'bold'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span > span')?.className === 'bold'); ``` -2 つ目の `span` 要素は `10%` というテキストを囲む必要があります。 +A `span` element should wrap the text `10%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.[1]?.innerText === '10%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span + span')?.innerText === '10%'); ``` -2 つ目の `span` 要素の `class` を `bold right` に設定する必要があります。 +The `span` element around `10%` should have the `class` set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.[1]?.className === 'bold right'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.[1]?.className === 'bold'); +``` + +A `span` element should have the text `Total Fat 8g`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Total Fat[\s|\n]+8g/)); ``` # --seed-- @@ -60,35 +66,39 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySe ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  ---fcc-editable-region-- ---fcc-editable-region-- + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                  + ``` @@ -120,46 +130,59 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } ``` diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6cc778f7698258467596.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6cc778f7698258467596.md index fc81c0c0ca6..2ad5d4bdefb 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6cc778f7698258467596.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6cc778f7698258467596.md @@ -1,46 +1,45 @@ --- id: 615f6cc778f7698258467596 -title: ステップ 43 +title: Step 44 challengeType: 0 -dashedName: step-43 +dashedName: step-44 --- # --description-- -`Total Fat` のテキストを持つ要素の下に、新しい `p` 要素を作成し、テキストを `Saturated Fat 1g 5%` としてください。 `5%` の部分を `span` 要素で囲み、`class` 属性を `bold right` に設定してください。 +`Total Fat` のテキストを持つ要素の下に、新しい `p` 要素を作成し、テキストを `Saturated Fat 1g 5%` としてください。 Wrap the `5%` in a `span` with the `class` attribute set to `bold`. In this case this is enough to align the percentage to `5%`. # --hints-- `Total Fat` のテキストを持つ要素の下に新しい `p` 要素を作成する必要があります。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.innerText.match(/Total Fat 8g\s*10%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.innerText.match(/Total Fat 8g\s*10%/)); ``` 新しい `p` 要素は `Saturated Fat 1g 5%` というテキストを持つ必要があります。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText.match(/Saturated Fat 1g\s*5%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText.match(/Saturated Fat 1g\s*5%/)); ``` 新しい `p` 要素内に `span` 要素が 1 つ必要です。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.localName === 'span'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.localName === 'span'); ``` -`span` 要素の `class` 属性を `bold right` に設定する必要があります。 +Your `span` element should have the `class` attribute set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); ``` `span` 要素は `5%` というテキストを囲む必要があります。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.innerText === "5%"); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === "5%"); ``` # --seed-- @@ -50,36 +49,40 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastEle ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                                                  ---fcc-editable-region-- ---fcc-editable-region-- + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                  + ``` @@ -111,46 +114,59 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } ``` diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6fddaac1e083502d3e6a.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6fddaac1e083502d3e6a.md index 8e3b151a8c4..b46fc893502 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6fddaac1e083502d3e6a.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6fddaac1e083502d3e6a.md @@ -1,8 +1,8 @@ --- id: 615f6fddaac1e083502d3e6a -title: ステップ 44 +title: Step 45 challengeType: 0 -dashedName: step-44 +dashedName: step-45 --- # --description-- @@ -14,7 +14,7 @@ dashedName: step-44 `Saturated Fat 1g 5%` のテキストを持つ `p` 要素の `class` 属性を `indent` に設定する必要があります。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('indent')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('indent')); ``` # --seed-- @@ -24,36 +24,41 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                                                  ---fcc-editable-region-- -

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                  + ``` @@ -85,46 +90,59 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } ``` diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f70077a4ff98424236c1e.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f70077a4ff98424236c1e.md index b2af981dec2..c6a234111c4 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f70077a4ff98424236c1e.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f70077a4ff98424236c1e.md @@ -1,8 +1,8 @@ --- id: 615f70077a4ff98424236c1e -title: ステップ 45 +title: Step 46 challengeType: 0 -dashedName: step-45 +dashedName: step-46 --- # --description-- @@ -30,34 +30,39 @@ assert(new __helpers.CSSHelp(document).getStyle('.indent')?.marginLeft === '1em' ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                                                  + 230
                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + ``` @@ -89,47 +94,60 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } --fcc-editable-region-- diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f72a872354a850d4f533e.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f72a872354a850d4f533e.md index a271aeeada9..6d04498ff19 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f72a872354a850d4f533e.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f72a872354a850d4f533e.md @@ -1,8 +1,8 @@ --- id: 615f72a872354a850d4f533e -title: ステップ 46 +title: Step 47 challengeType: 0 -dashedName: step-46 +dashedName: step-47 --- # --description-- @@ -30,34 +30,39 @@ assert(new __helpers.CSSHelp(document).getStyle('.daily-value p')?.borderBottom ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                                                  + 230
                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + ``` @@ -89,47 +94,60 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f74a71f1e498619e38ee8.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f74a71f1e498619e38ee8.md index 380964e995e..474a34332b7 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f74a71f1e498619e38ee8.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f74a71f1e498619e38ee8.md @@ -1,8 +1,8 @@ --- id: 615f74a71f1e498619e38ee8 -title: ステップ 47 +title: Step 48 challengeType: 0 -dashedName: step-47 +dashedName: step-48 --- # --description-- @@ -14,16 +14,15 @@ dashedName: step-47 `% Daily Value *` のテキストを持つ `p` 要素の `class` 属性に `no-divider` が追加される必要があります。 既存のクラスは削除しないでください。 ```js -const p = document.querySelector('.daily-value.sm-text')?.firstElementChild; +const p = document.querySelector('.daily-value.small-text')?.firstElementChild; assert(p?.classList?.contains('no-divider')); assert(p?.classList?.contains('bold')); -assert(p?.classList?.contains('right')); ``` `Saturated Fat 1g 5%` のテキストを持つ `p` 要素の `class` 属性に `no-divider` が追加される必要があります。 既存のクラスは削除しないでください。 ```js -const p = document.querySelector('.daily-value.sm-text')?.lastElementChild; +const p = document.querySelector('.daily-value.small-text')?.lastElementChild; assert(p?.classList?.contains('no-divider')); assert(p?.classList?.contains('indent')); ``` @@ -35,36 +34,41 @@ assert(p?.classList?.contains('indent')); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

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

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                  + ``` @@ -96,47 +100,60 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ad94380408d971d14f6.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ad94380408d971d14f6.md index 97a8484dcd2..0f115024cab 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ad94380408d971d14f6.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ad94380408d971d14f6.md @@ -1,8 +1,8 @@ --- id: 615f7ad94380408d971d14f6 -title: ステップ 48 +title: Step 49 challengeType: 0 -dashedName: step-48 +dashedName: step-49 --- # --description-- @@ -44,37 +44,43 @@ assert(style?.borderBottom === '1px solid rgb(136, 137, 137)'); ## --seed-contents-- + ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                                                  + 230
                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + ``` @@ -106,47 +112,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7bc680f7168ea01ebf99.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7bc680f7168ea01ebf99.md index f8f0be20f41..b3325a412ca 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7bc680f7168ea01ebf99.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7bc680f7168ea01ebf99.md @@ -1,8 +1,8 @@ --- id: 615f7bc680f7168ea01ebf99 -title: ステップ 49 +title: Step 50 challengeType: 0 -dashedName: step-49 +dashedName: step-50 --- # --description-- @@ -13,16 +13,16 @@ dashedName: step-49 # --hints-- -`.daily-value.sm-text` 要素の最後に新しい `div` を作成する必要があります。 +You should create a new `div` at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` 新しい `div` の `class` 属性を `divider` に設定する必要があります。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -32,36 +32,41 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                  + ``` @@ -93,47 +98,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7c71eab8218f846e4503.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7c71eab8218f846e4503.md index 712b2731ee5..2e1482b5094 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7c71eab8218f846e4503.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7c71eab8218f846e4503.md @@ -1,32 +1,32 @@ --- id: 615f7c71eab8218f846e4503 -title: ステップ 50 +title: Step 51 challengeType: 0 -dashedName: step-50 +dashedName: step-51 --- # --description-- -最後の `.divider` の後に `p` 要素をもう 1 つ作成し、テキストを `Trans Fat 0g` にしてください。 `Trans` という単語を `i` 要素で囲んでイタリック体にしてください。 新しい `p` 要素の `class` 属性は `indent no-divider` に設定してください。 +最後の `.divider` の後に `p` 要素をもう 1 つ作成し、テキストを `Trans Fat 0g` にしてください。 `Trans` という単語を `i` 要素で囲んでイタリック体にしてください。 新しい `p` 要素の `class` 属性は `indent no-divider` に設定してください。 Wrap `Trans Fat 0g` in a `span` element for alignment. # --hints-- -`.daily-value.sm-text` 要素の最後に新しい `p` 要素を作成する必要があります。 +You should create a new `p` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` 新しい `p` 要素は `Trans Fat 0g` というテキストを持つ必要があります。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText === 'Trans Fat 0g'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText === 'Trans Fat 0g'); ``` 新しい `p` 要素の `class` 属性を `indent no-divider` に設定する必要があります。 ```js -const p = document.querySelector('.daily-value.sm-text')?.lastElementChild; +const p = document.querySelector('.daily-value.small-text')?.lastElementChild; assert(p?.classList?.contains('indent')); assert(p?.classList?.contains('no-divider')); ``` @@ -34,13 +34,25 @@ assert(p?.classList?.contains('no-divider')); 新しい `p` 要素内に `i` 要素が 1 つ必要です。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.localName === 'i'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('i')); ``` `i` 要素は `Trans` というテキストを囲む必要があります。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.innerText === 'Trans'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('i')?.innerText === 'Trans'); +``` + +Your new `p` element should have a `span` element. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span')); +``` + +Your `span` element should wrap the text `Trans Fat 0g`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span')?.innerText?.match(/Trans[\s|\n]+Fat 0g/)); ``` # --seed-- @@ -50,37 +62,42 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstEl ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                  + ``` @@ -112,47 +129,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7d489a581590d1350288.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7d489a581590d1350288.md index 02c17be2638..6064bd85238 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7d489a581590d1350288.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7d489a581590d1350288.md @@ -1,8 +1,8 @@ --- id: 615f7d489a581590d1350288 -title: ステップ 51 +title: Step 52 challengeType: 0 -dashedName: step-51 +dashedName: step-52 --- # --description-- @@ -11,16 +11,16 @@ dashedName: step-51 # --hints-- -`.daily-value.sm-text` 要素の最後に新しい `div` 要素を作成する必要があります。 +You should create a new `div` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` 新しい `div` 要素の `class` 属性を `divider` に設定する必要があります。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -30,38 +30,43 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                  + ``` @@ -93,47 +98,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7de4487b64919bb4aa5e.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7de4487b64919bb4aa5e.md index f887d5865b0..70634d29bc8 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7de4487b64919bb4aa5e.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7de4487b64919bb4aa5e.md @@ -1,57 +1,62 @@ --- id: 615f7de4487b64919bb4aa5e -title: ステップ 52 +title: Step 53 challengeType: 0 -dashedName: step-52 +dashedName: step-53 --- # --description-- -最後の `.divider` の後に新しい `p` 要素を作成し、テキストを `Cholesterol 0mg 0%` にしてください。 `Cholesterol` というテキストを `span` 要素で囲み、その `span` 要素の `class` 属性を `bold` に設定してください。 また `0%` のテキストを別の `span` 要素で囲み、`class` を `bold right` に設定してください。 +最後の `.divider` の後に新しい `p` 要素を作成し、テキストを `Cholesterol 0mg 0%` にしてください。 `Cholesterol` というテキストを `span` 要素で囲み、その `span` 要素の `class` 属性を `bold` に設定してください。 Wrap the text `0%` in another `span` element, with the `class` set to `bold`. Also wrap `Cholesterol 0mg` in an additional `span` element for the alignment. # --hints-- -`.daily-value.sm-text` 要素の最後に新しい `p` 要素を作成する必要があります。 +You should create a new `p` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` 新しい `p` 要素は `Cholesterol 0mg 0%` というテキストを持つ必要があります。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Cholesterol 0mg[\s|\n]+0%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Cholesterol[\s|\n]+0mg[\s|\n]+0%/)); ``` -新しい `p` 要素内に `span` 要素が 2 つ必要です。 +Your new `p` element should have three `span` elements. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 2); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 3); ``` -1 つ目の `span` 要素の `class` 属性を `bold` に設定する必要があります。 +Your first `span` `Cholesterol` element should have the `class` attribute set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.classList?.contains('bold')); ``` -1 つ目の `span` 要素は `Cholesterol` というテキストを囲む必要があります。 +Your first `span` element should wrap the text `Cholesterol 0mg`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.innerText === 'Cholesterol'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.innerText?.match(/Cholesterol[\s|\n]+0mg/)); ``` -2 つ目の `span` 要素の `class` 属性を `bold right` に設定する必要があります。 +Your first `span` element should wrap the text `Cholesterol`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.innerText === 'Cholesterol'); ``` -2 つ目の `span` 要素は `0%` というテキストを囲む必要があります。 +Your second `span` element should have the `class` attribute set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.innerText === '0%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); +``` + +Your second `span` element should wrap the text `0%`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === '0%'); ``` # --seed-- @@ -61,39 +66,44 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastEle ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                  + ``` @@ -125,47 +135,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7e7281626a92bbd62da8.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7e7281626a92bbd62da8.md index 3a9ec854ba0..d3766dd4b25 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7e7281626a92bbd62da8.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7e7281626a92bbd62da8.md @@ -1,57 +1,62 @@ --- id: 615f7e7281626a92bbd62da8 -title: ステップ 53 +title: Step 54 challengeType: 0 -dashedName: step-53 +dashedName: step-54 --- # --description-- -最後の `p` 要素の下に `p` 要素をもう 1 つ作成し、テキストを `Sodium 160mg 7%` にしてください。 `Sodium` というテキストを `span` 要素で囲み、その `class` 属性を `bold` に設定してください。 また `7%` というテキストを別の `span` 要素で囲み、`class` を `bold right` に設定してください。 +最後の `p` 要素の下に `p` 要素をもう 1 つ作成し、テキストを `Sodium 160mg 7%` にしてください。 `Sodium` というテキストを `span` 要素で囲み、その `class` 属性を `bold` に設定してください。 Wrap the `7%` text in another `span` element with the `class` set to `bold`. Also add an additional `span` element around `Sodium 160mg` for aligning it correctly. # --hints-- -`.daily-value.sm-text` 要素の最後に新しい `p` 要素を作成する必要があります。 +You should create a new `p` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` 新しい `p` 要素は `Sodium 160mg 7%` というテキストを持つ必要があります。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Sodium 160mg[\s|\n]+7%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Sodium[\s|\n]160mg[\s|\n]+7%/)); ``` -新しい `p` 要素内に `span` 要素が 2 つ必要です。 +Your new `p` element should have three `span` elements. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 2); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 3); ``` -1 つ目の `span` 要素の `class` 属性を `bold` に設定する必要があります。 +A `span` element should wrap the text `Sodium 360mg`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.innerText?.match(/Sodium[\s|\n]160mg/)); ``` -1 つ目の `span` 要素は `Sodium` というテキストを囲む必要があります。 +A `span` element should wrap the text `Sodium`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.innerText === 'Sodium'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.innerText === "Sodium"); ``` -2 つ目の `span` 要素の `class` 属性を `bold right` に設定する必要があります。 +The `span` around `Sodium` should have the `class` attribute set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.classList?.contains('bold')); ``` -2 つ目の `span` 要素は `7%` というテキストを囲む必要があります。 +A `span` element should wrap the text `7%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.innerText === '7%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === '7%'); +``` + +The `span` element around `7%` should have the `class` attribute set to `bold`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); ``` # --seed-- @@ -61,40 +66,45 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastEle ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                  + ``` @@ -126,47 +136,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ecb09de9a938ef94756.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ecb09de9a938ef94756.md index f649cf4641d..b44b2bab3d6 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ecb09de9a938ef94756.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ecb09de9a938ef94756.md @@ -1,57 +1,68 @@ --- id: 615f7ecb09de9a938ef94756 -title: ステップ 54 +title: Step 55 challengeType: 0 -dashedName: step-54 +dashedName: step-55 --- # --description-- -もう 1 つ `p` 要素を追加して、テキストを `Total Carbohydrate 37g 13%` としてください。 先ほどと同様に、`span` 要素を使用して `Total Carbohydrate` というテキストを太字に、`13%` というテキストは太字かつ右揃えにしてください。 +もう 1 つ `p` 要素を追加して、テキストを `Total Carbohydrate 37g 13%` としてください。 Like before, use `span` elements to make the text `Total Carbohydrate` and `13%` bold. Also add an additional `span` element to wrap the `Total Carbohydrate 37g` text in a span element so to have it aligned to the left, and `13%` to the right. # --hints-- -`.daily-value.sm-text` 要素の最後に新しい `p` 要素を作成する必要があります。 +You should create a new `p` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` 新しい `p` 要素は `Total Carbohydrate 37g 13%` というテキストを持つ必要があります。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Total Carbohydrate 37g[\s|\n]+13%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Total Carbohydrate[\s|\n]+37g[\s|\n]+13%/)); ``` -新しい `p` 要素内に `span` 要素が 2 つ必要です。 +Your new `p` element should have three `span` elements. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 2); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 3); ``` -1 つ目の `span` 要素の `class` 属性を `bold` に設定する必要があります。 +One `span` element should wrap the text `Total Carbohydrate 37g`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.innerText?.match(/Total Carbohydrate[\s|\n]+37g/)); ``` -1 つ目の `span` 要素は `Total Carbohydrate` というテキストを囲む必要があります。 +One `span` element should wrap the text `Total Carbohydrate`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.innerText === 'Total Carbohydrate'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.innerText === 'Total Carbohydrate'); ``` -2 つ目の `span` 要素の `class` 属性を `bold right` に設定する必要があります。 +The `span` element around `Total Carbohydrate` should have the `class` attribute set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.classList?.contains('bold')); ``` -2 つ目の `span` 要素は `13%` というテキストを囲む必要があります。 +A `span` element should wrap the text `13%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.innerText === '13%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === '13%'); +``` + +The `span` element around `13%` should have the `class` attribute set to `bold`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); +``` + +Your second `span` element should wrap the text `13%`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === '13%'); ``` # --seed-- @@ -61,41 +72,46 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastEle ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                  + ``` @@ -127,47 +143,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7fa959ab75948f96a0d6.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7fa959ab75948f96a0d6.md index fd68e93184f..f14488b2cda 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7fa959ab75948f96a0d6.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7fa959ab75948f96a0d6.md @@ -1,8 +1,8 @@ --- id: 615f7fa959ab75948f96a0d6 -title: ステップ 55 +title: Step 56 challengeType: 0 -dashedName: step-55 +dashedName: step-56 --- # --description-- @@ -11,30 +11,30 @@ dashedName: step-55 # --hints-- -`.daily-value.sm-text` 要素の最後に新しい `p` 要素と `div` 要素を作成する必要があります。 +You should create a new `p` and `div` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` 新しい `p` 要素は `Dietary Fiber 4g` というテキストを持つ必要があります。 ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.innerText.match(/Dietary Fiber[\s|\n]+4g/)); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.innerText.match(/Dietary Fiber[\s|\n]+4g/)); ``` 新しい `p` 要素の `class` 属性を `indent no-divider` に設定する必要があります。 ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('indent')); -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('indent')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('no-divider')); ``` 新しい `div` の `class` 属性を `divider` に設定する必要があります。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -44,42 +44,47 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                  + ``` @@ -111,47 +116,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f808d85793195b0f53be9.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f808d85793195b0f53be9.md index 01980d83a1d..6055bedfdff 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f808d85793195b0f53be9.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f808d85793195b0f53be9.md @@ -1,8 +1,8 @@ --- id: 615f808d85793195b0f53be9 -title: ステップ 56 +title: Step 57 challengeType: 0 -dashedName: step-56 +dashedName: step-57 --- # --description-- @@ -11,30 +11,30 @@ dashedName: step-56 # --hints-- -`.daily-value.sm-text` 要素の最後に新しい `p` 要素と `div` 要素を作成する必要があります。 +You should create a new `p` and `div` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` 新しい `p` 要素は `Total Sugars 12g` というテキストを持つ必要があります。 ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.innerText.match(/Total Sugars[\s|\n]+12g/)); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.innerText.match(/Total Sugars[\s|\n]+12g/)); ``` 新しい `p` 要素の `class` 属性を `indent no-divider` に設定する必要があります。 ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('indent')); -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('indent')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('no-divider')); ``` 新しい `div` の `class` 属性を `divider` に設定する必要があります。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -44,44 +44,49 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                  + ``` @@ -113,47 +118,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f829d07b18f96f6f6684b.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f829d07b18f96f6f6684b.md index 40d988d0866..74616c5e547 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f829d07b18f96f6f6684b.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f829d07b18f96f6f6684b.md @@ -1,21 +1,21 @@ --- id: 615f829d07b18f96f6f6684b -title: ステップ 57 +title: Step 58 challengeType: 0 -dashedName: step-57 +dashedName: step-58 --- # --description-- -これらの仕切り線を作成する利点は、特有のクラスを適用して個別にスタイルを指定できることです。 最後の `.divider` の `class` に `dbl-indent` (double indent、2 倍のインデントの略) を追加してください。 +これらの仕切り線を作成する利点は、特有のクラスを適用して個別にスタイルを指定できることです。 Add `double-indent` to the `class` for your last `.divider`. # --hints-- -最後の `.divider` 要素の `class` に `dbl-indent` を追加する必要があります。 既存の値は削除しないでください。 +Your last `.divider` element should have `double-indent` added to the `class`. 既存の値は削除しないでください。 ```js -const last = document.querySelector('.daily-value.sm-text')?.lastElementChild; -assert(last?.classList?.contains('dbl-indent')); +const last = document.querySelector('.daily-value.small-text')?.lastElementChild; +assert(last?.classList?.contains('double-indent')); assert(last?.classList?.contains('divider')); ``` @@ -26,46 +26,51 @@ assert(last?.classList?.contains('divider')); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                                                  + 230
                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + ``` @@ -97,47 +102,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f83ef928ec9982b785b6a.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f83ef928ec9982b785b6a.md index f7b8b3ae6f5..370fd147adf 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f83ef928ec9982b785b6a.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f83ef928ec9982b785b6a.md @@ -1,26 +1,26 @@ --- id: 615f83ef928ec9982b785b6a -title: ステップ 58 +title: Step 59 challengeType: 0 -dashedName: step-58 +dashedName: step-59 --- # --description-- -`.dbl-indent` セレクターを作成して、左側のマージンを `2em` に設定してください。 +Create a `.double-indent` selector and give it a left margin of `2em`. # --hints-- -新しく `.dbl-indent` セレクターが必要です。 +You should have a new `.double-indent` selector. ```js -assert(new __helpers.CSSHelp(document).getStyle('.dbl-indent')); +assert(new __helpers.CSSHelp(document).getStyle('.double-indent')); ``` -`.dbl-indent` セレクターの `margin-left` プロパティを `2em` に設定する必要があります。 +Your `.double-indent` selector should have a `margin-left` property set to `2em`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.dbl-indent')?.marginLeft === '2em'); +assert(new __helpers.CSSHelp(document).getStyle('.double-indent')?.marginLeft === '2em'); ``` # --seed-- @@ -30,44 +30,49 @@ assert(new __helpers.CSSHelp(document).getStyle('.dbl-indent')?.marginLeft === ' ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                                                  + 230
                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + ``` @@ -99,56 +104,70 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } ---fcc-editable-region-- +--fcc-editable-region-- ---fcc-editable-region-- +--fcc-editable-region-- .daily-value p:not(.no-divider) { border-bottom: 1px solid #888989; diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f84f246e8ba98e3cd97be.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f84f246e8ba98e3cd97be.md index 9695019deb8..182e3bb3101 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f84f246e8ba98e3cd97be.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f84f246e8ba98e3cd97be.md @@ -1,61 +1,60 @@ --- id: 615f84f246e8ba98e3cd97be -title: ステップ 59 +title: Step 60 challengeType: 0 -dashedName: step-59 +dashedName: step-60 --- # --description-- -`.dbl-indent` 要素の下に新しい `p` 要素を作成し、テキストを `Includes 10g Added Sugars 20%` としてください。 新しい `p` 要素も、2 倍インデントされ、下端の境界線がないようにしてください。 また `span` を使用して `20%` の部分を太字かつ右揃えにしてください。 +Below your `.double-indent` element, add a new `p` element with the text `Includes 10g Added Sugars 20%`. 新しい `p` 要素も、2 倍インデントされ、下端の境界線がないようにしてください。 また `span` を使用して `20%` の部分を太字かつ右揃えにしてください。 そして、`p` 要素の後に仕切り線をもう 1 つ作成してください。 # --hints-- -`.daily-value.sm-text` 要素の最後に新しい `p` 要素と `div` 要素を作成する必要があります。 +You should create a new `p` and `div` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` 新しい `p` 要素は `Includes 10g Added Sugars 20%` というテキストを持つ必要があります。 ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.innerText.match(/Includes 10g Added Sugars[\s|\n]+20%/)); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.innerText.match(/Includes 10g Added Sugars[\s|\n]+20%/)); ``` -新しい `p` 要素の `class` 属性を `dbl-indent no-divider` に設定する必要があります。 +Your new `p` element should have the `class` attribute set to `double-indent no-divider`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('dbl-indent')); -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('double-indent')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('no-divider')); ``` 新しい `p` 要素内に `span` 要素が 1 つ必要です。 ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.firstElementChild?.localName === 'span'); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.firstElementChild?.localName === 'span'); ``` -`span` 要素の `class` 属性を `bold right` に設定する必要があります。 +Your `span` element should have the `class` attribute set to `bold`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.firstElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.firstElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.firstElementChild?.classList?.contains('bold')); ``` `span` 要素は `20%` というテキストを囲む必要があります。 ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type span')?.innerText === '20%'); +assert(document.querySelector('.daily-value.small-text p:last-of-type span')?.innerText === '20%'); ``` 新しい `div` の `class` 属性を `divider` に設定する必要があります。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -65,46 +64,51 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                  + ``` @@ -136,54 +140,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f887466db4ba14b5342cc.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f887466db4ba14b5342cc.md index d77aea6bbdf..0e579efc73e 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f887466db4ba14b5342cc.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f887466db4ba14b5342cc.md @@ -1,8 +1,8 @@ --- id: 615f887466db4ba14b5342cc -title: ステップ 60 +title: Step 61 challengeType: 0 -dashedName: step-60 +dashedName: step-61 --- # --description-- @@ -13,30 +13,30 @@ dashedName: step-60 # --hints-- -`.daily-value.sm-text` 要素の最後に新しい `p` 要素と `div` 要素を作成する必要があります。 +You should create a new `p` and `div` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` 新しい `p` 要素は `Protein 3g` というテキストを持つ必要があります。 ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.innerText.match(/Protein[\s|\n]+3g/)); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.innerText.match(/Protein[\s|\n]+3g/)); ``` 新しい `p` 要素の `class` 属性を `no-divider` に設定する必要があります。 ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('no-divider')); ``` -新しい `div` の `class` 属性を `divider lg` に設定する必要があります。 +Your new `div` should have the `class` attribute set to `divider large`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('lg')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('large')); ``` # --seed-- @@ -46,48 +46,53 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                  + ``` @@ -119,54 +124,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f89e055040ba294719d2f.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f89e055040ba294719d2f.md index 13bbd5e8dde..82047e405eb 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f89e055040ba294719d2f.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f89e055040ba294719d2f.md @@ -1,39 +1,40 @@ --- id: 615f89e055040ba294719d2f -title: ステップ 61 +title: Step 62 challengeType: 0 -dashedName: step-61 +dashedName: step-62 --- # --description-- -太い仕切り線の下に `p` をもう 1 つ作成してください。 `p` 要素のテキストは `Vitamin D 2mcg 10%` としてください。 また、`span` を使用して `10%` の部分を右揃えにしますが、太字にはしないでください。 +太い仕切り線の下に `p` をもう 1 つ作成してください。 `p` 要素のテキストは `Vitamin D 2mcg 10%` としてください。 + +The `p` element contains only text, you can wrap the percentage in a `span` element so that it is considered a separate entity from the rest of the text, and it's moved to the right. # --hints-- -`.daily-value.sm-text` 要素の最後に新しい `p` 要素を作成する必要があります。 +You should create a new `p` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` -新しい `p` 要素は `Vitamin D 2mcg 10%` というテキストを持つ必要があります。 +Your new `p` element should have the text `Vitamin D 2mcg 10%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Vitamin D 2mcg[\s|\n]+10%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Vitamin D 2mcg[\s|\n]+10%/)); ``` -新しい `p` 要素内に `span` 要素が 1 つ必要です。 +Your new `p` element should have a `span` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 1); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 1); ``` -`span` 要素の `class` を `right` に設定する必要があります。 太字にはしないよう注意してください。 +Your `span` element should not be bold. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.classList?.contains('right')); -assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.classList?.contains('bold')); +assert(!document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span')?.classList?.contains('bold')); ``` # --seed-- @@ -43,50 +44,55 @@ assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.queryS ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                  + ``` @@ -118,54 +124,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8bfe0f30a1a3c340356b.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8bfe0f30a1a3c340356b.md index 43a802305f3..80e5153eb3f 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8bfe0f30a1a3c340356b.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8bfe0f30a1a3c340356b.md @@ -1,8 +1,8 @@ --- id: 615f8bfe0f30a1a3c340356b -title: ステップ 62 +title: Step 63 challengeType: 0 -dashedName: step-62 +dashedName: step-63 --- # --description-- @@ -11,55 +11,53 @@ dashedName: step-62 # --hints-- -`.daily-value.sm-text` 要素の最後に新しい `p` 要素を 2 つ作成する必要があります。 +You should create two new `p` elements at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); ``` 1 つ目の新しい `p` 要素は `Calcium 260mg 20%` というテキストを持つ必要があります。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.innerText?.match(/Calcium 260mg[\s|\n]+20%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.innerText?.match(/Calcium 260mg[\s|\n]+20%/)); ``` 1 つ目の新しい `p` 要素内に `span` 要素が 1 つ必要です。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.localName === 'span'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.localName === 'span'); ``` -1 つ目の `span` 要素の `class` 属性を `right` に設定する必要があります。 太字にはしないでください。 +Your first `span` element should not be bold. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.classList?.contains('right')); -assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.classList?.contains('bold')); +assert(!document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.classList?.contains('bold')); ``` 1 つ目の `span` 要素は `20%` というテキストを囲む必要があります。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.innerText === '20%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.innerText === '20%'); ``` 2 つ目の新しい `p` 要素は `Iron 8mg 45%` というテキストを持つ必要があります。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Iron 8mg[\s|\n]+45%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Iron 8mg[\s|\n]+45%/)); ``` 2 つ目の新しい `p` 要素内に `span` 要素が 1 つ必要です。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.localName === 'span'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.localName === 'span'); ``` -2 つ目の `span` 要素の `class` 属性を `right` に設定する必要があります。 太字にはしないでください。 +Your second `span` element should not be bold. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('right')); -assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(!document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); ``` # --seed-- @@ -69,51 +67,56 @@ assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstE ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                  + ``` @@ -145,54 +148,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8f1223601fa546e93f31.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8f1223601fa546e93f31.md index b7acce18709..d14b5765f1f 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8f1223601fa546e93f31.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8f1223601fa546e93f31.md @@ -1,8 +1,8 @@ --- id: 615f8f1223601fa546e93f31 -title: ステップ 63 +title: Step 64 challengeType: 0 -dashedName: step-63 +dashedName: step-64 --- # --description-- @@ -11,35 +11,34 @@ dashedName: step-63 # --hints-- -`.daily-value.sm-text` 要素の最後に新しい `p` 要素を作成する必要があります。 +You should create a new `p` element at the end of your `.daily-value` element. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` 新しい `p` 要素の `class` 属性を `no-divider` に設定する必要があります。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('no-divider')); ``` 新しい `p` 要素は `Potassium 235mg 6%` というテキストを持つ必要があります。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Potassium 235mg[\s|\n]+6%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Potassium 235mg[\s|\n]+6%/)); ``` 新しい `p` 要素内に `span` 要素が 1 つ必要です。 ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 1); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 1); ``` -`span` 要素の `class` を `right` に設定する必要があります。 太字にはしないよう注意してください。 +Your `span` element should not be bold. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.classList?.contains('right')); -assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.classList?.contains('bold')); +assert(!document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span')?.classList?.contains('bold')); ``` # --seed-- @@ -49,53 +48,58 @@ assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.queryS ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                  + ``` @@ -127,54 +131,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f905fbd1017a65ca224eb.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f905fbd1017a65ca224eb.md index a8826a79199..fefa4eb3feb 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f905fbd1017a65ca224eb.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f905fbd1017a65ca224eb.md @@ -1,8 +1,8 @@ --- id: 615f905fbd1017a65ca224eb -title: ステップ 64 +title: Step 65 challengeType: 0 -dashedName: step-64 +dashedName: step-65 --- # --description-- @@ -23,11 +23,11 @@ dashedName: step-64 assert(document.querySelector('.daily-value').nextElementSibling?.localName === 'div'); ``` -新しい `div` の `class` を `divider md` に設定する必要があります。 +Your new `div` should have the `class` set to `divider medium`. ```js assert(document.querySelector('.daily-value')?.nextElementSibling?.classList?.contains('divider')); -assert(document.querySelector('.daily-value')?.nextElementSibling?.classList?.contains('md')); +assert(document.querySelector('.daily-value')?.nextElementSibling?.classList?.contains('medium')); ``` 新しい `div` 要素の後に `p` 要素を作成する必要があります。 @@ -55,55 +55,60 @@ assert.equal(document.querySelector('.label')?.lastElementChild?.innerText, '* T ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Potassium 235mg 6%

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  ---fcc-editable-region-- ---fcc-editable-region-- + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + 230
                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Potassium 235mg 6%

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + --fcc-editable-region-- + + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                  + ``` @@ -135,54 +140,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f94786869e1a7fec54375.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f94786869e1a7fec54375.md index 4264e6230c6..63fa9cb3dfe 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f94786869e1a7fec54375.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f94786869e1a7fec54375.md @@ -1,8 +1,8 @@ --- id: 615f94786869e1a7fec54375 -title: ステップ 65 +title: Step 66 challengeType: 0 -dashedName: step-65 +dashedName: step-66 --- # --description-- @@ -36,54 +36,60 @@ assert(new __helpers.CSSHelp(document).getStyle('.note')?.margin === '5px 0px'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Potassium 235mg 6%

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                                                                                                                                                                                  + 230
                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Potassium 235mg 6%

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily + diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + ``` @@ -115,54 +121,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f951dff9317a900ef683f.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f951dff9317a900ef683f.md index b6278f7b2a9..b5666a48237 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f951dff9317a900ef683f.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f951dff9317a900ef683f.md @@ -1,8 +1,8 @@ --- id: 615f951dff9317a900ef683f -title: ステップ 66 +title: Step 67 challengeType: 0 -dashedName: step-66 +dashedName: step-67 --- # --description-- @@ -35,54 +35,60 @@ assert(new __helpers.CSSHelp(document).getStyle('.note')?.textIndent === '-8px') ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Potassium 235mg 6%

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                                                                                                                                                                                  + 230
                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Potassium 235mg 6%

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily + diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + ``` @@ -114,54 +120,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } @@ -182,54 +202,60 @@ p { ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  Potassium 235mg 6%

                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                                                                                                                                                                                  + 230
                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Potassium 235mg 6%

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily + diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + ``` @@ -261,54 +287,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/635bde33c91c80540eae239b.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/635bde33c91c80540eae239b.md new file mode 100644 index 00000000000..d9073bf18ba --- /dev/null +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/635bde33c91c80540eae239b.md @@ -0,0 +1,153 @@ +--- +id: 635bde33c91c80540eae239b +title: Step 41 +challengeType: 0 +dashedName: step-41 +--- + +# --description-- + +The text `* Daily Value %` should be aligned to the right. Create a `.right` selector and use the `justify-content` property to do it. + +# --hints-- + +You should have a `.right` selector. + +```js +const hasRight = new __helpers.CSSHelp(document).getStyle('.right'); +assert(hasRight); + +``` + +The `.right` selector should have the `justify-content` property set to `flex-end`. + +```js +const rightJustifyContent = new __helpers.CSSHelp(document).getStyle('.right')?.getPropertyValue('justify-content'); +assert(rightJustifyContent === 'flex-end'); + +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + 230 +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + + +``` + +```css +* { + box-sizing: border-box; +} + +html { + font-size: 16px; +} + +body { + font-family: 'Open Sans', sans-serif; +} + +.label { + border: 2px solid black; + width: 270px; + margin: 20px auto; + padding: 0 7px; +} + +header h1 { + text-align: center; + margin: -4px 0; + letter-spacing: 0.15px +} + +p { + margin: 0; + display: flex; + justify-content: space-between; +} + +.divider { + border-bottom: 1px solid #888989; + margin: 2px 0; +} + +.bold { + font-weight: 800; +} + +.large { + height: 10px; +} + +.large, .medium { + background-color: black; + border: 0; +} + +.medium { + height: 5px; +} + +.small-text { + font-size: 0.85rem; +} + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { + margin: -5px -2px; + font-size: 2em; + font-weight: 700; +} + +.calories-info span { + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +--fcc-editable-region-- + +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6395d33ab5d91bf317107c48.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6395d33ab5d91bf317107c48.md new file mode 100644 index 00000000000..e6f009b7e04 --- /dev/null +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6395d33ab5d91bf317107c48.md @@ -0,0 +1,117 @@ +--- +id: 6395d33ab5d91bf317107c48 +title: Step 32 +challengeType: 0 +dashedName: step-32 +--- + +# --description-- + +Create a `.calories-info h2` selector and remove all margins. + +# --hints-- + +Create a `.calories-info h2` selector. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info h2')); +``` + +Your `.calories-info h2` selector should have a `margin` set to `0`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info h2')?.margin === '0px'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + + +``` + +```css +* { + box-sizing: border-box; +} + +html { + font-size: 16px; +} + +body { + font-family: 'Open Sans', sans-serif; +} + +.label { + border: 2px solid black; + width: 270px; + margin: 20px auto; + padding: 0 7px; +} + +header h1 { + text-align: center; + margin: -4px 0; + letter-spacing: 0.15px +} + +p { + margin: 0; + display: flex; + justify-content: space-between; +} + +.divider { + border-bottom: 1px solid #888989; + margin: 2px 0; +} + +.bold { + font-weight: 800; +} + +.large { + height: 10px; +} + +.large, .medium { + background-color: black; + border: 0; +} + +.small-text { + font-size: 0.85rem; +} + +--fcc-editable-region-- + +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6396e33fe478dd264ebbf278.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6396e33fe478dd264ebbf278.md new file mode 100644 index 00000000000..6a2dbb37aa9 --- /dev/null +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6396e33fe478dd264ebbf278.md @@ -0,0 +1,135 @@ +--- +id: 6396e33fe478dd264ebbf278 +title: Step 34 +challengeType: 0 +dashedName: step-34 +--- + +# --description-- + +Create a new `.calories-info` selector and give it a `display` property set to `flex`. Also give it a `justify-content` property set to `space-between` and `align-items` property set to `flex-end`. + +# --hints-- + +You should create a `.calories-info` selector. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info')); +``` + +Your `.calories-info` selector should have a `display` property set to `flex`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info')?.display === 'flex'); +``` + +Your `.calories-info` selector should have a `justify-content` property set to `space-between`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info')?.justifyContent === 'space-between'); +``` + +Your `.calories-info` selector should have a `align-items` property set to `flex-end`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info')?.alignItems === 'flex-end'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + 230 +
                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                  + + +``` + +```css +* { + box-sizing: border-box; +} + +html { + font-size: 16px; +} + +body { + font-family: 'Open Sans', sans-serif; +} + +.label { + border: 2px solid black; + width: 270px; + margin: 20px auto; + padding: 0 7px; +} + +header h1 { + text-align: center; + margin: -4px 0; + letter-spacing: 0.15px +} + +p { + margin: 0; + display: flex; + justify-content: space-between; +} + +.divider { + border-bottom: 1px solid #888989; + margin: 2px 0; +} + +.bold { + font-weight: 800; +} + +.large { + height: 10px; +} + +.large, .medium { + background-color: black; + border: 0; +} + +.small-text { + font-size: 0.85rem; +} + +--fcc-editable-region-- + +--fcc-editable-region-- + +.calories-info h2 { + margin: 0; +} +``` diff --git a/curriculum/challenges/japanese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c8bf3980c14c438d2aed.md b/curriculum/challenges/japanese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c8bf3980c14c438d2aed.md index 7bec654ec15..ae7f2b797d2 100644 --- a/curriculum/challenges/japanese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c8bf3980c14c438d2aed.md +++ b/curriculum/challenges/japanese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c8bf3980c14c438d2aed.md @@ -7,7 +7,7 @@ dashedName: step-39 # --description-- -For now, make your `goStore` function output the message `Going to store.` to the console. For example, here is a function that outputs the message "Hello World". +For now, make your `goStore` function output the message `Going to store.` to the console. For example, here is a function that outputs the message `Hello World`. ```js function functionName() { diff --git a/curriculum/challenges/japanese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b0b5053f16111b0b6b5f.md b/curriculum/challenges/japanese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b0b5053f16111b0b6b5f.md index c60cf5907da..8cbcb969f78 100644 --- a/curriculum/challenges/japanese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b0b5053f16111b0b6b5f.md +++ b/curriculum/challenges/japanese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b0b5053f16111b0b6b5f.md @@ -47,7 +47,7 @@ Your `update` function should set `button3.onclick` to `fightDragon`. assert.match(update.toString(), /button3\.onclick\s*=\s*fightDragon/); ``` -Your `update` function should set `text.innerText` to `You are in the town square. You see a sign that says "Store".`. +Your `update` function should set `text.innerText` to `You are in the town square. You see a sign that says \"Store\".`. ```js assert.match(update.toString(), /text\.innerText\s*=\s*"You are in the town square. You see a sign that says \\"Store\\"\."/); diff --git a/curriculum/challenges/japanese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md b/curriculum/challenges/japanese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md index a8bef26a706..294662a5750 100644 --- a/curriculum/challenges/japanese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md +++ b/curriculum/challenges/japanese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md @@ -7,7 +7,7 @@ dashedName: step-62 # --description-- -The `locations` array contains two locations: the town square and the store. Currently you are passing that entire array into the update functions. Pass in only the first element of the `locations` array by adding `[0]` at the end of the variable. For example: `myFunction(arg[0]);`. +The `locations` array contains two locations: the `town square` and the `store`. Currently you are passing that entire array into the `update` function. Pass in only the first element of the `locations` array by adding `[0]` at the end of the variable. For example: `myFunction(arg[0]);`. This is called bracket notation. Values in an array are accessed by index. Indices are numerical values and start at 0 - this is called zero-based indexing. `arg[0]` would be the first element in the `arg` array. diff --git a/curriculum/challenges/japanese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md b/curriculum/challenges/japanese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md index ca8a532ec15..1506701e4ab 100644 --- a/curriculum/challenges/japanese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md +++ b/curriculum/challenges/japanese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md @@ -7,7 +7,7 @@ dashedName: step-67 # --description-- -Finally, update the `text.innerText` assignment to equal the `text` from the location object. However, instead of using bracket notation, use dot notation. Here is an example of accessing the `name` property of an object called `obj`: `obj.name`. +Finally, update the `text.innerText` assignment to equal the `text` from the `location` object. However, instead of using bracket notation, use dot notation. Here is an example of accessing the `name` property of an object called `obj`: `obj.name`. # --hints-- diff --git a/curriculum/challenges/japanese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c89e4272512d44fc1c66.md b/curriculum/challenges/japanese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c89e4272512d44fc1c66.md index cded49b4395..dab6fabe2b3 100644 --- a/curriculum/challenges/japanese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c89e4272512d44fc1c66.md +++ b/curriculum/challenges/japanese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c89e4272512d44fc1c66.md @@ -7,7 +7,7 @@ dashedName: step-83 # --description-- -Similar to your `buyHealth` function, set `gold` equal to 30 less than its current value. Make sure this is inside your `if` statement. +Similar to your `buyHealth` function, set `gold` equal to `30` less than its current value. Make sure this is inside your `if` statement. # --hints-- diff --git a/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-javascript/subtract-one-number-from-another-with-javascript.md b/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-javascript/subtract-one-number-from-another-with-javascript.md index 33106767882..ae1432943a1 100644 --- a/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-javascript/subtract-one-number-from-another-with-javascript.md +++ b/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-javascript/subtract-one-number-from-another-with-javascript.md @@ -26,13 +26,13 @@ Altere o `0` para que a variável difference seja igual a `12`. # --hints-- -A variável `difference` deve ser igual a 12. +A variável `difference` deve ser igual a `12`. ```js assert(difference === 12); ``` -Você só deve subtrair um número de 45. +Você só deve subtrair um número de `45`. ```js assert(/difference=45-33;?/.test(__helpers.removeWhiteSpace(code))); diff --git a/curriculum/challenges/portuguese/05-back-end-development-and-apis/back-end-development-and-apis-projects/exercise-tracker.md b/curriculum/challenges/portuguese/05-back-end-development-and-apis/back-end-development-and-apis-projects/exercise-tracker.md index 0b5ba7ae02d..d7b1ca002b4 100644 --- a/curriculum/challenges/portuguese/05-back-end-development-and-apis/back-end-development-and-apis-projects/exercise-tracker.md +++ b/curriculum/challenges/portuguese/05-back-end-development-and-apis/back-end-development-and-apis-projects/exercise-tracker.md @@ -20,7 +20,7 @@ Se você usa o Replit, siga estas etapas para configurar o projeto: - Em seguida, você verá uma janela `.replit`. - Selecione `Use run command` e clique no botão `Done`. -Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para ela no campo `Solution Link`. Como opção, envie também um link para o código-fonte do projeto no campo `GitHub Link`. +Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para a solução no campo Solution Link. Como opção, envie também um link para o código-fonte do projeto no campo GitHub Link. # --instructions-- @@ -411,7 +411,7 @@ A propriedade `description` de qualquer objeto no array `log` retornada de `GET ```js async(getUserInput) => { const url = getUserInput('url'); - const res = await fetch(url + '/api/users/', { + const res = await fetch(url + '/api/users', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', @@ -458,7 +458,7 @@ A propriedade `duration` de qualquer objeto no array `log` que é retornada de ` ```js async(getUserInput) => { const url = getUserInput('url'); - const res = await fetch(url + '/api/users/', { + const res = await fetch(url + '/api/users', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', @@ -505,7 +505,7 @@ A propriedade `date` de qualquer objeto no array `log` retornada de `GET /api/us ```js async(getUserInput) => { const url = getUserInput('url'); - const res = await fetch(url + '/api/users/', { + const res = await fetch(url + '/api/users', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', diff --git a/curriculum/challenges/portuguese/05-back-end-development-and-apis/back-end-development-and-apis-projects/file-metadata-microservice.md b/curriculum/challenges/portuguese/05-back-end-development-and-apis/back-end-development-and-apis-projects/file-metadata-microservice.md index 7cf3525083d..8ba20da94cb 100644 --- a/curriculum/challenges/portuguese/05-back-end-development-and-apis/back-end-development-and-apis-projects/file-metadata-microservice.md +++ b/curriculum/challenges/portuguese/05-back-end-development-and-apis/back-end-development-and-apis-projects/file-metadata-microservice.md @@ -20,7 +20,7 @@ Se você usa o Replit, siga estas etapas para configurar o projeto: - Em seguida, você verá uma janela `.replit`. - Selecione `Use run command` e clique no botão `Done`. -Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para ela no campo `Solution Link`. Como opção, envie também um link para o código-fonte do projeto no campo `GitHub Link`. +Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para a solução no campo Solution Link. Como opção, envie também um link para o código-fonte do projeto no campo GitHub Link. # --instructions-- diff --git a/curriculum/challenges/portuguese/05-back-end-development-and-apis/back-end-development-and-apis-projects/request-header-parser-microservice.md b/curriculum/challenges/portuguese/05-back-end-development-and-apis/back-end-development-and-apis-projects/request-header-parser-microservice.md index e94597186a2..8127a93e2f3 100644 --- a/curriculum/challenges/portuguese/05-back-end-development-and-apis/back-end-development-and-apis-projects/request-header-parser-microservice.md +++ b/curriculum/challenges/portuguese/05-back-end-development-and-apis/back-end-development-and-apis-projects/request-header-parser-microservice.md @@ -20,7 +20,7 @@ Se você usa o Replit, siga estas etapas para configurar o projeto: - Em seguida, você verá uma janela `.replit`. - Selecione `Use run command` e clique no botão `Done`. -Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para ela no campo `Solution Link`. Como opção, envie também um link para o código-fonte do projeto no campo `GitHub Link`. +Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para a solução no campo Solution Link. Como opção, envie também um link para o código-fonte do projeto no campo GitHub Link. # --hints-- diff --git a/curriculum/challenges/portuguese/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md b/curriculum/challenges/portuguese/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md index 3e5021e089d..4623b78afa3 100644 --- a/curriculum/challenges/portuguese/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md +++ b/curriculum/challenges/portuguese/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md @@ -20,7 +20,7 @@ Se você usa o Replit, siga estas etapas para configurar o projeto: - Em seguida, você verá uma janela `.replit`. - Selecione `Use run command` e clique no botão `Done`. -Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para ela no campo `Solution Link`. Como opção, envie também um link para o código-fonte do projeto no campo `GitHub Link`. +Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para a solução no campo Solution Link. Como opção, envie também um link para o código-fonte do projeto no campo GitHub Link. **Observação:** a conversão de fusos horários não é um dos objetivos deste projeto, então suponha que todas as datas válidas enviadas serão analisadas com `new Date()` como datas GMT. @@ -106,7 +106,7 @@ Seu projeto pode tratar as datas que podem ser analisadas com sucesso por `new D ); ``` -Se a string de data de entrada for inválida, a api retorna um objeto que tem a estrutura `{ error : "Invalid Date" }` +Se a string de data de entrada for inválida, a API retorna um objeto que tem a estrutura `{ error : "Invalid Date" }` ```js (getUserInput) => diff --git a/curriculum/challenges/portuguese/05-back-end-development-and-apis/back-end-development-and-apis-projects/url-shortener-microservice.md b/curriculum/challenges/portuguese/05-back-end-development-and-apis/back-end-development-and-apis-projects/url-shortener-microservice.md index 58ae35afa6d..ef6a5e9a855 100644 --- a/curriculum/challenges/portuguese/05-back-end-development-and-apis/back-end-development-and-apis-projects/url-shortener-microservice.md +++ b/curriculum/challenges/portuguese/05-back-end-development-and-apis/back-end-development-and-apis-projects/url-shortener-microservice.md @@ -20,7 +20,7 @@ Se você usa o Replit, siga estas etapas para configurar o projeto: - Em seguida, você verá uma janela `.replit`. - Selecione `Use run command` e clique no botão `Done`. -Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para ela no campo `Solution Link`. Como opção, envie também um link para o código-fonte do projeto no campo `GitHub Link`. +Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para a solução no campo Solution Link. Como opção, envie também um link para o código-fonte do projeto no campo GitHub Link. # --instructions-- diff --git a/curriculum/challenges/portuguese/05-back-end-development-and-apis/basic-node-and-express/meet-the-node-console.md b/curriculum/challenges/portuguese/05-back-end-development-and-apis/basic-node-and-express/meet-the-node-console.md index 2fe374f6f81..6839ea78e05 100644 --- a/curriculum/challenges/portuguese/05-back-end-development-and-apis/basic-node-and-express/meet-the-node-console.md +++ b/curriculum/challenges/portuguese/05-back-end-development-and-apis/basic-node-and-express/meet-the-node-console.md @@ -20,7 +20,7 @@ Se você usa o Replit, siga estas etapas para configurar o projeto: - Em seguida, você verá uma janela `.replit`. - Selecione `Use run command` e clique no botão `Done`. -Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para ela no campo `Solution Link`. +Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para a solução no campo Solution Link. Durante o processo de desenvolvimento, é importante poder verificar o que está acontecendo no código. diff --git a/curriculum/challenges/portuguese/05-back-end-development-and-apis/basic-node-and-express/serve-json-on-a-specific-route.md b/curriculum/challenges/portuguese/05-back-end-development-and-apis/basic-node-and-express/serve-json-on-a-specific-route.md index a483ea0a7a6..8e415bed18c 100644 --- a/curriculum/challenges/portuguese/05-back-end-development-and-apis/basic-node-and-express/serve-json-on-a-specific-route.md +++ b/curriculum/challenges/portuguese/05-back-end-development-and-apis/basic-node-and-express/serve-json-on-a-specific-route.md @@ -18,7 +18,7 @@ Sirva o objeto `{"message": "Hello json"}` como uma resposta, no formato JSON, p # --hints-- -O `/json` do endpoint deve servir o objeto json `{"message": "Hello json"}` +O `/json` do endpoint deve servir o objeto JSON `{"message": "Hello json"}` ```js (getUserInput) => diff --git a/curriculum/challenges/portuguese/05-back-end-development-and-apis/managing-packages-with-npm/how-to-use-package.json-the-core-of-any-node.js-project-or-npm-package.md b/curriculum/challenges/portuguese/05-back-end-development-and-apis/managing-packages-with-npm/how-to-use-package.json-the-core-of-any-node.js-project-or-npm-package.md index b7e0f289c8f..92e2460b151 100644 --- a/curriculum/challenges/portuguese/05-back-end-development-and-apis/managing-packages-with-npm/how-to-use-package.json-the-core-of-any-node.js-project-or-npm-package.md +++ b/curriculum/challenges/portuguese/05-back-end-development-and-apis/managing-packages-with-npm/how-to-use-package.json-the-core-of-any-node.js-project-or-npm-package.md @@ -20,7 +20,7 @@ Se você usa o Replit, siga estas etapas para configurar o projeto: - Em seguida, você verá uma janela `.replit`. - Selecione `Use run command` e clique no botão `Done`. -Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para ela no campo `Solution Link`. +Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para a solução no campo Solution Link. O arquivo `package.json` é o centro de qualquer projeto do Node.js ou pacote do npm. Ele armazena informações sobre seu projeto, de modo semelhante ao que a seção <head> de um documento HTML usa para descrever o conteúdo de uma página da web. Ele consiste em um único objeto JSON, onde as informações são armazenadas em pares de chave-valor. Existem apenas dois campos obrigatórios: "name" e "version". Porém, é uma boa prática fornecer informações adicionais sobre o seu projeto que possam ser úteis para futuros usuários ou mantenedores. diff --git a/curriculum/challenges/portuguese/05-back-end-development-and-apis/mongodb-and-mongoose/install-and-set-up-mongoose.md b/curriculum/challenges/portuguese/05-back-end-development-and-apis/mongodb-and-mongoose/install-and-set-up-mongoose.md index 6e1c95fae00..58fb402db3f 100644 --- a/curriculum/challenges/portuguese/05-back-end-development-and-apis/mongodb-and-mongoose/install-and-set-up-mongoose.md +++ b/curriculum/challenges/portuguese/05-back-end-development-and-apis/mongodb-and-mongoose/install-and-set-up-mongoose.md @@ -20,7 +20,7 @@ Se você usa o Replit, siga estas etapas para configurar o projeto: - Em seguida, você verá uma janela `.replit`. - Selecione `Use run command` e clique no botão `Done`. -Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para ela no campo `Solution Link`. +Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para a solução no campo Solution Link. Neste desafio, você vai configurar um banco de dados do MongoDB Atlas e importar os pacotes necessários para se conectar a ele. diff --git a/curriculum/challenges/portuguese/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md b/curriculum/challenges/portuguese/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md index b621f959d41..a9930dbc6d1 100644 --- a/curriculum/challenges/portuguese/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md +++ b/curriculum/challenges/portuguese/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md @@ -20,7 +20,7 @@ Se você usa o Replit, siga estas etapas para configurar o projeto: - Em seguida, você verá uma janela `.replit`. - Selecione `Use run command` e clique no botão `Done`. -Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para ela no campo `Solution Link`. +Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para a solução no campo Solution Link. Um mecanismo de templates (template engine) permite o uso de arquivos de modelo estáticos (como aqueles escritos no *Pug*) na aplicação. Em tempo de execução, o mecanismo de modelos substitui variáveis em um arquivo de modelo por valores reais que podem ser fornecidos pelo servidor. Em seguida, ele transforma o modelo em um arquivo HTML estático, que é enviado ao client. Esta abordagem torna mais fácil projetar uma página HTML e permite exibir variáveis na página sem precisar fazer uma chamada de API do client. diff --git a/curriculum/challenges/portuguese/06-quality-assurance/quality-assurance-and-testing-with-chai/learn-how-javascript-assertions-work.md b/curriculum/challenges/portuguese/06-quality-assurance/quality-assurance-and-testing-with-chai/learn-how-javascript-assertions-work.md index 3250257afaf..ea1b26a77b1 100644 --- a/curriculum/challenges/portuguese/06-quality-assurance/quality-assurance-and-testing-with-chai/learn-how-javascript-assertions-work.md +++ b/curriculum/challenges/portuguese/06-quality-assurance/quality-assurance-and-testing-with-chai/learn-how-javascript-assertions-work.md @@ -20,7 +20,7 @@ Se você usa o Replit, siga estas etapas para configurar o projeto: - Em seguida, você verá uma janela `.replit`. - Selecione `Use run command` e clique no botão `Done`. -Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para ela no campo `Solution Link`. +Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para a solução no campo Solution Link. # --instructions-- diff --git a/curriculum/challenges/portuguese/06-quality-assurance/quality-assurance-projects/american-british-translator.md b/curriculum/challenges/portuguese/06-quality-assurance/quality-assurance-projects/american-british-translator.md index 8f5bee21bba..f1a623b23b3 100644 --- a/curriculum/challenges/portuguese/06-quality-assurance/quality-assurance-projects/american-british-translator.md +++ b/curriculum/challenges/portuguese/06-quality-assurance/quality-assurance-projects/american-british-translator.md @@ -20,7 +20,7 @@ Se você usa o Replit, siga estas etapas para configurar o projeto: - Em seguida, você verá uma janela `.replit`. - Selecione `Use run command` e clique no botão `Done`. -Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para ela no campo `Solution Link`. Como opção, envie também um link para o código-fonte do projeto no campo `GitHub Link`. +Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para a solução no campo Solution Link. Como opção, envie também um link para o código-fonte do projeto no campo GitHub Link. # --instructions-- diff --git a/curriculum/challenges/portuguese/06-quality-assurance/quality-assurance-projects/issue-tracker.md b/curriculum/challenges/portuguese/06-quality-assurance/quality-assurance-projects/issue-tracker.md index 3f1bee75f6c..a38406f4657 100644 --- a/curriculum/challenges/portuguese/06-quality-assurance/quality-assurance-projects/issue-tracker.md +++ b/curriculum/challenges/portuguese/06-quality-assurance/quality-assurance-projects/issue-tracker.md @@ -20,7 +20,7 @@ Se você usa o Replit, siga estas etapas para configurar o projeto: - Em seguida, você verá uma janela `.replit`. - Selecione `Use run command` e clique no botão `Done`. -Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para ela no campo `Solution Link`. Como opção, envie também um link para o código-fonte do projeto no campo `GitHub Link`. +Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para a solução no campo Solution Link. Como opção, envie também um link para o código-fonte do projeto no campo GitHub Link. # --instructions-- diff --git a/curriculum/challenges/portuguese/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md b/curriculum/challenges/portuguese/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md index 8c91e79ddbf..8ff020760ae 100644 --- a/curriculum/challenges/portuguese/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md +++ b/curriculum/challenges/portuguese/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md @@ -20,7 +20,7 @@ Se você usa o Replit, siga estas etapas para configurar o projeto: - Em seguida, você verá uma janela `.replit`. - Selecione `Use run command` e clique no botão `Done`. -Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para ela no campo `Solution Link`. Como opção, envie também um link para o código-fonte do projeto no campo `GitHub Link`. +Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para a solução no campo Solution Link. Como opção, envie também um link para o código-fonte do projeto no campo GitHub Link. # --instructions-- diff --git a/curriculum/challenges/portuguese/06-quality-assurance/quality-assurance-projects/personal-library.md b/curriculum/challenges/portuguese/06-quality-assurance/quality-assurance-projects/personal-library.md index 3588d548641..07f75cfddf7 100644 --- a/curriculum/challenges/portuguese/06-quality-assurance/quality-assurance-projects/personal-library.md +++ b/curriculum/challenges/portuguese/06-quality-assurance/quality-assurance-projects/personal-library.md @@ -20,7 +20,7 @@ Se você usa o Replit, siga estas etapas para configurar o projeto: - Em seguida, você verá uma janela `.replit`. - Selecione `Use run command` e clique no botão `Done`. -Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para ela no campo `Solution Link`. Como opção, envie também um link para o código-fonte do projeto no campo `GitHub Link`. +Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para a solução no campo Solution Link. Como opção, envie também um link para o código-fonte do projeto no campo GitHub Link. # --instructions-- diff --git a/curriculum/challenges/portuguese/06-quality-assurance/quality-assurance-projects/sudoku-solver.md b/curriculum/challenges/portuguese/06-quality-assurance/quality-assurance-projects/sudoku-solver.md index 6ea9227da10..f8e050923a0 100644 --- a/curriculum/challenges/portuguese/06-quality-assurance/quality-assurance-projects/sudoku-solver.md +++ b/curriculum/challenges/portuguese/06-quality-assurance/quality-assurance-projects/sudoku-solver.md @@ -20,7 +20,7 @@ Se você usa o Replit, siga estas etapas para configurar o projeto: - Em seguida, você verá uma janela `.replit`. - Selecione `Use run command` e clique no botão `Done`. -Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para ela no campo `Solution Link`. Como opção, envie também um link para o código-fonte do projeto no campo `GitHub Link`. +Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para a solução no campo Solution Link. Como opção, envie também um link para o código-fonte do projeto no campo GitHub Link. # --instructions-- diff --git a/curriculum/challenges/portuguese/09-information-security/information-security-projects/anonymous-message-board.md b/curriculum/challenges/portuguese/09-information-security/information-security-projects/anonymous-message-board.md index 074efc7c479..7ab88c48c7a 100644 --- a/curriculum/challenges/portuguese/09-information-security/information-security-projects/anonymous-message-board.md +++ b/curriculum/challenges/portuguese/09-information-security/information-security-projects/anonymous-message-board.md @@ -22,7 +22,7 @@ Se você usa o Replit, siga estas etapas para configurar o projeto: - Em seguida, você verá uma janela `.replit`. - Selecione `Use run command` e clique no botão `Done`. -Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para ela no campo `Solution Link`. Como opção, envie também um link para o código-fonte do projeto no campo `GitHub Link`. +Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para a solução no campo Solution Link. Como opção, envie também um link para o código-fonte do projeto no campo GitHub Link. # --instructions-- diff --git a/curriculum/challenges/portuguese/09-information-security/information-security-projects/secure-real-time-multiplayer-game.md b/curriculum/challenges/portuguese/09-information-security/information-security-projects/secure-real-time-multiplayer-game.md index 91bbafcd097..864849149c1 100644 --- a/curriculum/challenges/portuguese/09-information-security/information-security-projects/secure-real-time-multiplayer-game.md +++ b/curriculum/challenges/portuguese/09-information-security/information-security-projects/secure-real-time-multiplayer-game.md @@ -20,7 +20,7 @@ Se você usa o Replit, siga estas etapas para configurar o projeto: - Em seguida, você verá uma janela `.replit`. - Selecione `Use run command` e clique no botão `Done`. -Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para ela no campo `Solution Link`. Como opção, envie também um link para o código-fonte do projeto no campo `GitHub Link`. +Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para a solução no campo Solution Link. Como opção, envie também um link para o código-fonte do projeto no campo GitHub Link. # --instructions-- diff --git a/curriculum/challenges/portuguese/09-information-security/information-security-projects/stock-price-checker.md b/curriculum/challenges/portuguese/09-information-security/information-security-projects/stock-price-checker.md index 5a3dec11d46..50e486dd329 100644 --- a/curriculum/challenges/portuguese/09-information-security/information-security-projects/stock-price-checker.md +++ b/curriculum/challenges/portuguese/09-information-security/information-security-projects/stock-price-checker.md @@ -24,7 +24,7 @@ Se você usa o Replit, siga estas etapas para configurar o projeto: - Em seguida, você verá uma janela `.replit`. - Selecione `Use run command` e clique no botão `Done`. -Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para ela no campo `Solution Link`. Como opção, envie também um link para o código-fonte do projeto no campo `GitHub Link`. +Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para a solução no campo Solution Link. Como opção, envie também um link para o código-fonte do projeto no campo GitHub Link. # --instructions-- diff --git a/curriculum/challenges/portuguese/09-information-security/information-security-with-helmetjs/install-and-require-helmet.md b/curriculum/challenges/portuguese/09-information-security/information-security-with-helmetjs/install-and-require-helmet.md index 1652a16bbd8..4fbb52a8083 100644 --- a/curriculum/challenges/portuguese/09-information-security/information-security-with-helmetjs/install-and-require-helmet.md +++ b/curriculum/challenges/portuguese/09-information-security/information-security-with-helmetjs/install-and-require-helmet.md @@ -20,7 +20,7 @@ Se você usa o Replit, siga estas etapas para configurar o projeto: - Em seguida, você verá uma janela `.replit`. - Selecione `Use run command` e clique no botão `Done`. -Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para ela no campo `Solution Link`. +Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para a solução no campo Solution Link. O Helmet ajuda você a proteger seus aplicativos do Express, definindo vários cabeçalhos HTTP. diff --git a/curriculum/challenges/portuguese/10-coding-interview-prep/algorithms/implement-binary-search.md b/curriculum/challenges/portuguese/10-coding-interview-prep/algorithms/implement-binary-search.md index a10321250ae..8d7fdddedd1 100644 --- a/curriculum/challenges/portuguese/10-coding-interview-prep/algorithms/implement-binary-search.md +++ b/curriculum/challenges/portuguese/10-coding-interview-prep/algorithms/implement-binary-search.md @@ -10,9 +10,10 @@ dashedName: implement-binary-search A busca binária é um algoritmo de eficiência **O(log(n))** para procurar um elemento em um array ordenado. Ele opera usando as seguintes etapas: -1. Encontrar o `value` do meio de um array ordenado. Se `value == target`, retornar (encontramos!). +1. Encontrar o `value` do meio de um array ordenado. Se `value == target` retornou `true` (O valor foi encontrado e a pesquisa está completa). 1. Se `value < target`, procurar à direita do meio do array na próxima comparação. 1. Se `value > target`, procurar à esquerda do meio do array na próxima comparação. +1. Se, depois de pesquisar no array inteiro, o valor não está presente, retorne `false` (O array foi pesquisado e o valor não está no array). Como você pode ver, você está dividindo um array para metade com sucesso, o que traz a eficiência log(n). Para este desafio, queremos que você mostre seu trabalho - como você conseguiu o valor de destino... o caminho que você fez! diff --git a/curriculum/challenges/portuguese/10-coding-interview-prep/take-home-projects/build-a-nightlife-coordination-app.md b/curriculum/challenges/portuguese/10-coding-interview-prep/take-home-projects/build-a-nightlife-coordination-app.md index e147b90e09a..5d1857d3a22 100644 --- a/curriculum/challenges/portuguese/10-coding-interview-prep/take-home-projects/build-a-nightlife-coordination-app.md +++ b/curriculum/challenges/portuguese/10-coding-interview-prep/take-home-projects/build-a-nightlife-coordination-app.md @@ -22,7 +22,7 @@ Aqui estão as histórias de usuário que você deve implementar para este proje **Dica:** tente usar a API Yelp para encontrar espaços nas cidades que seus usuários procuram. Se você usar a API da Yelp, certifique-se de mencionar isso na aplicação. -Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para ela no campo `Solution Link`. Como opção, envie também um link para o código-fonte do projeto no campo `GitHub Link`. +Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para a solução no campo Solution Link. Como opção, envie também um link para o código-fonte do projeto no campo GitHub Link. # --solutions-- diff --git a/curriculum/challenges/portuguese/10-coding-interview-prep/take-home-projects/build-a-voting-app.md b/curriculum/challenges/portuguese/10-coding-interview-prep/take-home-projects/build-a-voting-app.md index ea5944d1eac..4ee04125131 100644 --- a/curriculum/challenges/portuguese/10-coding-interview-prep/take-home-projects/build-a-voting-app.md +++ b/curriculum/challenges/portuguese/10-coding-interview-prep/take-home-projects/build-a-voting-app.md @@ -28,7 +28,7 @@ Aqui estão as histórias de usuário que você deve implementar para este proje **História de usuário:** Como um usuário autenticado, se você não gostar das opções em uma enquete, você pode criar uma nova opção. -Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para ela no campo `Solution Link`. Como opção, envie também um link para o código-fonte do projeto no campo `GitHub Link`. +Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para a solução no campo Solution Link. Como opção, envie também um link para o código-fonte do projeto no campo GitHub Link. # --solutions-- diff --git a/curriculum/challenges/portuguese/10-coding-interview-prep/take-home-projects/build-an-image-search-abstraction-layer.md b/curriculum/challenges/portuguese/10-coding-interview-prep/take-home-projects/build-an-image-search-abstraction-layer.md index 8e3b63cf057..e6f3a742ad6 100644 --- a/curriculum/challenges/portuguese/10-coding-interview-prep/take-home-projects/build-an-image-search-abstraction-layer.md +++ b/curriculum/challenges/portuguese/10-coding-interview-prep/take-home-projects/build-an-image-search-abstraction-layer.md @@ -18,7 +18,7 @@ Aqui estão as histórias de usuário que você deve implementar para este proje **História de usuário:** você pode obter uma lista das strings de pesquisa enviadas mais recentemente. -Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para ela no campo `Solution Link`. Como opção, envie também um link para o código-fonte do projeto no campo `GitHub Link`. +Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para a solução no campo Solution Link. Como opção, envie também um link para o código-fonte do projeto no campo GitHub Link. # --solutions-- diff --git a/curriculum/challenges/portuguese/10-coding-interview-prep/take-home-projects/chart-the-stock-market.md b/curriculum/challenges/portuguese/10-coding-interview-prep/take-home-projects/chart-the-stock-market.md index cff5fad1e5a..d8ee0f1b243 100644 --- a/curriculum/challenges/portuguese/10-coding-interview-prep/take-home-projects/chart-the-stock-market.md +++ b/curriculum/challenges/portuguese/10-coding-interview-prep/take-home-projects/chart-the-stock-market.md @@ -20,7 +20,7 @@ Aqui estão as histórias de usuário que você deve implementar para este proje **História de usuário:** você pode ver alterações em tempo real quando qualquer outro usuário adicionar ou remover uma ação. Para isso, você precisará usar Web Sockets. -Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para ela no campo `Solution Link`. Como opção, envie também um link para o código-fonte do projeto no campo `GitHub Link`. +Quando terminar, certifique-se de que uma demonstração funcional do seu projeto está hospedada em algum lugar público. Em seguida, envie o URL para a solução no campo Solution Link. Como opção, envie também um link para o código-fonte do projeto no campo GitHub Link. # --solutions-- diff --git a/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/elements-and-tags-question-a.md b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/elements-and-tags-question-a.md new file mode 100644 index 00000000000..f4b05b12871 --- /dev/null +++ b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/elements-and-tags-question-a.md @@ -0,0 +1,54 @@ +--- +id: 637f4e0e72c65bc8e73dfe1e +videoId: LGQuIIv2RVA +title: Elements and Tags Question A +challengeType: 15 +dashedName: elements-and-tags-question-a +--- + +# --description-- + +Almost all elements on an HTML page are just pieces of content wrapped in opening and closing HTML tags. + +Opening tags tell the browser this is the start of an HTML element. They are comprised of a keyword enclosed in angle brackets `<>`. For example, an opening paragraph tag looks like this: `

                                                                                                                                                                                                                                                                  `. + +Closing tags tell the browser where an element ends. They are almost the same as opening tags; the only difference is that they have a forward slash before the keyword. For example, a closing paragraph tag looks like this: `

                                                                                                                                                                                                                                                                  `. + +A full paragraph element looks like this: + +element diagram + +You can think of elements as containers for content. The opening and closing tags tell the browser what content the element contains. The browser can then use that information to determine how it should interpret and format the content. + +There are some HTML elements that do not have a closing tag. These elements often look like this: `
                                                                                                                                                                                                                                                                  ` or ``, but some can also be used without the closing forward slash such as `
                                                                                                                                                                                                                                                                  ` or ``. These are known as self-closing tags or empty elements because they don’t wrap any content. You will encounter a few of these in later lessons, but for the most part, elements will have both opening and closing tags. + +HTML has a vast list of predefined tags that you can use to create all kinds of different elements. It is important to use the correct tags for content. Using the correct tags can have a big impact on two aspects of your sites: how they are ranked in search engines; and how accessible they are to users who rely on assistive technologies, like screen readers, to use the internet. + +Using the correct elements for content is called semantic HTML. You will explore this in much more depth later on in the curriculum. + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s [Introduction to HTML video](https://www.youtube.com/watch?v=LGQuIIv2RVA&list=PL4-IK0AVhVjM0xE0K2uZRvsM7LkIhsPT-) + +## --text-- + +What are HTML tags? + +## --answers-- + +HTML tags tell the browser what content an element contains. + +--- + +HTML tags tell the browser when to load its content. + +--- + +HTML tags tell the browser what content the next element contains. + + +## --video-solution-- + +1 diff --git a/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/elements-and-tags-question-b.md b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/elements-and-tags-question-b.md new file mode 100644 index 00000000000..9e8720616fb --- /dev/null +++ b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/elements-and-tags-question-b.md @@ -0,0 +1,50 @@ +--- +id: 637f4e1672c65bc8e73dfe1f +videoId: LGQuIIv2RVA +title: Elements and Tags Question B +challengeType: 15 +dashedName: elements-and-tags-question-b +--- + +# --description-- + +Almost all elements on an HTML page are just pieces of content wrapped in opening and closing HTML tags. + +Opening tags tell the browser this is the start of an HTML element. They are comprised of a keyword enclosed in angle brackets <>. For example, an opening paragraph tag looks like this: `

                                                                                                                                                                                                                                                                  `. + +Closing tags tell the browser where an element ends. They are almost the same as opening tags; the only difference is that they have a forward slash before the keyword. For example, a closing paragraph tag looks like this: `

                                                                                                                                                                                                                                                                  `. + +A full paragraph element looks like this: + +element diagram + +You can think of elements as containers for content. The opening and closing tags tell the browser what content the element contains. The browser can then use that information to determine how it should interpret and format the content. + +There are some HTML elements that do not have a closing tag. These elements often look like this: `
                                                                                                                                                                                                                                                                  ` or ``, but some can also be used without the closing forward slash such as `
                                                                                                                                                                                                                                                                  ` or ``. These are known as self-closing tags or empty elements because they don’t wrap any content. You will encounter a few of these in later lessons, but for the most part, elements will have both opening and closing tags. + +HTML has a vast list of predefined tags that you can use to create all kinds of different elements. It is important to use the correct tags for content. Using the correct tags can have a big impact on two aspects of your sites: how they are ranked in search engines; and how accessible they are to users who rely on assistive technologies, like screen readers, to use the internet. + +Using the correct elements for content is called semantic HTML. You will explore this in much more depth later on in the curriculum. + +# --question-- + +## --text-- + +What are the three parts of most HTML elements? + +## --answers-- + +An opening tag, self closing tag, and content. + +--- + +An opening tag, closing tag, and content. + +--- + +An opening tag, closing tag, and attribute. + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/html-boilerplate-question-a.md b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/html-boilerplate-question-a.md new file mode 100644 index 00000000000..d563ebf0ac3 --- /dev/null +++ b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/html-boilerplate-question-a.md @@ -0,0 +1,55 @@ +--- +id: 637f4e1c72c65bc8e73dfe20 +videoId: V8UAEoOvqFg +title: HTML Boilerplate Question A +challengeType: 15 +dashedName: html-boilerplate-question-a +--- + +# --description-- + +To demonstrate an HTML boilerplate, you first need an HTML file to work with. + +Create a new folder on your computer and name it `html-boilerplate`. Within that folder create a new file and name it `index.html`. + +You’re probably already familiar with a lot of different types of files, for example doc, pdf, and image files. + +To let the computer know you want to create an HTML file, you need to append the filename with the `.html` extension as you have done when creating the `index.html` file. + +It is worth noting that you named your HTML file index. You should always name the HTML file that will contain the homepage of your websites `index.html`. This is because web servers will by default look for an index.html page when users land on your websites - and not having one will cause big problems. + +## The DOCTYPE + +Every HTML page starts with a doctype declaration. The doctype’s purpose is to tell the browser what version of HTML it should use to render the document. The latest version of HTML is HTML5, and the doctype for that version is simply ``. + +The doctypes for older versions of HTML were a bit more complicated. For example, this is the doctype declaration for HTML4: + +```html + +``` + +However, you probably won’t ever want to be using an older version of HTML, and so you’ll always use ``. + +Open the `index.html` file created earlier in your text editor and add `` to the very first line. + +# --question-- +## --text-- + +What is the purpose of the `DOCTYPE` declaration? + +## --answers-- + +It tells the browser which version of HTML to use to render the document. + +--- + +It tells the browser that this document uses JavaScript. + +--- + +It tells the browser the title of the document. + + +## --video-solution-- + +1 diff --git a/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/html-boilerplate-question-b.md b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/html-boilerplate-question-b.md new file mode 100644 index 00000000000..7a528432239 --- /dev/null +++ b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/html-boilerplate-question-b.md @@ -0,0 +1,47 @@ +--- +id: 637f4e2872c65bc8e73dfe21 +videoId: V8UAEoOvqFg +title: HTML Boilerplate Question B +challengeType: 15 +dashedName: html-boilerplate-question-b +--- + +# --description-- + +After you declare the doctype, you need to provide an `` element. This is what’s known as the root element of the document, meaning that every other element in the document will be a descendant of it. + +This becomes more important later on when you learn about manipulating HTML with JavaScript. For now, just know that the `html` element should be included on every HTML document. + +Back in the `index.html` file, let’s add the `` element by typing out its opening and closing tags, like so: + +```html + + + +``` + +## What is the lang attribute? +`lang` specifies the language of the text content in that element. This attribute is primarily used for improving accessibility of the webpage. It allows assistive technologies, for example screen readers, to adapt according to the language and invoke correct pronunciation. + +# --question-- + +## --text-- + +What is the `html` element? + +## --answers-- + +It is the root element in the document and tells the browser which version of HTML it should use. + +--- + +It is the root element in the document and all other elements should descend from it. + +--- + +It is the root element in the document and all other elements should come after it. + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/html-boilerplate-question-c.md b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/html-boilerplate-question-c.md new file mode 100644 index 00000000000..76ceb2841e5 --- /dev/null +++ b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/html-boilerplate-question-c.md @@ -0,0 +1,66 @@ +--- +id: 637f4e2f72c65bc8e73dfe22 +videoId: LGQuIIv2RVA +title: HTML Boilerplate Question C +challengeType: 15 +dashedName: html-boilerplate-question-c +--- + +# --description-- + +The `` element is where you put important meta-information about your webpages, and stuff required for your webpages to render correctly in the browser. Inside the ``, you should not use any element that displays content on the webpage. + +## The Charset Meta Element +You should always have the `meta` tag for the charset encoding of the webpage in the head element: ``. + +Setting the encoding is very important because it ensures that the webpage will display special symbols and characters from different languages correctly in the browser. + +## Title Element +Another element you should always include in the head of an HTML document is the `title` element: + +```html +My First Webpage +``` + +The `title` element is used to give webpages a human-readable title which is displayed in your webpage’s browser tab. + +If you didn’t include a `title` element, the webpage’s title would default to its file name. In your case that would be `index.html`, which isn’t very meaningful for users; this would make it very difficult to find your webpage if the user has many browser tabs open. + +There are many more elements that can go within the `head` of an HTML document. However, for now it’s only crucial to know about the two elements you have covered here. You will introduce more elements that go into the `head` throughout the rest of the curriculum. + +Back in `index.html` file, let’s add a `head` element with a `charset` `meta` element and a `title` within it. The head element goes within the HTML element and should always be the first element under the opening `` tag: + + +```html + + + + + + My First Webpage + + +``` + +# --question-- + +## --text-- + +What is the purpose of the `head` element? + +## --answers-- + +The `head` element is used to display all elements that are displayed on the webpage. + +--- + +The `head` element is used to display important information about your webpage and is used to render web pages correctly with `meta` elements. + +--- + +The `head` element is used to display the header content on top of the webpage. + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/html-boilerplate-question-d.md b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/html-boilerplate-question-d.md new file mode 100644 index 00000000000..302b6a95d44 --- /dev/null +++ b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/html-boilerplate-question-d.md @@ -0,0 +1,48 @@ +--- +id: 637f4e3672c65bc8e73dfe23 +videoId: V8UAEoOvqFg +title: HTML Boilerplate Question D +challengeType: 15 +dashedName: html-boilerplate-question-d +--- + +# --description-- + +The final element needed to complete the HTML boilerplate is the `` element. This is where all the content that will be displayed to users will go - the text, images, lists, links, and so on. + +To complete the boilerplate, add a `body` element to the `index.html` file. The `body` element also goes within the `html` element and is always below the `head` element, like so: + +# --question-- + +## --assignment-- + +Watch and follow along to Kevin Powell’s brilliant Building your first web page video above. + +--- + +Build some muscle memory by deleting the contents of the `index.html` file and trying to write out all the boilerplate again from memory. Don’t worry if you have to peek at the lesson content the first few times if you get stuck. Just keep going until you can do it a couple of times from memory. + +--- + +Run your boilerplate through this [HTML validator](https://www.freeformatter.com/html-validator.html). Validators ensure your markup is correct and are an excellent learning tool, as they provide feedback on syntax errors you may be making often and aren’t aware of, such as missing closing tags and extra spaces in your HTML. + +## --text-- + +What is the purpose of the `body` element? + +## --answers-- + +This is where all important information about the webpage is displayed such as the `title` and `meta` tags. + +--- + +This is where you tell the browser how to render the webpage correctly. + +--- + +This is where all content will be displayed on the page such images, text, and links. + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-a.md b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-a.md new file mode 100644 index 00000000000..aa20f137e89 --- /dev/null +++ b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-a.md @@ -0,0 +1,42 @@ +--- +id: 6374f208de18c50e48ba767b +videoId: LGQuIIv2RVA +title: Introduction To HTML and CSS Question A +challengeType: 15 +dashedName: introduction-to-html-and-css-question-a +--- + +# --description-- + +HTML and CSS are two languages that work together to create everything that you see when you look at something on the internet. HTML is the raw data that a webpage is built out of. All the text, links, cards, lists, and buttons are created in HTML. CSS is what adds style to those plain elements. HTML puts information on a webpage, and CSS positions that information, gives it color, changes the font, and makes it look great! + +Many helpful resources out there keep referring to HTML and CSS as programming languages, but if you want to get technical, labeling them as such is not quite accurate. This is because they are only concerned with presenting information. They are not used to program logic. JavaScript, which you will learn in the next section, is a programming language because it’s used to make webpages do things. Yet, there is quite a lot you can do with just HTML and CSS, and you will definitely need them both. Throughout our curriculum, the following lessons focus on giving you the tools you need to succeed once you reach JavaScript content. + +# --question-- + +## --assignment-- + +Read the HTML vs CSS vs JavaScript article. It is a quick overview of the relationships between HTML, CSS, and JavaScript. + +## --text-- + +Which of the following statements is true? + +## --answers-- + +CSS is used to create the basic structure of a webpage, and HTML is used to add style. + +--- + +HTML is used to create the basic structure of a webpage, and CSS is used to add style. + +--- + +HTML and CSS are used to add style to a webpage, and JavaScript is used to create the basic structure. + + +## --video-solution-- + +2 + + diff --git a/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-b.md b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-b.md new file mode 100644 index 00000000000..cd9cf900330 --- /dev/null +++ b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-b.md @@ -0,0 +1,37 @@ +--- +id: 6376327e2724a688c04636e3 +videoId: LGQuIIv2RVA +title: Introduction To HTML and CSS Question B +challengeType: 15 +dashedName: introduction-to-html-and-css-question-b +--- + +# --description-- + + +HTML and CSS are two languages that work together to create everything that you see when you look at something on the internet. HTML is the raw data that a webpage is built out of. All the text, links, cards, lists, and buttons are created in HTML. CSS is what adds style to those plain elements. HTML puts information on a webpage, and CSS positions that information, gives it color, changes the font, and makes it look great! + +Many helpful resources out there keep referring to HTML and CSS as programming languages, but if you want to get technical, labeling them as such is not quite accurate. This is because they are only concerned with presenting information. They are not used to program logic. JavaScript, which you will learn in the next section, is a programming language because it’s used to make webpages do things. Yet, there is quite a lot you can do with just HTML and CSS, and you will definitely need them both. Throughout our curriculum, the following lessons focus on giving you the tools you need to succeed once you reach JavaScript content. + +# --question-- + +## --text-- + +Between HTML and CSS, which should you use to add paragraphs of text on a webpage? + +## --answers-- + +CSS + +--- + +JavaScript + +--- + +HTML + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-c.md b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-c.md new file mode 100644 index 00000000000..eb759394680 --- /dev/null +++ b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-c.md @@ -0,0 +1,34 @@ +--- +id: 637633162724a688c04636e4 +videoId: LGQuIIv2RVA +title: Introduction To HTML and CSS Question C +challengeType: 15 +dashedName: introduction-to-html-and-css-question-c +--- + +# --description-- + +HTML and CSS are two languages that work together to create everything that you see when you look at something on the internet. HTML is the raw data that a webpage is built out of. All the text, links, cards, lists, and buttons are created in HTML. CSS is what adds style to those plain elements. HTML puts information on a webpage, and CSS positions that information, gives it color, changes the font, and makes it look great! + +Many helpful resources out there keep referring to HTML and CSS as programming languages, but if you want to get technical, labeling them as such is not quite accurate. This is because they are only concerned with presenting information. They are not used to program logic. JavaScript, which you will learn in the next section, is a programming language because it’s used to make webpages do things. Yet, there is quite a lot you can do with just HTML and CSS, and you will definitely need them both. Throughout our curriculum, the following lessons focus on giving you the tools you need to succeed once you reach JavaScript content. +# --question-- + +## --text-- + +Between HTML and CSS, which should you use to change the font and background color of a button? + +## --answers-- + +You should use CSS to change the background color and font of a button. + +--- + +You should use JavaScript to change the background color and font of a button. + +--- + +You should use HTML to change the background color and font of a button. + +## --video-solution-- + +1 diff --git a/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-d.md b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-d.md new file mode 100644 index 00000000000..9e9ee049b75 --- /dev/null +++ b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-d.md @@ -0,0 +1,35 @@ +--- +id: 637633672724a688c04636e5 +videoId: LGQuIIv2RVA +title: Introduction To HTML and CSS Question D +challengeType: 15 +dashedName: introduction-to-html-and-css-question-d +--- + +# --description-- + +HTML and CSS are two languages that work together to create everything that you see when you look at something on the internet. HTML is the raw data that a webpage is built out of. All the text, links, cards, lists, and buttons are created in HTML. CSS is what adds style to those plain elements. HTML puts information on a webpage, and CSS positions that information, gives it color, changes the font, and makes it look great! + +Many helpful resources out there keep referring to HTML and CSS as programming languages, but if you want to get technical, labeling them as such is not quite accurate. This is because they are only concerned with presenting information. They are not used to program logic. JavaScript, which you will learn in the next section, is a programming language because it’s used to make webpages do things. Yet, there is quite a lot you can do with just HTML and CSS, and you will definitely need them both. Throughout our curriculum, the following lessons focus on giving you the tools you need to succeed once you reach JavaScript content. + +# --question-- + +## --text-- + +What is the difference between HTML, CSS, and JavaScript? + +## --answers-- + +HTML is for creating interactive elements, CSS is for the look and feel, and JavaScript is for creating the structure of a webpage. + +--- + +CSS is for the look and feel, JavaScript is for creating interactive elements, and HTML is for creating the structure of a webpage. + +--- + +JavaScript is for the look and feel, CSS is for creating the structure, and HTML is for creating interactive elements of a webpage. + +## --video-solution-- + +2 diff --git a/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/links-and-images-question-a.md b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/links-and-images-question-a.md new file mode 100644 index 00000000000..b4d237448f3 --- /dev/null +++ b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/links-and-images-question-a.md @@ -0,0 +1,66 @@ +--- +id: 637f704072c65bc8e73dfe36 +videoId: tsEQgGjSmkM +title: Links and Images Question A +challengeType: 15 +dashedName: links-and-images-question-a +--- + +# --description-- + +To get some practice using links and images throughout this lesson you need an HTML project to work with. + +- Create a new directory named `odin-links-and-images`. + +- Within that directory, create a new file named `index.html`. + +- Fill in the usual HTML boilerplate. + +- Finally, add the following `h1` to the `body`: `

                                                                                                                                                                                                                                                                  Homepage

                                                                                                                                                                                                                                                                  ` + +## Anchor Elements +To create a link in HTML, you use the anchor element. An anchor element is defined by wrapping the text or another HTML element you want to be a link with an `` tag. Add the following to the `body` of the `index.html` page you created and open it in the browser: + +```html +click me +``` + +You may have noticed that clicking this link doesn’t do anything. This is because an anchor tag on its own won’t know where you want to link to. You have to tell it a destination to go to. You do this by using an HTML attribute. + +An HTML attribute gives additional information to an HTML element and always goes in the element’s opening tag. An attribute is usually made up of two parts: a name, and a value; however, not all attributes require a value. In your case, you need to add a `href` (hyperlink reference) attribute to the opening anchor tag. The value of the `href` attribute is the destination you want your link to go to. + +Add the following `href` attribute to the anchor element you created previously and try clicking it again, don’t forget to refresh the browser so the new changes can be applied. + +```html +click me +``` + +By default, any text wrapped with an anchor tag without a `href` attribute will look like plain text. If the `href` attribute is present, the browser will give the text a blue color and underline it to signify it is a link. + +It’s worth noting you can use anchor tags to link to any kind of resource on the internet, not just other HTML documents. You can link to videos, pdf files, images, and so on, but for the most part, you will be linking to other HTML documents. + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s HTML Links video above. + +## --text-- + +What HTML tag is used to create a link? + +## --answers-- + +`` + +--- + +`

                                                                                                                                                                                                                                                                  ` + +--- + +`

                                                                                                                                                                                                                                                                    ` + +## --video-solution-- + +1 diff --git a/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/links-and-images-question-b.md b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/links-and-images-question-b.md new file mode 100644 index 00000000000..164fb01214f --- /dev/null +++ b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/links-and-images-question-b.md @@ -0,0 +1,55 @@ +--- +id: 637f703572c65bc8e73dfe35 +videoId: tsEQgGjSmkM +title: Links and Images Question B +challengeType: 15 +dashedName: links-and-images-question-b +--- + +# --description-- + +To get some practice using links and images throughout this lesson you need an HTML project to work with. + +- Create a new directory named odin-links-and-images. + +- Within that directory, create a new file named index.html. + +- Fill in the usual HTML boilerplate. + +- finally, add the following h1 to the body: `

                                                                                                                                                                                                                                                                    Homepage

                                                                                                                                                                                                                                                                    ` + +## Anchor Elements +To create a link in HTML, you use the anchor element. An anchor element is defined by wrapping the text or another HTML element you want to be a link with an `
                                                                                                                                                                                                                                                                    ` tag. Add the following to the body of the index.html page you created and open it in the browser: + +```html +click me +``` + +You may have noticed that clicking this link doesn’t do anything. This is because an anchor tag on its own won’t know where you want to link to. You have to tell it a destination to go to. You do this by using an HTML attribute. An HTML attribute gives additional information to an HTML element and always goes in the element’s opening tag. An attribute is usually made up of two parts: a name, and a value; however, not all attributes require a value. In your case, you need to add a href (hyperlink reference) attribute to the opening anchor tag. The value of the href attribute is the destination you want your link to go to. Add the following href attribute to the anchor element you created previously and try clicking it again, don’t forget to refresh the browser so the new changes can be applied. + +```html +click me +``` + +By default, any text wrapped with an anchor tag without a `href` attribute will look like plain text. If the `href` attribute is present, the browser will give the text a blue color and underline it to signify it is a link. It’s worth noting you can use anchor tags to link to any kind of resource on the internet, not just other HTML documents. You can link to videos, pdf files, images, and so on, but for the most part, you will be linking to other HTML documents. + +# --question-- +## --text-- + +What is an attribute? +## --answers-- + +An HTML attribute gives additional information to an HTML element and always goes in the element’s closing tag. + +--- + +An HTML attribute is used to tell the browser what the element contains. + +--- + +An HTML attribute gives additional information to an HTML element and always goes in the element’s opening tag. + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/links-and-images-question-c.md b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/links-and-images-question-c.md new file mode 100644 index 00000000000..c8a3913d77e --- /dev/null +++ b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/links-and-images-question-c.md @@ -0,0 +1,56 @@ +--- +id: 637f703072c65bc8e73dfe34 +videoId: tsEQgGjSmkM +title: Links and Images Question C +challengeType: 15 +dashedName: links-and-images-question-c +--- + +# --description-- + +To get some practice using links and images throughout this lesson you need an HTML project to work with. + +- Create a new directory named odin-links-and-images. + +- Within that directory, create a new file named index.html. + +- Fill in the usual HTML boilerplate. + +- finally, add the following h1 to the body: `

                                                                                                                                                                                                                                                                    Homepage

                                                                                                                                                                                                                                                                    ` + +## Anchor Elements +To create a link in HTML, you use the anchor element. An anchor element is defined by wrapping the text or another HTML element you want to be a link with an `` tag. Add the following to the body of the index.html page you created and open it in the browser: + +```html +click me +``` + +You may have noticed that clicking this link doesn’t do anything. This is because an anchor tag on its own won’t know where you want to link to. You have to tell it a destination to go to. You do this by using an HTML attribute. An HTML attribute gives additional information to an HTML element and always goes in the element’s opening tag. An attribute is usually made up of two parts: a name, and a value; however, not all attributes require a value. In your case, you need to add a href (hyperlink reference) attribute to the opening anchor tag. The value of the href attribute is the destination you want your link to go to. Add the following href attribute to the anchor element you created previously and try clicking it again, don’t forget to refresh the browser so the new changes can be applied. + +```html +click me +``` + +By default, any text wrapped with an anchor tag without a `href` attribute will look like plain text. If the `href` attribute is present, the browser will give the text a blue color and underline it to signify it is a link. It’s worth noting you can use anchor tags to link to any kind of resource on the internet, not just other HTML documents. You can link to videos, pdf files, images, and so on, but for the most part, you will be linking to other HTML documents. + +# --question-- + +## --text-- + +What attribute tells links where to go to? + +## --answers-- + +`src` + +--- + +`href` + +--- + +`link` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/links-and-images-question-d.md b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/links-and-images-question-d.md new file mode 100644 index 00000000000..2b6a665eb87 --- /dev/null +++ b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/links-and-images-question-d.md @@ -0,0 +1,112 @@ +--- +id: 637f702872c65bc8e73dfe33 +videoId: ta3Oxx7Yqbo +title: Links and Images Question D +challengeType: 15 +dashedName: links-and-images-question-d +--- + +# --description-- + + +Generally, there are two kinds of links you will create: + +- Links to pages on other websites on the internet + +- Links to pages located on your own websites + + +## Absolute Links +Links to pages on other websites on the internet are called absolute links. A typical absolute link will be made up of the following parts: `protocol://domain/path`. An absolute link will always contain the protocol and domain of the destination. + +You’ve already seen an absolute link in action. The link you created to The Odin Project’s About page earlier was an absolute link as it contains the protocol and domain. + +`https://www.theodinproject.com/about` + +## Relative Links +Links to other pages within your own website are called relative links. Relative links do not include the domain name, since it is another page on the same site, it assumes the domain name will be the same as the page you created the link on. + +Relative links only include the file path to the other page, relative to the page you are creating the link on. This is quite abstract, let’s see this in action using an example. + +Within the `odin-links-and-images` directory, create another HTML file named `about.html` and paste the following code into it: + +```html + + + + + Odin Links and Images + + + +

                                                                                                                                                                                                                                                                    About Page

                                                                                                                                                                                                                                                                    + + +``` + +Back in the index page, add the following anchor element to create a link to the about page: + +```html + +

                                                                                                                                                                                                                                                                    Homepage

                                                                                                                                                                                                                                                                    + click me + + About + +``` + +Open the index file in a browser and click on the about link to make sure it is all wired together correctly. Clicking the link should go to the about page you just created. + +This works because the index and about page are in the same directory. That means you can simply use its name (`about.html`) as the link’s href value. + +But you will usually want to organize your website directories a little better. Normally you would only have the `index.html` at the root directory and all other HTML files in their own directory. + +Create a directory named `pages` within the `odin-links-and-images` directory and move the `about.html` file into this new directory. + +Refresh the index page in the browser and then click on the about link. It will now be broken. This is because the location of the about page file has changed. + +To fix this, you just need to update the about link `href` value to include the `pages/` directory since that is the new location of the about file relative to the index file. + +```html + +

                                                                                                                                                                                                                                                                    Homepage

                                                                                                                                                                                                                                                                    + About + +``` + +Refresh the index page in the browser and try clicking the about link again, it should now be back in working order. + +In many cases, this will work just fine; however, you can still run into unexpected issues with this approach. Prepending `./` before the link will in most cases prevent such issues. By adding `./` you are specifying to your code that it should start looking for the file/directory relative to the **current** directory. + +```html + +

                                                                                                                                                                                                                                                                    Homepage

                                                                                                                                                                                                                                                                    + About + +``` + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s HTML File Structure video above. + +## --text-- + +What is the difference between an absolute and a relative link? + +## --answers-- + +An absolute link is a link to another page on the current website. A relative link is a link to another website. + +--- + +An absolute link is a link to another website. A relative link is a link another page on the current website. + +--- + +There is no difference between absolute and relative links. + +## --video-solution-- + +2 diff --git a/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/links-and-images-question-e.md b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/links-and-images-question-e.md new file mode 100644 index 00000000000..a935ae3262a --- /dev/null +++ b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/links-and-images-question-e.md @@ -0,0 +1,98 @@ +--- +id: 637f702372c65bc8e73dfe32 +videoId: 0xoztJCHpbQ +title: Links and Images Question E +challengeType: 15 +dashedName: links-and-images-question-e +--- + +# --description-- + +Websites would be fairly boring if they could only display text. Luckily HTML provides a wide variety of elements for displaying all sorts of different media. The most widely used of these is the image element. + +To display an image in HTML you use the `` element. Unlike the other elements you have encountered, the `` element is self-closing. Empty, self-closing HTML elements do not need a closing tag. + +Instead of wrapping content with an opening and closing tag, it embeds an image into the page using a `src` attribute which tells the browser where the image file is located. The `src` attribute works much like the `href` attribute for anchor tags. It can embed an image using both absolute and relative paths. + +For example, using an absolute path you can display an image located on The Odin Project site: + + + +To use images that you have on your own websites, you can use a relative path. + +- Create a new directory named `images` within the `odin-links-and-images` project. + +- Next, download [this image](https://unsplash.com/photos/Mv9hjnEUHR4/download?force=true&w=640) and move it into the `images` directory you just created. + +- Rename the image to `dog.jpg`. + +Finally add the image to the `index.html` file: + +```html + +

                                                                                                                                                                                                                                                                    Homepage

                                                                                                                                                                                                                                                                    + click me + + About + + + +``` + +Save the `index.html` file and open it in a browser to view Charles in all his glory. + + +## Parent Directories + +What if you want to use the dog image in the about page? You would first have to go up one level out of the pages directory into its parent directory so you could then access the images directory. + +To go to the parent directory you need to use two dots in the relative filepath like this: `../.` Let’s see this in action, within the body of the `about.html` file, add the following image below the heading you added earlier: + +```html + +``` + +To break this down: + +- First, you are going to the parent directory of the pages directory which is `odin-links-and-images`. + +- Then, from the parent directory, you can go into the `images` directory. + +- Finally, you can access the `dog.jpg` file. + +Using the metaphor we used earlier, using `../` in a filepath is kind of like stepping out from the room you are currently in to the main hallway so you can go to another room. + +## `Alt` attribute + +Besides the `src` attribute, every image element should also have an `alt` (alternative text) attribute. + +The `alt` attribute is used to describe an image. It will be used in place of the image if it cannot be loaded. It is also used with screen readers to describe what the image is to visually impaired users. + +This is how the The Odin Project logo example you used earlier looks with an `alt` attribute included: + + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s HTML Images Video above. + +## --text-- + +Which tag is used to display an image? + +## --answers-- + +`` + +--- + +`` + +--- + +`` + +## --video-solution-- + +3 diff --git a/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/links-and-images-question-f.md b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/links-and-images-question-f.md new file mode 100644 index 00000000000..ba4eb809e5d --- /dev/null +++ b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/links-and-images-question-f.md @@ -0,0 +1,94 @@ +--- +id: 637f701c72c65bc8e73dfe31 +videoId: 0xoztJCHpbQ +title: Links and Images Question F +challengeType: 15 +dashedName: links-and-images-question-f +--- + +# --description-- + +Websites would be fairly boring if they could only display text. Luckily HTML provides a wide variety of elements for displaying all sorts of different media. The most widely used of these is the image element. + +To display an image in HTML you use the `` element. Unlike the other elements you have encountered, the `` element is self-closing. Empty, self-closing HTML elements do not need a closing tag. + +Instead of wrapping content with an opening and closing tag, it embeds an image into the page using a src attribute which tells the browser where the image file is located. The src attribute works much like the href attribute for anchor tags. It can embed an image using both absolute and relative paths. + +For example, using an absolute path you can display an image located on The Odin Project site: + + + +To use images that you have on your own websites, you can use a relative path. + +- Create a new directory named `images` within the `odin-links-and-images` project. + +- Next, download [this image](https://unsplash.com/photos/Mv9hjnEUHR4/download?force=true&w=640) and move it into the images directory you just created. + +- Rename the image to `dog.jpg`. + +Finally add the image to the `index.html` file: + +```html + +

                                                                                                                                                                                                                                                                    Homepage

                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                    click me + + About + + + +``` + +Save the `index.html` file and open it in a browser to view Charles in all his glory. + + +## Parent Directories + +What if you want to use the dog image in the about page? You would first have to go up one level out of the pages directory into its parent directory so you could then access the images directory. + +To go to the parent directory you need to use two dots in the relative filepath like this: `../.` Let’s see this in action, within the body of the `about.html` file, add the following image below the heading you added earlier: + +```html + +``` + +To break this down: + +- First, you are going to the parent directory of the pages directory which is `odin-links-and-images`. + +- Then, from the parent directory, you can go into the `images` directory. + +- Finally, you can access the `dog.jpg` file. + +Using the metaphor we used earlier, using `../` in a filepath is kind of like stepping out from the room you are currently in to the main hallway so you can go to another room. + +## Alt attribute + +Besides the src attribute, every image element should also have an alt (alternative text) attribute. + +The alt attribute is used to describe an image. It will be used in place of the image if it cannot be loaded. It is also used with screen readers to describe what the image is to visually impaired users. + +This is how the The Odin Project logo example you used earlier looks with an alt attribute included: + + +# --question-- + +## --text-- + +What two attributes do images always need to have? + +## --answers-- + +`href` and `alt` + +--- + +`name` and `href` + +--- + +`alt` and `src` + +## --video-solution-- + +3 diff --git a/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/links-and-images-question-g.md b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/links-and-images-question-g.md new file mode 100644 index 00000000000..d1a6fcd4406 --- /dev/null +++ b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/links-and-images-question-g.md @@ -0,0 +1,94 @@ +--- +id: 637f701572c65bc8e73dfe30 +videoId: 0xoztJCHpbQ +title: Links and Images Question G +challengeType: 15 +dashedName: links-and-images-question-g +--- + +# --description-- + +Websites would be fairly boring if they could only display text. Luckily HTML provides a wide variety of elements for displaying all sorts of different media. The most widely used of these is the image element. + +To display an image in HTML you use the `` element. Unlike the other elements you have encountered, the `` element is self-closing. Empty, self-closing HTML elements do not need a closing tag. + +Instead of wrapping content with an opening and closing tag, it embeds an image into the page using a src attribute which tells the browser where the image file is located. The src attribute works much like the href attribute for anchor tags. It can embed an image using both absolute and relative paths. + +For example, using an absolute path you can display an image located on The Odin Project site: + + + +To use images that you have on your own websites, you can use a relative path. + +- Create a new directory named `images` within the `odin-links-and-images` project. + +- Next, download [this image](https://unsplash.com/photos/Mv9hjnEUHR4/download?force=true&w=640) and move it into the images directory you just created. + +- Rename the image to `dog.jpg`. + +Finally add the image to the `index.html` file: + +```html + +

                                                                                                                                                                                                                                                                    Homepage

                                                                                                                                                                                                                                                                    + click me + + About + + + +``` + +Save the `index.html` file and open it in a browser to view Charles in all his glory. + + +## Parent Directories + +What if you want to use the dog image in the about page? You would first have to go up one level out of the pages directory into its parent directory so you could then access the images directory. + +To go to the parent directory you need to use two dots in the relative filepath like this: `../.` Let’s see this in action, within the body of the `about.html` file, add the following image below the heading you added earlier: + +```html + +``` + +To break this down: + +- First, you are going to the parent directory of the pages directory which is `odin-links-and-images`. + +- Then, from the parent directory, you can go into the `images` directory. + +- Finally, you can access the `dog.jpg` file. + +Using the metaphor we used earlier, using `../` in a filepath is kind of like stepping out from the room you are currently in to the main hallway so you can go to another room. + +## Alt attribute + +Besides the src attribute, every image element should also have an alt (alternative text) attribute. + +The alt attribute is used to describe an image. It will be used in place of the image if it cannot be loaded. It is also used with screen readers to describe what the image is to visually impaired users. + +This is how the The Odin Project logo example you used earlier looks with an alt attribute included: + + +# --question-- + +## --text-- + +How do you access a parent directory in a filepath? + +## --answers-- + +`../` + +--- + +`./` + +--- + +`.../` + +## --video-solution-- + +1 diff --git a/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/links-and-images-question-h.md b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/links-and-images-question-h.md new file mode 100644 index 00000000000..cfd73fcfbc1 --- /dev/null +++ b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/links-and-images-question-h.md @@ -0,0 +1,98 @@ +--- +id: 637f700b72c65bc8e73dfe2f +videoId: 0xoztJCHpbQ +title: Links and Images Question H +challengeType: 15 +dashedName: links-and-images-question-h +--- + +# --description-- + +Websites would be fairly boring if they could only display text. Luckily HTML provides a wide variety of elements for displaying all sorts of different media. The most widely used of these is the image element. + +To display an image in HTML you use the `` element. Unlike the other elements you have encountered, the `` element is self-closing. Empty, self-closing HTML elements do not need a closing tag. + +Instead of wrapping content with an opening and closing tag, it embeds an image into the page using a src attribute which tells the browser where the image file is located. The src attribute works much like the href attribute for anchor tags. It can embed an image using both absolute and relative paths. + +For example, using an absolute path you can display an image located on The Odin Project site: + + + +To use images that you have on your own websites, you can use a relative path. + +- Create a new directory named `images` within the `odin-links-and-images` project. + +- Next, download [this image](https://unsplash.com/photos/Mv9hjnEUHR4/download?force=true&w=640) and move it into the images directory you just created. + +- Rename the image to `dog.jpg`. + +Finally add the image to the `index.html` file: + +```html + +

                                                                                                                                                                                                                                                                    Homepage

                                                                                                                                                                                                                                                                    + click me + + About + + + +``` + +Save the `index.html` file and open it in a browser to view Charles in all his glory. + + +## Parent Directories + +What if you want to use the dog image in the about page? You would first have to go up one level out of the pages directory into its parent directory so you could then access the images directory. + +To go to the parent directory you need to use two dots in the relative filepath like this: `../.` Let’s see this in action, within the body of the `about.html` file, add the following image below the heading you added earlier: + +```html + +``` + +To break this down: + +- First, you are going to the parent directory of the pages directory which is `odin-links-and-images`. + +- Then, from the parent directory, you can go into the `images` directory. + +- Finally, you can access the `dog.jpg` file. + +Using the metaphor we used earlier, using `../` in a filepath is kind of like stepping out from the room you are currently in to the main hallway so you can go to another room. + +## Alt attribute + +Besides the src attribute, every image element should also have an alt (alternative text) attribute. + +The alt attribute is used to describe an image. It will be used in place of the image if it cannot be loaded. It is also used with screen readers to describe what the image is to visually impaired users. + +This is how the The Odin Project logo example you used earlier looks with an alt attribute included: + + +# --question-- + +## --assignment-- + +Read about the four main image formats that can be used on the web. + +## --text-- + +What are the four main image formats that you can use for images on the web? + +## --answers-- + +TIFF, GIF, PNG, and SVG. + +--- + +JPG, PNG, GIF, and SVG. + +--- + +JPG, PDF, SVG, and GIF. + +## --video-solution-- + +2 diff --git a/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/project-create-a-recipe-page.md b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/project-create-a-recipe-page.md new file mode 100644 index 00000000000..657a3f6e32d --- /dev/null +++ b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/project-create-a-recipe-page.md @@ -0,0 +1,204 @@ +--- +id: 6391d1a4f7ac71efd0621380 +title: Build a Recipe Page Project +challengeType: 14 +dashedName: project-create-a-recipe-page +--- + +# --description-- + +The website will consist of a main index page which will have links to a few recipes. The website won’t look very pretty by the time you’ve finished. + +**User Stories:** + +1. Your recipe page should contain a `DOCTYPE` tag. +1. Your recipe page should include an `html` element with a `head` and `body` element as children. +1. You should have a `title` element within the `head` element with the text `The Odin Recipes`. +1. You should see an `h1` element that has the text `Creamy Chocolate Fudge`. +1. You should see an image with the url `*placeholder-fcc-cdn*` with a fitting `alt` text. +1. There should be an `h2` element with the text `Description` under the image. +1. You should see a couple of paragraphs under `Description` that describe the recipe. +1. There should be an `h2` element with the text `Ingredients` +1. Under the `Ingredients` heading there should be an unordered list with the ingredients needed for the recipe. +1. Under the list of ingredients add another heading called `Steps`. +1. You should see an ordered list with a couple of steps needed to complete the recipe. +1. Under the steps there should be an `h2` element with the text `More Recipes` +1. You should see a couple of links to other recipes inside an unordered list which has a couple of list items with anchor elements within. +1. These anchor elements should have `href` attribute with the value set to `#` + +# --hints-- + +You should have a `DOCTYPE` tag. + +```js +assert(code.match(//gi)); +``` + +You should have a `html` element with `head` and `body` element. + +```js +const html = document.querySelectorAll('html')[0]; +const head = document.querySelectorAll('html > head')[0]; +const body = document.querySelectorAll('html > body')[0]; + +assert(html && head && body); +``` + +You should have a `title` element within the `head` element that contains the text `The Odin Recipes`. + +```js +assert(document.querySelectorAll('HEAD > TITLE')[0].innerText == 'The Odin Recipes'); +``` + +You should have a `h1` element within your `body` element that contains the text `Creamy Chocolate Fudge`. + +```js +assert(document.querySelectorAll('BODY > H1')[0].innerText == 'Creamy Chocolate Fudge'); +``` + +You should have an image with the url `*placeholder-fcc-cdn*` with an `alt` attribute that has a fitting text. + +```js +const img = document.querySelectorAll('IMG')[0]; + +assert(img && img.alt !='' && img.src === 'https://i.imgur.com/p0J5baJ.jpg') +``` + +You should have an `h2` element with the text `Description`. + +```js +const h2 = document.querySelectorAll('H2')[0]; + +assert(h2.innerText == 'Description'); +``` + +You should have at least two `p` elements describing the recipe. + +```js +const paragraphs = document.querySelectorAll('P'); + +assert(paragraphs.length > 1); +``` + +You should have an `h2` element with the text `Ingredients`. + +```js +const h2 = document.querySelectorAll('H2')[1]; + +assert(h2.innerText == 'Ingredients'); +``` + +You should have an unordered list `
                                                                                                                                                                                                                                                                      ` with some ingredients as the list items `
                                                                                                                                                                                                                                                                    • `. + +```js +const unorderedList = document.querySelectorAll('UL')[0]; +const listItems = document.querySelectorAll('UL > LI'); + +assert(unorderedList && listItems && listItems.length > 1); +``` + +You should have an `h2` element with the text `Steps`. + +```js +const h2 = document.querySelectorAll('H2')[2]; + +assert(h2.innerText == 'Steps'); +``` + +You should have a `
                                                                                                                                                                                                                                                                        ` with the the steps as the list items `
                                                                                                                                                                                                                                                                      1. `. + +```js +const orderedList = document.querySelectorAll('OL')[0]; +const listItems = document.querySelectorAll('OL > LI'); + +assert(orderedList && listItems && listItems.length > 1); +``` + +You should have an `h2` element with the text `More Recipes`. + +```js +const h2 = document.querySelectorAll('H2')[3]; + +assert(h2.innerText == 'More Recipes'); +``` + +You should have an unordered list `
                                                                                                                                                                                                                                                                          ` element with list items `
                                                                                                                                                                                                                                                                        • ` that contain `` tags which lead to other recipes. + +```js +const unorderedList = document.querySelectorAll('UL')[1]; +const listItems = unorderedList.querySelectorAll('LI'); + +const allAreListItems = unorderedList.children.length == listItems.length; + +const containsAnchors = [...listItems].every(function(listItem) { + return listItem.querySelector("a") !== null; +}); + +assert(unorderedList && allAreListItems && containsAnchors && listItems.length > 1); +``` + +Your anchor tags linking to the recipes should have a `href` attribute with the value set to `#` + +```js +const anchorTags = document.querySelectorAll("a"); + +const allAnchorsHaveHrefHash = [...anchorTags].every(function(anchorTag) { + return anchorTag.hasAttribute("href") && anchorTag.getAttribute("href") === "#"; +}); + +assert(allAnchorsHaveHrefHash && anchorTags.length > 0); +``` + +# --seed-- + +## --seed-contents-- + +```html + +``` + +```css + +``` + +## --solutions-- + +```html + + + + The Odin Recipes + + +

                                                                                                                                                                                                                                                                          Creamy Chocolate Fudge

                                                                                                                                                                                                                                                                          + A delicious chocolate fudge dessert +

                                                                                                                                                                                                                                                                          Description

                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                          This recipe is for a rich and creamy chocolate fudge that is sure to satisfy your sweet tooth. It's perfect for a special occasion or as a tasty treat for any time of the year.

                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                          This recipe is easy to follow and only requires a few simple ingredients. With just a few steps, you'll be able to create a delicious dessert that everyone will love.

                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                          Ingredients

                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                          • 1 cup sugar
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          • 1/2 cup unsalted butter
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          • 1/4 cup milk
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          • 1/4 cup cocoa powder
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          • 1/4 cup chocolate chips
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          • 1/4 tsp salt
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          • 1 tsp vanilla extract
                                                                                                                                                                                                                                                                          • +
                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                          Steps

                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                          1. In a medium saucepan, melt the butter over medium heat.
                                                                                                                                                                                                                                                                          2. +
                                                                                                                                                                                                                                                                          3. Add the sugar, milk, cocoa powder, and salt to the saucepan and stir until well combined.
                                                                                                                                                                                                                                                                          4. +
                                                                                                                                                                                                                                                                          5. Bring the mixture to a boil, stirring constantly, and then reduce the heat to low and simmer for 5 minutes.
                                                                                                                                                                                                                                                                          6. +
                                                                                                                                                                                                                                                                          7. Remove the saucepan from the heat and stir in the chocolate chips and vanilla extract until the chocolate is melted and the mixture is smooth.
                                                                                                                                                                                                                                                                          8. +
                                                                                                                                                                                                                                                                          9. Pour the fudge into a greased 8-inch square pan and let it cool completely before cutting into squares.
                                                                                                                                                                                                                                                                          10. +
                                                                                                                                                                                                                                                                          +

                                                                                                                                                                                                                                                                          More Recipes

                                                                                                                                                                                                                                                                          +
                                                                                                                                                                                                                                                                          + + +``` diff --git a/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-a.md b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-a.md new file mode 100644 index 00000000000..f4625eb7e31 --- /dev/null +++ b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-a.md @@ -0,0 +1,65 @@ +--- +id: 637f4e3e72c65bc8e73dfe24 +videoId: kcHKFZBVtf4 +title: Understand Ordered and Unordered List Question A +challengeType: 15 +dashedName: understand-ordered-and-unordered-list-question-a +--- + +# --description-- + +If you want to have a list of items where the order doesn’t matter, like a shopping list of items that can be bought in any order, then you can use an unordered list. + +Unordered lists are created using the `
                                                                                                                                                                                                                                                                            ` element, and each item within the list is created using the list item element `
                                                                                                                                                                                                                                                                          • `. + +Each list item in an unordered list begins with a bullet point: + + + +If you instead want to create a list of items where the order does matter, like step-by-step instructions for a recipe, or your top 10 favorite TV shows, then you can use an ordered list. + +Ordered lists are created using the `
                                                                                                                                                                                                                                                                              ` element. Each individual item in them is again created using the list item element `
                                                                                                                                                                                                                                                                            1. `. However, each list item in an ordered list begins with a number instead: + + + +# --question-- + +## --assignment-- + +Watch the first three minutes of Kevin Powell's video on Ordered and Unordered lists above. + +--- + +Make an unordered shopping list of your favorite foods. + +--- + +Make an ordered list of todo’s you need to get done today. + +--- + +Make an unordered list of places you’d like to visit someday. + +--- + +Make an ordered list of your all time top 5 favorite video games or movies. + +## --text-- + +What HTML tag is used to create an unordered list? + +## --answers-- + +`
                                                                                                                                                                                                                                                                            2. ` + +--- + +`
                                                                                                                                                                                                                                                                                ` + +--- + +`
                                                                                                                                                                                                                                                                                  ` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-b.md b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-b.md new file mode 100644 index 00000000000..4c6822fc504 --- /dev/null +++ b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-b.md @@ -0,0 +1,45 @@ +--- +id: 637f4e4672c65bc8e73dfe25 +videoId: LGQuIIv2RVA +title: Understand Ordered and Unordered List Question B +challengeType: 15 +dashedName: understand-ordered-and-unordered-list-question-b +--- + +# --description-- + +If you want to have a list of items where the order doesn’t matter, like a shopping list of items that can be bought in any order, then you can use an unordered list. + +Unordered lists are created using the `
                                                                                                                                                                                                                                                                                    ` element, and each item within the list is created using the list item element `
                                                                                                                                                                                                                                                                                  • `. + +Each list item in an unordered list begins with a bullet point: + + + +If you instead want to create a list of items where the order does matter, like step-by-step instructions for a recipe, or your top 10 favorite TV shows, then you can use an ordered list. + +Ordered lists are created using the `
                                                                                                                                                                                                                                                                                      ` element. Each individual item in them is again created using the list item element `
                                                                                                                                                                                                                                                                                    1. `. However, each list item in an ordered list begins with a number instead: + + + +# --question-- + +## --text-- + +What HTML tag is used to create an ordered list? + +## --answers-- + +`
                                                                                                                                                                                                                                                                                        ` + +--- + +`
                                                                                                                                                                                                                                                                                      1. ` + +--- + +`
                                                                                                                                                                                                                                                                                          ` + +## --video-solution-- + +1 diff --git a/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-c.md b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-c.md new file mode 100644 index 00000000000..c766990ca22 --- /dev/null +++ b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-c.md @@ -0,0 +1,45 @@ +--- +id: 637f4e5172c65bc8e73dfe26 +videoId: LGQuIIv2RVA +title: Understand Ordered and Unordered List Question C +challengeType: 15 +dashedName: understand-ordered-and-unordered-list-question-c +--- + +# --description-- + +If you want to have a list of items where the order doesn’t matter, like a shopping list of items that can be bought in any order, then you can use an unordered list. + +Unordered lists are created using the `
                                                                                                                                                                                                                                                                                            ` element, and each item within the list is created using the list item element `
                                                                                                                                                                                                                                                                                          • `. + +Each list item in an unordered list begins with a bullet point: + + + +If you instead want to create a list of items where the order does matter, like step-by-step instructions for a recipe, or your top 10 favorite TV shows, then you can use an ordered list. + +Ordered lists are created using the `
                                                                                                                                                                                                                                                                                              ` element. Each individual item in them is again created using the list item element `
                                                                                                                                                                                                                                                                                            1. `. However, each list item in an ordered list begins with a number instead: + + + +# --question-- + +## --text-- + +What HTML tag is used to create list items within both unordered and ordered lists? + +## --answers-- + +`
                                                                                                                                                                                                                                                                                                ` + +--- + +`
                                                                                                                                                                                                                                                                                              1. ` + +--- + +`
                                                                                                                                                                                                                                                                                                  ` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/working-with-text-question-a.md b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/working-with-text-question-a.md new file mode 100644 index 00000000000..8698b62aca8 --- /dev/null +++ b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/working-with-text-question-a.md @@ -0,0 +1,60 @@ +--- +id: 637f4e5872c65bc8e73dfe27 +videoId: yqcd-XkxZNM +title: Working With Text Question A +challengeType: 15 +dashedName: working-with-text-question-a +--- + +# --description-- + +What would you expect the following text to output on an HTML page? + +```html + + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor + incididunt ut labore et dolore magna aliqua. + + Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris + nisi ut aliquip ex ea commodo consequat. + +``` + +It looks like two paragraphs of text, and so you might expect it to display in that way. However that is not the case, as you can see in the output below: + + + +When the browser encounters new lines like this in your HTML, it will compress them down into one single space. The result of this compression is that all of the text is clumped together into one long line. + +If you want to create paragraphs in HTML, you need to use the paragraph element, which will add a newline after each of your paragraphs. A paragraph element is defined by wrapping text content with a `

                                                                                                                                                                                                                                                                                                  ` tag. + +Changing our example from before to use paragraph elements fixes the issue: + + + +# --question-- + +## --assignment-- + +Watch and follow along to Kevin Powell’s HTML Paragraph and Headings Video above. + +## --text-- + +How do you create a paragraph in HTML? + +## --answers-- + +`

                                                                                                                                                                                                                                                                                                  This is a paragraph

                                                                                                                                                                                                                                                                                                  ` + +--- + +`

                                                                                                                                                                                                                                                                                                  This is a paragraph

                                                                                                                                                                                                                                                                                                  ` + +--- + +`This is a paragraph` + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/working-with-text-question-b.md b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/working-with-text-question-b.md new file mode 100644 index 00000000000..a74d8d11452 --- /dev/null +++ b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/working-with-text-question-b.md @@ -0,0 +1,40 @@ +--- +id: 637f4e5f72c65bc8e73dfe28 +videoId: yqcd-XkxZNM +title: Working With Text Question B +challengeType: 15 +dashedName: working-with-text-question-b +--- + +# --description-- + +Headings are different from other HTML text elements: they are displayed larger and bolder than other text to signify that they are headings. + +There are 6 different levels of headings starting from `

                                                                                                                                                                                                                                                                                                  ` to `

                                                                                                                                                                                                                                                                                                  `. The number within a heading tag represents that heading’s level. The largest and most important heading is `h1`, while `h6` is the tiniest heading at the lowest level. + +Headings are defined much like paragraphs. For example, to create an `h1` heading, we wrap our heading text in a `

                                                                                                                                                                                                                                                                                                  ` tag. + + + +Using the correct level of heading is important as levels provide a hierarchy to the content. An `h1` heading should always be used for the heading of the overall page, and the lower level headings should be used as the headings for content in smaller sections of the page. + +# --question-- +## --text-- + +How many different levels of headings are there and what is the difference between them? + +## --answers-- + +There are 5 different levels of headings. `h5` is the smallest and least important heading, and `h1` is the largest and most important heading. + +--- + +There are 6 different levels of headings. `h6` is the largest and most important heading, and `h1` is the smallest and least important heading. + +--- + +There are 6 different levels of headings. `h1` is the largest and most important heading, and `h6` is the smallest and least important heading. + +## --video-solution-- + +3 diff --git a/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/working-with-text-question-c.md b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/working-with-text-question-c.md new file mode 100644 index 00000000000..6ccf0e06658 --- /dev/null +++ b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/working-with-text-question-c.md @@ -0,0 +1,47 @@ +--- +id: 637f4e6672c65bc8e73dfe29 +videoId: gW6cBZLUk6M +title: Working With Text Question C +challengeType: 15 +dashedName: working-with-text-question-c +--- + +# --description-- + +The `` element makes text bold. It also semantically marks text as important; this affects tools, like screen readers, that users with visual impairments will rely on to use your website. The tone of voice on some screen readers will change to communicate the importance of the text within a `strong` element. To define a `strong` element you wrap text content in a `` tag. + +You can use `strong` on its own: + + + +But you will probably find yourself using the `strong` element much more in combination with other text elements, like this: + + + +Sometimes you will want to make text bold without giving it an important meaning. You’ll learn how to do that in the CSS lessons later in the curriculum. + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s HTML Bold and Italic Text Video above. + +## --text-- + +What element should you use to make text bold and important? + +## --answers-- + +`This is an important message` + +--- + +`

                                                                                                                                                                                                                                                                                                  This is an important message

                                                                                                                                                                                                                                                                                                  ` + +--- + +`This is an important message` + +## --video-solution-- + +3 diff --git a/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/working-with-text-question-d.md b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/working-with-text-question-d.md new file mode 100644 index 00000000000..d6647f9a7ea --- /dev/null +++ b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/working-with-text-question-d.md @@ -0,0 +1,39 @@ +--- +id: 637f4e6e72c65bc8e73dfe2a +videoId: gW6cBZLUk6M +title: Working With Text Question D +challengeType: 15 +dashedName: working-with-text-question-d +--- + +# --description-- + +The `em` element makes text italic. It also semantically places emphasis on the text, which again may affect things like screen readers. To define an emphasized element you wrap text content in a `` tag. + +To use `em` on its own: + + +Again, like the `strong` element, you will find yourself mostly using the `em` element with other text elements: + + + +# --question-- +## --text-- + +What element should you use to make text italicized to add emphasis? + +## --answers-- + +`This is an italic message` + +--- + +`This is an italic message` + +--- + +`This is an italic message` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/working-with-text-question-e.md b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/working-with-text-question-e.md new file mode 100644 index 00000000000..d022a6331e9 --- /dev/null +++ b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/working-with-text-question-e.md @@ -0,0 +1,66 @@ +--- +id: 637f4e7972c65bc8e73dfe2b +videoId: gW6cBZLUk6M +title: Working With Text Question E +challengeType: 15 +dashedName: working-with-text-question-e +--- + +# --description-- + +You may have noticed that in all the examples in this lesson you indent any elements that are within other elements. This is known as nesting elements. + +When you nest elements within other elements, you create a parent and child relationship between them. The nested elements are the children and the element they are nested within is the parent. + +In the following example, the `body` element is the parent and the `p` is the child: + +```html + + + + +

                                                                                                                                                                                                                                                                                                  Lorem ipsum dolor sit amet.

                                                                                                                                                                                                                                                                                                  + + +``` + +Just as in human relationships, HTML parent elements can have many children. Elements at the same level of nesting are considered to be siblings. + +For example, the two `p` elements in the following code are siblings, since they are both children of the `body` tag and are at the same level of nesting as each other: + +```html + + + + +

                                                                                                                                                                                                                                                                                                  Lorem ipsum dolor sit amet.

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Ut enim ad minim veniam.

                                                                                                                                                                                                                                                                                                  + + +``` + +You use indentation to make the level of nesting clear and readable for yourselves and other developers who will work with your HTML in the future. It is recommended to indent any child elements by two spaces. + +The parent, child, and sibling relationships between elements will become much more important later when you start styling your HTML with CSS and adding behavior with JavaScript. For now, however, it is just important to know the distinction between how elements are related and the terminology used to describe their relationships. + +# --question-- + +## --text-- + +What relationship do two elements have if they are at the same level of nesting? + +## --answers-- + +The elements are each other's parents. + +--- + +The elements are each other's children. + +--- + +The elements are siblings. + +## --video-solution-- + +3 diff --git a/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/working-with-text-question-f.md b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/working-with-text-question-f.md new file mode 100644 index 00000000000..2ace3f4e36d --- /dev/null +++ b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/working-with-text-question-f.md @@ -0,0 +1,67 @@ +--- +id: 637f4e8072c65bc8e73dfe2c +videoId: gW6cBZLUk6M +title: Working With Text Question F +challengeType: 15 +dashedName: working-with-text-question-f +--- + +# --description-- + +You may have noticed that in all the examples in this lesson you indent any elements that are within other elements. This is known as nesting elements. + +When you nest elements within other elements, you create a parent and child relationship between them. The nested elements are the children and the element they are nested within is the parent. + +In the following example, the body element is the parent and the paragraph is the child: + +```html + + + + +

                                                                                                                                                                                                                                                                                                  Lorem ipsum dolor sit amet.

                                                                                                                                                                                                                                                                                                  + + +``` + +Just as in human relationships, HTML parent elements can have many children. Elements at the same level of nesting are considered to be siblings. + +For example, the two paragraphs in the following code are siblings, since they are both children of the body tag and are at the same level of nesting as each other: + +```html + + + + +

                                                                                                                                                                                                                                                                                                  Lorem ipsum dolor sit amet.

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Ut enim ad minim veniam.

                                                                                                                                                                                                                                                                                                  + + +``` + +You use indentation to make the level of nesting clear and readable for yourselves and other developers who will work with your HTML in the future. It is recommended to indent any child elements by two spaces. + +The parent, child, and sibling relationships between elements will become much more important later when you start styling your HTML with CSS and adding behavior with JavaScript. For now, however, it is just important to know the distinction between how elements are related and the terminology used to describe their relationships. + +# --question-- + +## --text-- + +What relationship does an element have with any nested element within it? + +## --answers-- + +The element within the other element is called the parent element. + +--- + +The element within the other element is called the child element. + +--- + +The element within the other element is called the sibling element. + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/working-with-text-question-g.md b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/working-with-text-question-g.md new file mode 100644 index 00000000000..fe83f0ef062 --- /dev/null +++ b/curriculum/challenges/portuguese/10-coding-interview-prep/the-odin-project/working-with-text-question-g.md @@ -0,0 +1,49 @@ +--- +id: 637f4e8772c65bc8e73dfe2d +videoId: gW6cBZLUk6M +title: Working With Text Question G +challengeType: 15 +dashedName: working-with-text-question-g +--- + +# --description-- + +HTML comments are not visible to the browser; they allow us to comment on your code so that other developers or your future selves can read them and get some context about something that might not be clear in the code. + +Writing an HTML comment is simple: You just enclose the comment with ``tags. For example: + +```html +

                                                                                                                                                                                                                                                                                                  View the html to see the hidden comments

                                                                                                                                                                                                                                                                                                  + + + +

                                                                                                                                                                                                                                                                                                  Some paragraph text

                                                                                                                                                                                                                                                                                                  + + +``` + +# --question-- + +## --assignment-- + +To get some practice working with text in HTML, create a plain blog article page which uses different headings, uses paragraphs, and has some text in the paragraphs bolded and italicized. You can use [Lorem Ipsum](https://loremipsum.io) to generate dummy text, in place of real text as you build your sites. + +## --text-- + +How do you create HTML comments? + +## --answers-- + +`/* This is an HTML comment */` + +--- + +`` + +--- + +`<-- This is an HTML comment --!>` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d1ac33c68d27dcda5796.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d1ac33c68d27dcda5796.md index 98335941962..6d7aa7b3785 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d1ac33c68d27dcda5796.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d1ac33c68d27dcda5796.md @@ -14,13 +14,25 @@ Gire o elemento `.back-mountain` `45deg` no sentido horário. Então, dê a prop Você deve usar a propriedade `transform` para girar o elemento. ```js -assert.notEmpty(new __helpers.CSSHelp(document).getStyle('.back-mountain')?.transform); +const backMountain = new __helpers.CSSHelp(document).getStyle('.back-mountain'); + +if (backMountain?.transform) { + assert.notEmpty(backMountain?.transform); +} else { + assert.notEmpty(backMountain?.rotate); +} ``` Você deve dar aos elementos `.back-mountain` um `transform` de `--fcc-expected--`, mas foi encontrado `--fcc-actual--`. ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.back-mountain')?.transform, 'rotate(45deg)'); +const backMountain = new __helpers.CSSHelp(document).getStyle('.back-mountain'); + +if (backMountain?.transform) { + assert.equal(backMountain?.transform, 'rotate(45deg)'); +} else { + assert.equal(backMountain?.rotate, '45deg'); +} ``` Você deve dar a `.back-mountain` uma propriedade `left`. diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d229b0e542520cd91c685.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d229b0e542520cd91c685.md index b30844fbc64..a0b846653b0 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d229b0e542520cd91c685.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d229b0e542520cd91c685.md @@ -14,13 +14,25 @@ Para fazer com que os pés do pinguim pareçam mais _como os de um pinguim_, gir Você deve dar ao `.foot.left` uma `transform` de `rotate(80deg)`. ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.foot.left').getPropVal('transform', true), 'rotate(80deg)'); +const leftFoot = new __helpers.CSSHelp(document).getStyle('.foot.left'); + +if (leftFoot?.transform) { + assert.equal(leftFoot.getPropVal('transform', true), 'rotate(80deg)'); +} else { + assert.equal(leftFoot.getPropVal('rotate', true), '80deg'); +} ``` Você deve dar ao `.foot.right` uma `transform` de `rotate(-80deg)`. ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.foot.right').getPropVal('transform', true), 'rotate(-80deg)'); +const rightFoot = new __helpers.CSSHelp(document).getStyle('.foot.right'); + +if (rightFoot?.transform) { + assert.equal(rightFoot.getPropVal('transform', true), 'rotate(-80deg)'); +} else { + assert.equal(rightFoot.getPropVal('rotate', true), '-80deg'); +} ``` # --seed-- diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2d4e80400325ff89664a.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2d4e80400325ff89664a.md index ff9ba5fbcf9..fa10052d8df 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2d4e80400325ff89664a.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2d4e80400325ff89664a.md @@ -14,7 +14,14 @@ Para manter o gradiente linear sobre o lado correto do braço esquerdo do pingui Você deve dar a `.arm.left` uma `transform` de `rotate(130deg) scaleX(-1)`. ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.arm.left').getPropVal('transform', true), 'rotate(130deg)scaleX(-1)'); +const leftArm = new __helpers.CSSHelp(document).getStyle('.arm.left'); + +if (leftArm?.rotate && leftArm?.transform) { + assert.equal(leftArm.getPropVal('rotate', true), '130deg'); + assert.equal(leftArm.getPropVal('transform', true), 'scaleX(-1)'); +} else { + assert.equal(leftArm.getPropVal('transform', true), 'rotate(130deg)scaleX(-1)'); +} ``` # --seed-- @@ -281,7 +288,6 @@ body { top: 35%; left: 5%; transform-origin: top left; - } --fcc-editable-region-- diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2ebc81ba81271460850d.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2ebc81ba81271460850d.md index bc7310431da..9934a6ecfdd 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2ebc81ba81271460850d.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2ebc81ba81271460850d.md @@ -14,7 +14,13 @@ Gire o braço direito `45deg` no sentido anti-horário. Você deve dar ao `.arm.right` uma `transform` de `rotate(-45deg)`. ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.arm.right')?.getPropVal('transform', true), 'rotate(-45deg)'); +const rightArm = new __helpers.CSSHelp(document).getStyle('.arm.right'); + +if (rightArm?.transform) { + assert.equal(rightArm?.getPropVal('transform', true), 'rotate(-45deg)'); +} else { + assert.equal(rightArm?.getPropVal('rotate', true), '-45deg'); +} ``` # --seed-- @@ -287,7 +293,6 @@ body { .arm.right { top: 0%; right: -5%; - } --fcc-editable-region-- diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d32c7fa21f32aaa91d499.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d32c7fa21f32aaa91d499.md index d6fdb0028ab..3f18206f857 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d32c7fa21f32aaa91d499.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d32c7fa21f32aaa91d499.md @@ -14,7 +14,16 @@ No primeiro ponto de divisão, gire `110deg` e mantenha o dimensionamento do bra Você deve dar ao ponto de divisão `10%` um `transform` de `rotate(110deg) scaleX(-1)`. ```js -assert([...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '10%')?.style?.transform?.replace(/\s+/g, '') === 'rotate(110deg)scaleX(-1)'); +const wave10Percent = [...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '10%'); +const rotateProp = wave10Percent?.style?.rotate?.replace(/\s+/g, ''); +const transformProp = wave10Percent?.style?.transform?.replace(/\s+/g, ''); + +if (rotateProp && transformProp) { + assert(rotateProp === '110deg'); + assert(transformProp === 'scaleX(-1)'); +} else { + assert(transformProp === 'rotate(110deg)scaleX(-1)'); +} ``` # --seed-- diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d333b738e3c2b5d58b095.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d333b738e3c2b5d58b095.md index b7d8e1cc86b..6e03cebb1e1 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d333b738e3c2b5d58b095.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d333b738e3c2b5d58b095.md @@ -14,7 +14,16 @@ No segundo ponto de divisão, gire `130deg` e mantenha o dimensionamento do bra Você deve dar ao ponto de divisão `20%` um `transform` de `rotate(130deg) scaleX(-1)`. ```js -assert([...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '20%')?.style?.transform?.replace(/\s+/g, '') === 'rotate(130deg)scaleX(-1)'); +const wave20Percent = [...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '20%'); +const transformProp = wave20Percent?.style?.transform?.replace(/\s+/g, ''); +const rotateProp = wave20Percent?.style?.rotate?.replace(/\s+/g, ''); + +if (rotateProp && transformProp) { + assert(rotateProp === '130deg'); + assert(transformProp === 'scaleX(-1)'); +} else { + assert(transformProp === 'rotate(130deg)scaleX(-1)'); +} ``` # --seed-- diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d337765b9f02c10e93722.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d337765b9f02c10e93722.md index abc299a7cde..da9ec290be6 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d337765b9f02c10e93722.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d337765b9f02c10e93722.md @@ -14,13 +14,31 @@ Para o terceiro e quarto pontos de divisão, repita o padrão `transform` mais u Você deve dar ao ponto de divisão `30%` um `transform` de `rotate(110deg) scaleX(-1)`. ```js -assert([...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '30%')?.style?.transform?.replace(/\s+/g, '') === 'rotate(110deg)scaleX(-1)'); +const wave30Percent = [...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '30%'); +const transformProp = wave30Percent?.style?.transform?.replace(/\s+/g, ''); +const rotateProp = wave30Percent?.style?.rotate?.replace(/\s+/g, ''); + +if (rotateProp && transformProp) { + assert(rotateProp === '110deg'); + assert(transformProp === 'scaleX(-1)'); +} else { + assert(transformProp === 'rotate(110deg)scaleX(-1)'); +} ``` Você deve dar ao ponto de divisão `40%` um `transform` de `rotate(130deg) scaleX(-1)`. ```js -assert([...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '40%')?.style?.transform?.replace(/\s+/g, '') === 'rotate(130deg)scaleX(-1)'); +const wave40Percent = [...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '40%'); +const transformProp = wave40Percent?.style?.transform?.replace(/\s+/g, ''); +const rotateProp = wave40Percent?.style?.rotate?.replace(/\s+/g, ''); + +if (rotateProp && transformProp) { + assert(rotateProp === '130deg'); + assert(transformProp === 'scaleX(-1)'); +} else { + assert(transformProp === 'rotate(130deg)scaleX(-1)'); +} ``` # --seed-- diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98f0.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98f0.md index e68ba1fc313..7578ce578a1 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98f0.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98f0.md @@ -16,11 +16,11 @@ gradient-type( ); ``` -No exemplo, `color1` é sólido no topo, `color2` é sólido na parte inferior, e entre elas as transições acontecem igualmente de uma para a outra. Em `.bb1a`, adicione um gradiente do tipo `linear-gradient` à propriedade `background` com `--building-color1` como a primeira cor e `--window-color1` como a segunda. +No exemplo, `color1` é sólido no topo, `color2` é sólido na parte inferior, e entre elas as transições acontecem igualmente de uma para a outra. Em `.bb1a`, adicione uma propriedade `background` abaixo da propriedade `background-color`. Defina-a como um gradiente do tipo `linear-gradient`, que usa `--building-color1` como a primeira cor e `--window-color1` como a segunda. # --hints-- -Você deve aplicar um `background` para `.bb1a`. +Você deve aplicar um `background` a `.bb1a` logo após a `background-color`. ```js assert(new __helpers.CSSHelp(document).getStyle('.bb1a')?.background); diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa2407b521be39a3de7be1.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa2407b521be39a3de7be1.md index 1360ec7e5a3..86487b3db06 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa2407b521be39a3de7be1.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa2407b521be39a3de7be1.md @@ -45,7 +45,7 @@ assert(document.querySelector('a').getAttribute('target') === '_blank');

                                                                                                                                                                                                                                                                                                  Cat Photos

                                                                                                                                                                                                                                                                                                  --fcc-editable-region-- -

                                                                                                                                                                                                                                                                                                  See more cat photos in our gallery.

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  See more cat photos in our gallery.

                                                                                                                                                                                                                                                                                                  --fcc-editable-region-- A cute orange cat lying on its back. diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60fab9f17fa294054b74228c.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60fab9f17fa294054b74228c.md index e5662d847fb..b0c12847e87 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60fab9f17fa294054b74228c.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60fab9f17fa294054b74228c.md @@ -9,7 +9,7 @@ dashedName: step-31 Agora vamos fazer o último `fieldset`. E se você quiser permitir que um usuário faça o upload de uma foto de perfil? -Bom, o `input` de tipo `file` permite isso. Add a `label` with the text `Upload a profile picture:`, and nest an `input` accepting a file upload. +Bom, o `input` de tipo `file` permite isso. Adicione um `label` com o texto `Upload a profile picture:` e insira nele um `input` que aceite o upload de arquivos. # --hints-- diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2abbe7d18d49a1e0e1c8.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2abbe7d18d49a1e0e1c8.md index 772fd724373..be030900809 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2abbe7d18d49a1e0e1c8.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2abbe7d18d49a1e0e1c8.md @@ -39,13 +39,15 @@ assert(document.querySelector('h1')?.innerText === 'Nutrition Facts'); --fcc-editable-region-- - - - Nutrition Label - - - + + + Nutrition Label + + + + + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2d4150fe0d4cbd0f2628.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2d4150fe0d4cbd0f2628.md index cbed848cba9..63175aa0d1a 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2d4150fe0d4cbd0f2628.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2d4150fe0d4cbd0f2628.md @@ -43,14 +43,16 @@ assert(document.querySelector('p')?.innerText === '8 servings per container'); --fcc-editable-region-- - - - Nutrition Label - - -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  - + + + Nutrition Label + + + +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  + + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34948891834dd77655a6.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34948891834dd77655a6.md index e6b995f5913..9bf1b857193 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34948891834dd77655a6.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34948891834dd77655a6.md @@ -43,15 +43,17 @@ assert(document.querySelectorAll('p')?.[1]?.innerText === 'Serving size 2/3 cup --fcc-editable-region-- - - - Nutrition Label - - -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  - + + + Nutrition Label + + + +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  + + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34ecc1091b4fd5a8a484.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34ecc1091b4fd5a8a484.md index faf88371440..6e9fc2fdcd9 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34ecc1091b4fd5a8a484.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34ecc1091b4fd5a8a484.md @@ -49,16 +49,18 @@ assert(links.find(link => link?.getAttribute('href') === 'https://fonts.googleap --fcc-editable-region-- - - - Nutrition Label - - -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  - + + + Nutrition Label + + + + +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f357957e370510f21ea16.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f357957e370510f21ea16.md index 81cab57e1f8..4d205ed44d4 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f357957e370510f21ea16.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f357957e370510f21ea16.md @@ -32,17 +32,19 @@ assert(new __helpers.CSSHelp(document).getStyle('body')?.fontFamily === '"Open S ```html - - - Nutrition Label - - - - -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f378014c2da526a109c81.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f378014c2da526a109c81.md index c27ad3b061d..b8f6feba158 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f378014c2da526a109c81.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f378014c2da526a109c81.md @@ -30,17 +30,19 @@ assert(new __helpers.CSSHelp(document).getStyle('html')?.fontSize === '16px'); ```html - - - Nutrition Label - - - - -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38279e5c3d53692ea441.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38279e5c3d53692ea441.md index 0de58ffda8c..2f85c35aa13 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38279e5c3d53692ea441.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38279e5c3d53692ea441.md @@ -37,18 +37,20 @@ assert(children?.every(child => child?.parentElement?.classList?.contains('label ```html - - - Nutrition Label - - - + + + + Nutrition Label + + + + --fcc-editable-region-- - -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  - + +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38cabc64e3556f98cc1a.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38cabc64e3556f98cc1a.md index e57a7c41fc3..bf39999cde6 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38cabc64e3556f98cc1a.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38cabc64e3556f98cc1a.md @@ -32,19 +32,21 @@ assert(new __helpers.CSSHelp(document).getStyle('.label')?.border === '2px solid ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3949f58e12577dcefb00.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3949f58e12577dcefb00.md index 2478cb242c9..d6a0be42bea 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3949f58e12577dcefb00.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3949f58e12577dcefb00.md @@ -26,19 +26,21 @@ assert(new __helpers.CSSHelp(document).getStyle('.label')?.width === '270px'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f39d7da41b15851fa3fb9.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f39d7da41b15851fa3fb9.md index f7152bbde01..1e3a8309c62 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f39d7da41b15851fa3fb9.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f39d7da41b15851fa3fb9.md @@ -30,19 +30,21 @@ assert(new __helpers.CSSHelp(document).getStyle('.label')?.padding === '0px 7px' ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3b091162165948e1cb33.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3b091162165948e1cb33.md index 3ae68f4a322..ab4e279b73c 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3b091162165948e1cb33.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3b091162165948e1cb33.md @@ -32,19 +32,21 @@ assert(new __helpers.CSSHelp(document).getStyle('*')?.boxSizing === 'border-box' ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3cafd794015aa9547a6d.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3cafd794015aa9547a6d.md index 763968a6a76..d00a5bb7a8f 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3cafd794015aa9547a6d.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3cafd794015aa9547a6d.md @@ -32,19 +32,21 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')?.fontWeight === '800'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3d9e59db4b5b8e960762.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3d9e59db4b5b8e960762.md index 5c4bed1b79b..a254929cf84 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3d9e59db4b5b8e960762.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3d9e59db4b5b8e960762.md @@ -24,19 +24,21 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')?.textAlign === 'center'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e1b7233ee5c7595771f.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e1b7233ee5c7595771f.md index ff621856643..5ebafcb1fec 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e1b7233ee5c7595771f.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e1b7233ee5c7595771f.md @@ -24,19 +24,21 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')?.margin === '-4px 0px'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e4af8008c5d494d3afe.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e4af8008c5d494d3afe.md index c83a4c2ae32..9bace4c5a24 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e4af8008c5d494d3afe.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e4af8008c5d494d3afe.md @@ -30,19 +30,21 @@ assert(new __helpers.CSSHelp(document).getStyle('p')?.margin === '0px'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3ed16592445e57941aec.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3ed16592445e57941aec.md index 145f16b0268..b76af92cfbc 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3ed16592445e57941aec.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3ed16592445e57941aec.md @@ -44,21 +44,23 @@ assert(document.querySelector('.divider')?.previousElementSibling?.localName === ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  --fcc-editable-region-- - + ``` diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f405b89a7ec5f8e2d11f4.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f405b89a7ec5f8e2d11f4.md index aae78301064..4f0b044737a 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f405b89a7ec5f8e2d11f4.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f405b89a7ec5f8e2d11f4.md @@ -36,20 +36,22 @@ assert(new __helpers.CSSHelp(document).getStyle('.divider')?.margin === '2px 0px ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f40b01f680e608d360ed4.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f40b01f680e608d360ed4.md index eb1b58b825f..d721b05af9e 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f40b01f680e608d360ed4.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f40b01f680e608d360ed4.md @@ -26,20 +26,22 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')?.letterSpacing === '0.15px ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4172e9eec061d6456221.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4172e9eec061d6456221.md index 283c8774d8d..cd37b6f17c0 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4172e9eec061d6456221.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4172e9eec061d6456221.md @@ -32,22 +32,24 @@ assert(!document.querySelector('p')?.classList?.contains('bold')); ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  --fcc-editable-region-- - + ``` diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f41c979787462e76dab90.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f41c979787462e76dab90.md index 06714a6aecc..f4fa3fee9cb 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f41c979787462e76dab90.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f41c979787462e76dab90.md @@ -44,20 +44,22 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + ``` diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f423cf65d5864132a0956.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f423cf65d5864132a0956.md index 522700f9d27..92d1913747b 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f423cf65d5864132a0956.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f423cf65d5864132a0956.md @@ -24,22 +24,24 @@ assert(document.querySelector('h1')?.classList?.contains('bold')); ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  --fcc-editable-region-- - + ``` diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f42a021625f656101ef93.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f42a021625f656101ef93.md index ad0fe4e3b36..dd1ba05db3f 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f42a021625f656101ef93.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f42a021625f656101ef93.md @@ -9,7 +9,7 @@ dashedName: step-22 Espaçamento horizontal entre elementos igualmente importantes pode aumentar a legibilidade do texto. -Envolva o texto `2/3 cup (55g)` em um elemento `span` e dê a ele um atributo `class` definido como `right`. +Envolva o texto `2/3 cup (55g)` em um elemento `span`. # --hints-- @@ -19,12 +19,6 @@ Você deve criar um elemento `span`. assert(document.querySelector('span')); ``` -O novo elemento `span` deve ter o atributo `class` definido como `right`. - -```js -assert(document.querySelector('span')?.classList?.contains('right')); -``` - O elemento `span` deve ter o texto `2/3 cup (55g)`. ```js @@ -44,22 +38,24 @@ assert(document.querySelectorAll('p')?.[1]?.innerText === 'Serving size 2/3 cup ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  --fcc-editable-region-- - + ``` diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4bfb9de4a16703b56eb6.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4bfb9de4a16703b56eb6.md index dab1f34db2a..4cc9a5f6397 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4bfb9de4a16703b56eb6.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4bfb9de4a16703b56eb6.md @@ -7,22 +7,20 @@ dashedName: step-23 # --description-- -A propriedade `float` é usada para colocar um elemento à esquerda ou à direita de seu contêiner, permitindo que outro conteúdo (como texto) seja encapsulado em torno dele. - -Crie um novo seletor `.right` e defina a propriedade `float` para `right`. +Agora, podemos adicionar o espaçamento horizontal usando `flex`. No seletor `p`, adicione uma propriedade `display` definida como `flex` e uma propriedade `justify-content` definida como `space-between`. # --hints-- -Você deve criar um novo seletor `.right`. +O seletor `p` deve ter a propriedade `display` definida como `flex`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.right')); +assert(new __helpers.CSSHelp(document).getStyle('p')?.display === 'flex'); ``` -O seletor `.right` deve ter uma propriedade `float` definida como `right`. +O seletor `p` deve ter uma propriedade `justify-content` definida como `space-between`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.right')?.float === 'right'); +assert(new __helpers.CSSHelp(document).getStyle('p')?.justifyContent === 'space-between'); ``` # --seed-- @@ -32,20 +30,22 @@ assert(new __helpers.CSSHelp(document).getStyle('.right')?.float === 'right'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + ``` @@ -75,9 +75,11 @@ h1 { letter-spacing: 0.15px } +--fcc-editable-region-- p { margin: 0; } +--fcc-editable-region-- .divider { border-bottom: 1px solid #888989; @@ -87,8 +89,4 @@ p { .bold { font-weight: 800; } - ---fcc-editable-region-- - ---fcc-editable-region-- ``` diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ce9d877b668417c0c42.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ce9d877b668417c0c42.md index f863d79939c..c2275994186 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ce9d877b668417c0c42.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ce9d877b668417c0c42.md @@ -40,22 +40,24 @@ assert(children?.[3]?.localName === 'p'); ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  --fcc-editable-region-- - + ``` @@ -87,6 +89,8 @@ h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -97,8 +101,4 @@ p { .bold { font-weight: 800; } - -.right { - float: right; -} ``` diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4dde9d72e3694cb9ee3b.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4dde9d72e3694cb9ee3b.md index 07c25f6f648..28731addfbd 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4dde9d72e3694cb9ee3b.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4dde9d72e3694cb9ee3b.md @@ -39,22 +39,24 @@ assert(style?.letterSpacing === '0.15px'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + ``` @@ -88,6 +90,8 @@ h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -98,8 +102,4 @@ p { .bold { font-weight: 800; } - -.right { - float: right; -} ``` diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ec58334106a4170c2a8.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ec58334106a4170c2a8.md index b86ef1772a7..576233327e7 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ec58334106a4170c2a8.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ec58334106a4170c2a8.md @@ -7,7 +7,7 @@ dashedName: step-26 # --description-- -Crie um elemento `div` abaixo do elemento `header` e dê a ele um atributo `class` definido como `divider lg`. +Crie um elemento `div` abaixo do elemento `header` e dê a ele um atributo `class` definido como `divider large`. # --hints-- @@ -23,12 +23,12 @@ O novo elemento `div` deve estar depois do elemento `header`. assert(document.querySelector('.label')?.lastElementChild?.localName === 'div'); ``` -O novo elemento `div` deve ter o atributo `class` definido como `divider lg`. +O novo elemento `div` deve ter o atributo `class` definido como `divider large`. ```js const div = document.querySelector('.label')?.lastElementChild; assert(div?.classList?.contains('divider')); -assert(div?.classList?.contains('lg')); +assert(div?.classList?.contains('large')); ``` # --seed-- @@ -38,25 +38,27 @@ assert(div?.classList?.contains('lg')); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  --fcc-editable-region-- --fcc-editable-region-- -
                                                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                                                  + ``` @@ -88,6 +90,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -98,8 +102,4 @@ p { .bold { font-weight: 800; } - -.right { - float: right; -} ``` diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4f9e4a40566b776a8f38.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4f9e4a40566b776a8f38.md index 383b5bc1c11..04fdf43f472 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4f9e4a40566b776a8f38.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4f9e4a40566b776a8f38.md @@ -7,32 +7,32 @@ dashedName: step-27 # --description-- -Crie um novo seletor `.lg` e defina a propriedade `height` para `10px`. Também crie um seletor `.lg, .md` e defina a propriedade `background-color` como `black`. +Crie um novo seletor `.large` e defina a propriedade `height` para `10px`. Também crie um seletor `.large, .medium` e defina a propriedade `background-color` como `black`. # --hints-- -Você deve ter um novo seletor `.lg`. +Você deve ter um novo seletor `.large`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg')); +assert(new __helpers.CSSHelp(document).getStyle('.large')); ``` -O seletor `.lg` deve ter a propriedade `height` definida como `10px`. +O seletor `.large` deve ter a propriedade `height` definida como `10px`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg')?.height === '10px'); +assert(new __helpers.CSSHelp(document).getStyle('.large')?.height === '10px'); ``` -Você deve ter um novo seletor `.lg, .md`. +Você deve ter um novo seletor `.large, .medium`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')); +assert(new __helpers.CSSHelp(document).getStyle('.large, .medium')); ``` -O seletor `.lg, .md` deve ter a propriedade `background-color` definida como `black`. +O seletor `.large, .medium` deve ter a propriedade `background-color` definida como `black`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')?.backgroundColor === 'black'); +assert(new __helpers.CSSHelp(document).getStyle('.large, .medium')?.backgroundColor === 'black'); ``` # --seed-- @@ -42,23 +42,25 @@ assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')?.backgroundColor === ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + ``` @@ -90,6 +92,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -101,10 +105,6 @@ p { font-weight: 800; } -.right { - float: right; -} - --fcc-editable-region-- --fcc-editable-region-- diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f50473cc0196c6dd3892a.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f50473cc0196c6dd3892a.md index b5963577d9b..154817f0e16 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f50473cc0196c6dd3892a.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f50473cc0196c6dd3892a.md @@ -7,16 +7,16 @@ dashedName: step-28 # --description-- -Você pode notar que ainda há uma pequena borda na parte inferior do seu elemento `.lg`. Para redefinir, dê ao seletor `.lg, .md` uma propriedade `border` definida como `0`. +Você pode notar que ainda há uma pequena borda na parte inferior do seu elemento `.large`. Para redefinir, dê ao seletor `.large, .medium` uma propriedade `border` definida como `0`. -Observação: a classe `md` (médio) será utilizada no passo 37 para as barras mais finas da etiqueta nutricional. +Observação: a classe `medium` (médio) será utilizada no passo 37 para as barras mais finas da etiqueta nutricional. # --hints-- -O seletor `.lg, .md` deve ter a propriedade `border` definida como `0`. +O seletor `.large, .medium` deve ter a propriedade `border` definida como `0`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')?.borderWidth === '0px'); +assert(new __helpers.CSSHelp(document).getStyle('.large, .medium')?.borderWidth === '0px'); ``` # --seed-- @@ -26,23 +26,25 @@ assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')?.borderWidth === '0p ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + ``` @@ -74,6 +76,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -85,16 +89,12 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } --fcc-editable-region-- -.lg, .md { +.large, .medium { background-color: black; } --fcc-editable-region-- diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51257a8a516d80b6c743.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51257a8a516d80b6c743.md index d8be8e7c898..9f0b721f91a 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51257a8a516d80b6c743.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51257a8a516d80b6c743.md @@ -7,7 +7,7 @@ dashedName: step-29 # --description-- -Crie um elemento `div` abaixo do elemento `.lg` e dê a ele um atributo `class` definido como `calories-info`. +Crie um elemento `div` abaixo do elemento `.large` e dê a ele um atributo `class` definido como `calories-info`. # --hints-- @@ -23,10 +23,10 @@ A nova `div` deve ter o atributo `class` definido como `calories-info`. assert(document.querySelector('.label')?.lastElementChild?.classList?.contains('calories-info')); ``` -A nova `div` deve estar depois do elemento `.lg`. +A nova `div` deve estar depois do elemento `.large`. ```js -assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('lg')); +assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('large')); ``` # --seed-- @@ -36,26 +36,28 @@ assert(document.querySelector('.label')?.lastElementChild?.previousElementSiblin ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  --fcc-editable-region-- --fcc-editable-region-- -
                                                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                                                  + ``` @@ -87,6 +89,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -98,15 +102,11 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51e4e5b24a6e80eccce1.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51e4e5b24a6e80eccce1.md index 427c5e3f769..4d0016caeb0 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51e4e5b24a6e80eccce1.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51e4e5b24a6e80eccce1.md @@ -7,27 +7,39 @@ dashedName: step-30 # --description-- -Dentro do elemento `.calories-info`, crie um elemento `p`. Dê àquele elemento `p` um atributo de `class` definido como `bold sm-text` e o texto `Amount per serving`. +Dentro do elemento `.calories-info`, crie um elemento `div`. Dê ao elemento `div` o atributo `class` com o valor de `left-container`. Dentro do elemento `div` recém-criado, crie um elemento `h2` com o texto `Amount per serving`. Dê ao elemento `h2` o atributo `class` com o valor de `bold small-text`. # --hints-- -Você deve criar um elemento `p` dentro do elemento `.calories-info`. +Você deve criar um elemento `div` dentro do elemento `.calories-info`. ```js -assert(document.querySelector('.calories-info')?.children?.[0]?.localName === 'p'); +assert(document.querySelector('.calories-info')?.children?.[0]?.localName === 'div'); ``` -O novo elemento `p` deve ter o atributo `class` definido como `bold sm-text`. +O novo elemento `div` deve ter o atributo `class` definido como `left-container`. ```js -assert(document.querySelector('.calories-info')?.children?.[0]?.classList.contains('bold')); -assert(document.querySelector('.calories-info')?.children?.[0]?.classList.contains('sm-text')); +assert(document.querySelector('.calories-info')?.children?.[0]?.classList.contains('left-container')); ``` -O novo elemento `p` deve ter o texto `Amount per serving`. +Você deve criar um elemento `h2` dentro do elemento `.left-container`. ```js -assert(document.querySelector('.calories-info')?.children?.[0]?.innerText === 'Amount per serving'); +assert(document.querySelector('.left-container')?.children?.[0]?.localName === 'h2'); +``` + +O novo elemento `h2` deve ter o atributo `class` definido como `bold small-text`. + +```js +assert(document.querySelector('.left-container')?.children?.[0]?.classList.contains('bold')); +assert(document.querySelector('.left-container')?.children?.[0]?.classList.contains('small-text')); +``` + +O novo elemento `h2` deve ter o texto `Amount per serving`. + +```js +assert(document.querySelector('.left-container')?.children?.[0]?.innerText === 'Amount per serving'); ``` # --seed-- @@ -37,28 +49,30 @@ assert(document.querySelector('.calories-info')?.children?.[0]?.innerText === 'A ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  ---fcc-editable-region-- -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  - +--fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                  + ``` @@ -90,6 +104,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -101,15 +117,11 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md index 66f59831317..339b8980786 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md @@ -9,20 +9,20 @@ dashedName: step-31 A unidade `rem` representa `root em` e é relativa ao tamanho da fonte do elemento `html`. -Crie um seletor `.sm-text` e defina `font-size` como `0.85rem`, o que representaria aproximadamente `13.6px` (lembre-se de que você definiu o `html` como tendo um `font-size` de `16px`). +Crie um seletor `.small-text` e defina `font-size` como `0.85rem`, o que representaria aproximadamente `13.6px` (lembre-se de que você definiu o `html` como tendo um `font-size` de `16px`). # --hints-- -Você deve ter um seletor `.sm-text`. +Você deve ter um seletor `.small-text`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.sm-text')); +assert(new __helpers.CSSHelp(document).getStyle('.small-text')); ``` -O seletor `.sm-text` deve ter a propriedade `font-size` definida como `0.85rem`. +O seletor `.small-text` deve ter a propriedade `font-size` definida como `0.85rem`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.sm-text')?.fontSize === '0.85rem'); +assert(new __helpers.CSSHelp(document).getStyle('.small-text')?.fontSize === '0.85rem'); ``` # --seed-- @@ -32,26 +32,30 @@ assert(new __helpers.CSSHelp(document).getStyle('.sm-text')?.fontSize === '0.85r ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                                                  + ``` @@ -83,6 +87,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -94,15 +100,11 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5486b8fd4b71633f69b0.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5486b8fd4b71633f69b0.md index f2fe9e18c2b..c7d7215f084 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5486b8fd4b71633f69b0.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5486b8fd4b71633f69b0.md @@ -1,51 +1,50 @@ --- id: 615f5486b8fd4b71633f69b0 -title: Passo 32 +title: Passo 33 challengeType: 0 -dashedName: step-32 +dashedName: step-33 --- # --description-- -Abaixo do elemento `.sm-text`, crie um elemento `h1` com a classe `Calories 230`. Envolva a parte do texto que diz `230` em outro elemento `span` com a `class` definida como `right`. +Abaixo do elemento `.small-text`, crie um elemento `p` com o texto `Calories`. Abaixo do elemento `.left-container`, crie um elemento `span` com o texto `230`. # --hints-- -Você deve ter um elemento `h1` dentro do elemento `.calories-info`. +Você deve ter um elemento `p` dentro do elemento `.calories-info`. ```js -assert(document.querySelector('.calories-info')?.querySelector('h1')) +assert(document.querySelector('.calories-info')?.querySelector('p')) ``` -O elemento `h1` deve vir depois do elemento `.sm-text`. +Você deve ter um novo elemento `span` dentro do elemento `.calories-info`. ```js -assert(document.querySelector('.sm-text')?.nextElementSibling?.localName === 'h1'); +assert(document.querySelector('.calories-info')?.querySelector('span')) ``` -O elemento `h1` deve conter o texto `Calories 230`. +O elemento `p` deve vir depois do elemento `.small-text`. ```js -// the float: right property does weird things to the inner text. -assert(document.querySelector('.calories-info')?.lastElementChild?.innerText.match(/Calories[\s|\n]*230/)); +assert(document.querySelector('.small-text')?.nextElementSibling?.localName === 'p'); ``` -Você deve criar um elemento `span` dentro do elemento `h1`. +O elemento `p` deve conter o texto `Calories`. ```js -assert(document.querySelector('.calories-info')?.lastElementChild?.querySelector('span')); +assert(document.querySelector('.left-container')?.lastElementChild?.innerText === 'Calories'); ``` -O elemento `span` deve ter a `class` definida como `right`. +O elemento `span` deve estar depois do elemento `.left-container`. ```js -assert(document.querySelector('.calories-info')?.lastElementChild?.querySelector('span')?.classList?.contains('right')); +assert(document.querySelector('.left-container')?.nextElementSibling?.localName ==='span'); ``` O elemento `span` deve ter o texto `230`. ```js -assert(document.querySelector('.calories-info')?.lastElementChild?.querySelector('span')?.innerText === '230'); +assert(document.querySelector('.calories-info')?.lastElementChild?.innerText === '230'); ``` # --seed-- @@ -55,28 +54,32 @@ assert(document.querySelector('.calories-info')?.lastElementChild?.querySelector ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

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

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  ---fcc-editable-region--
                                                                                                                                                                                                                                                                                                  - +--fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                  + ``` @@ -108,6 +111,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -119,20 +124,20 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } + +.calories-info h2 { + margin: 0; +} ``` diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f575b50b91e72af079480.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f575b50b91e72af079480.md index 0e6f0d1734c..eff7ba22315 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f575b50b91e72af079480.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f575b50b91e72af079480.md @@ -1,29 +1,41 @@ --- id: 615f575b50b91e72af079480 -title: Passo 33 +title: Passo 35 challengeType: 0 -dashedName: step-33 +dashedName: step-35 --- # --description-- -Crie um seletor `.calories-info h1` definindo as margens superior e inferior como `-5px` e as margens esquerda e direita como `-2px`. +Crie um seletor `.left-container p` definindo as margens superior e inferior como `-5px` e as margens esquerda e direita como `-2px`. Defina também o `font-size` como `2em` e a `font-weight` como `700`. # --hints-- -Você deve ter um novo seletor `.calories-info h1`. +Você deve ter um novo seletor `.left-container p`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.calories-info h1')); +assert(new __helpers.CSSHelp(document).getStyle('.left-container p')); ``` -O novo seletor `.calories-info h1` deve ter a propriedade `margin` definida como `-5px -2px`. +O novo seletor `.left-container p` deve ter a propriedade `margin` definida como `-5px -2px`. ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marginTop, '-5px'); -assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marginBottom, '-5px'); -assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marginLeft, '-2px'); -assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marginRight, '-2px'); +assert.equal(new __helpers.CSSHelp(document).getStyle('.left-container p')?.marginTop, '-5px'); +assert.equal(new __helpers.CSSHelp(document).getStyle('.left-container p')?.marginBottom, '-5px'); +assert.equal(new __helpers.CSSHelp(document).getStyle('.left-container p')?.marginLeft, '-2px'); +assert.equal(new __helpers.CSSHelp(document).getStyle('.left-container p')?.marginRight, '-2px'); +``` + +O novo seletor `.left-container p` deve ter a propriedade `font-size` definida como `2em`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.left-container p')?.fontSize === '2em'); +``` + +O novo seletor `.left-container p` deve ter a propriedade `font-weight` definida como `700`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.left-container p')?.fontWeight === '700'); ``` # --seed-- @@ -33,27 +45,32 @@ assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marg ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                                                                                  + 230
                                                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                                                  + ``` @@ -85,6 +102,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -96,23 +115,29 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + --fcc-editable-region-- --fcc-editable-region-- diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5af373a68e744a3c5a76.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5af373a68e744a3c5a76.md index 015949cd0cd..d94de1ba1ff 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5af373a68e744a3c5a76.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5af373a68e744a3c5a76.md @@ -1,13 +1,13 @@ --- id: 615f5af373a68e744a3c5a76 -title: Passo 34 +title: Passo 36 challengeType: 0 -dashedName: step-34 +dashedName: step-36 --- # --description-- -Crie um seletor `.calories-info span` e defina a `font-size` como `1.2em`. +Crie um seletor `.calories-info span`, ajuste seu `font-size` para `2.4em` e `font-weight` para `700`. # --hints-- @@ -17,10 +17,16 @@ Você deve criar um seletor `.calories-info span`. assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')); ``` -O seletor `.calories-info span` deve ter a propriedade `font-size` definida como `1.2em`. +O seletor `.calories-info span` deve ter a propriedade `font-size` definida como `2.4em`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.fontSize === '1.2em'); +assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.fontSize === '2.4em'); +``` + +O seletor `.calories-info span` deve ter a propriedade `font-weight` definida como `700`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.fontWeight === '700'); ``` # --seed-- @@ -30,27 +36,32 @@ assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.fontSize ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                                                                                  + 230
                                                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                                                  + ``` @@ -82,6 +93,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -93,25 +106,33 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; + font-size: 2em; + font-weight: 700; } --fcc-editable-region-- diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5fd85d0062761f288364.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5fd85d0062761f288364.md index ffb15a45420..17814620a29 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5fd85d0062761f288364.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5fd85d0062761f288364.md @@ -1,22 +1,22 @@ --- id: 615f5fd85d0062761f288364 -title: Passo 36 +title: Passo 37 challengeType: 0 -dashedName: step-36 +dashedName: step-37 --- # --description-- A tipografia é frequentemente mais arte do que a ciência. Você pode ter que ajustar coisas como alinhamento até que pareça correto. -Dê ao seletor `.calories-info span` uma `margin-top` definida como `-7px`. Isto deixará o texto `230` no lugar. +Dê ao seletor `.calories-info span` uma `margin` definida como `-7px -2px`. Isto deixará o texto `230` no lugar. # --hints-- -O seletor `.calories-info span` uma `margin-top` definida em `-7px`. +O seletor `.calories-info span` uma `margin` definida em `-7px -2px`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.marginTop === '-7px'); +assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.margin === '-7px -2px'); ``` # --seed-- @@ -26,27 +26,32 @@ assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.marginTo ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                                                                                  + 230
                                                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                                                  + ``` @@ -78,6 +83,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -89,31 +96,39 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } --fcc-editable-region-- .calories-info span { - font-size: 1.2em; + font-size: 2.4em; + font-weight: 700; } --fcc-editable-region-- ``` diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f61338c8ca176d6445574.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f61338c8ca176d6445574.md index 1cbed9121c7..b0a854dae9e 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f61338c8ca176d6445574.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f61338c8ca176d6445574.md @@ -1,13 +1,13 @@ --- id: 615f61338c8ca176d6445574 -title: Passo 37 +title: Passo 38 challengeType: 0 -dashedName: step-37 +dashedName: step-38 --- # --description-- -Abaixo do elemento `.calories-info`, adicione uma `div` com o atributo `class` definido como `divider md`. +Abaixo do elemento `.calories-info`, adicione uma `div` com o atributo `class` definido como `divider medium`. # --hints-- @@ -17,11 +17,11 @@ Você deve criar um `div` dentro do elemento `.label`. assert(document.querySelectorAll('.label > div')?.length === 3) ``` -A nova `div` deve ter o atributo `class` definido como `divider md`. Esta div deve ser o último elemento no elemento `.label`. +A nova `div` deve ter o atributo `class` definido como `divider medium`. Esta div deve ser o último elemento no elemento `.label`. ```js const div = document.querySelector('.label')?.lastElementChild; -assert(div?.classList?.contains('divider') && div?.classList?.contains('md')); +assert(div?.classList?.contains('divider') && div?.classList?.contains('medium')); ``` # --seed-- @@ -31,30 +31,35 @@ assert(div?.classList?.contains('divider') && div?.classList?.contains('md')); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                                                                                  + 230 +
                                                                                                                                                                                                                                                                                                  --fcc-editable-region-- --fcc-editable-region-- -
                                                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                                                  + ``` @@ -86,6 +91,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -97,30 +104,38 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; } ``` diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f666ac5edea782feb7e75.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f666ac5edea782feb7e75.md index e80f0be30a5..2cc685be84c 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f666ac5edea782feb7e75.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f666ac5edea782feb7e75.md @@ -1,26 +1,26 @@ --- id: 615f666ac5edea782feb7e75 -title: Passo 38 +title: Passo 39 challengeType: 0 -dashedName: step-38 +dashedName: step-39 --- # --description-- -Crie um seletor `.md` e defina a propriedade `height` como `5px`. +Crie um seletor `.medium` e defina a propriedade `height` como `5px`. # --hints-- -Você deve criar um seletor `.md`. +Você deve criar um seletor `.medium`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.md')); +assert(new __helpers.CSSHelp(document).getStyle('.medium')); ``` -O seletor `.md` deve ter a propriedade `height` definida como `5px`. +O seletor `.medium` deve ter a propriedade `height` definida como `5px`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.md')?.height === '5px'); +assert(new __helpers.CSSHelp(document).getStyle('.medium')?.height === '5px'); ``` # --seed-- @@ -30,28 +30,33 @@ assert(new __helpers.CSSHelp(document).getStyle('.md')?.height === '5px'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  + 230
                                                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + ``` @@ -83,6 +88,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -94,15 +101,11 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } @@ -111,17 +114,29 @@ p { --fcc-editable-region-- -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; } ``` diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f671b6d1919792745aa5d.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f671b6d1919792745aa5d.md index 068e645fb86..fada20c0bff 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f671b6d1919792745aa5d.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f671b6d1919792745aa5d.md @@ -1,29 +1,29 @@ --- id: 615f671b6d1919792745aa5d -title: Passo 39 +title: Passo 40 challengeType: 0 -dashedName: step-39 +dashedName: step-40 --- # --description-- -Crie um elemento `div` abaixo do elemento `.md`. Dê a ele um atributo `class` definido como `daily-value sm-text`. Dentro dessa nova `div`, adicione um elemento `p` com o texto `% Daily Value *` e defina o atributo `class` como `right bold`. +Crie um elemento `div` abaixo do elemento `.medium`. Dê a ele um atributo `class` definido como `daily-value small-text`. Dentro dessa nova `div`, adicione um elemento `p` com o texto `% Daily Value *` e defina o atributo `class` como `bold right`. # --hints-- -Você deve criar um elemento `div` após o elemento `.md`. +Você deve criar um elemento `div` após o elemento `.medium`. ```js assert(document.querySelector('.label')?.lastElementChild?.localName === 'div'); assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('divider')); -assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('md')); +assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('medium')); ``` -A nova `div` deve ter o atributo `class` definido como `daily-value sm-text`. +A nova `div` deve ter o atributo `class` definido como `daily-value small-text`. ```js assert(document.querySelector('.label')?.lastElementChild?.classList?.contains('daily-value')); -assert(document.querySelector('.label')?.lastElementChild?.classList?.contains('sm-text')); +assert(document.querySelector('.label')?.lastElementChild?.classList?.contains('small-text')); ``` O novo elemento `div` deve ter um elemento `p`. @@ -38,11 +38,11 @@ O novo elemento `p` deve ter o texto `% Daily Value *`. assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.textContent === '% Daily Value *'); ``` -O novo elemento `p` deve ter o atributo `class` definido como `right bold`. +O novo elemento `p` deve ter o atributo `class` definido como `bold right`. ```js -assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.classList?.contains('right')); assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.classList?.contains('right')); ``` # --seed-- @@ -52,32 +52,36 @@ assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.cl ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  ---fcc-editable-region-- ---fcc-editable-region-- + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                                                                                  + 230
                                                                                                                                                                                                                                                                                                  - + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                  + + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                  + ``` @@ -109,6 +113,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -120,34 +126,42 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; } ``` diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6823d0815b7a991f2a75.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6823d0815b7a991f2a75.md index bbb58054527..8f2d72b548f 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6823d0815b7a991f2a75.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6823d0815b7a991f2a75.md @@ -1,32 +1,32 @@ --- id: 615f6823d0815b7a991f2a75 -title: Passo 40 +title: Passo 42 challengeType: 0 -dashedName: step-40 +dashedName: step-42 --- # --description-- -A estilização `float` está fazendo com que o novo elemento `p` fique fora da borda do rótulo. Use o elemento `.divider` existente como um exemplo para adicionar um novo divisor após o elemento `p`. +Use o elemento `.divider` existente como um exemplo para adicionar um novo divisor após o elemento `p`. # --hints-- -Você deve criar um `div` dentro do elemento `.daily-value.sm-text`. +Você deve criar um `div` dentro do elemento `.daily-value`. ```js -assert(document.querySelectorAll('.daily-value.sm-text > div')?.length === 1) +assert(document.querySelectorAll('.daily-value.small-text > div')?.length === 1) ``` O novo `div` deve ter o atributo `class` definido como `divider`. ```js -assert(document.querySelector('.daily-value.sm-text > div')?.classList?.contains('divider')) +assert(document.querySelector('.daily-value.small-text > div')?.classList?.contains('divider')) ``` O novo `div` deve vir após o elemento `p`. ```js -assert(document.querySelector('.daily-value.sm-text > div')?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text > div')?.previousElementSibling?.localName === 'p'); ``` # --seed-- @@ -36,34 +36,38 @@ assert(document.querySelector('.daily-value.sm-text > div')?.previousElementSibl ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                  + ``` @@ -95,6 +99,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -106,34 +112,46 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } ``` diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6b2d164f81809efd9bdc.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6b2d164f81809efd9bdc.md index cce3ad64e69..3354cf122ba 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6b2d164f81809efd9bdc.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6b2d164f81809efd9bdc.md @@ -1,56 +1,62 @@ --- id: 615f6b2d164f81809efd9bdc -title: Passo 42 +title: Passo 43 challengeType: 0 -dashedName: step-42 +dashedName: step-43 --- # --description-- -Após o último elemento `.divider`, crie um elemento `p` e dê a ele o texto `Total Fat 8g 10%`. Encapsule `Total Fat` em um elemento `span` com a `class` definida como `bold`. Encapsule `10%` em outro elemento `span` com a `class` definida como `bold right`. +Após o último elemento `.divider`, crie um elemento `p` e dê a ele o texto `Total Fat 8g 10%`. Encapsule `Total Fat` em um elemento `span` com a `class` definida como `bold`. Encapsule `10%` em outro elemento `span` com a `class` definida como `bold`. Também encapsule as palavras `Total Fat 8g` em um elemento `span` adicional para o alinhamento. # --hints-- Você deve criar um elemento `p` ao final do elemento `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` O novo elemento `p` deve ter o texto `Total Fat 8g 10%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Total Fat 8g[\s|\n]+10%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Total Fat[\s|\n]+8g[\s|\n]+10%/)); ``` -O elemento `p` deve ter dois elementos `span`. +O elemento `p` deve ter três elementos `span`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 2); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 3); ``` -O primeiro elemento `span` deve encapsular o texto `Total Fat`. +Um elemento `span` deve encapsular o texto `Total Fat`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.innerText === 'Total Fat'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span > span')?.innerText === 'Total Fat'); ``` -O novo elemento `span` deve ter `class` definida como `bold`. +O elemento `span` ao redor de `Total Fat` deve ter `class` definida como `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.className === 'bold'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span > span')?.className === 'bold'); ``` -O segundo elemento `span` deve encapsular o texto `10%`. +Um elemento `span` deve encapsular o texto `10%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.[1]?.innerText === '10%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span + span')?.innerText === '10%'); ``` -O segundo elemento `span` deve ter `class` definida como `bold right`. +O elemento `span` ao redor de `10%` deve ter `class` definida como `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.[1]?.className === 'bold right'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.[1]?.className === 'bold'); +``` + +Um elemento `span` deve encapsular o texto `Total Fat 8g`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Total Fat[\s|\n]+8g/)); ``` # --seed-- @@ -60,35 +66,39 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySe ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  ---fcc-editable-region-- ---fcc-editable-region-- + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                  + ``` @@ -120,46 +130,59 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } ``` diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6cc778f7698258467596.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6cc778f7698258467596.md index 7adfbc92747..9b71480888f 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6cc778f7698258467596.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6cc778f7698258467596.md @@ -1,46 +1,45 @@ --- id: 615f6cc778f7698258467596 -title: Passo 43 +title: Passo 44 challengeType: 0 -dashedName: step-43 +dashedName: step-44 --- # --description-- -Abaixo do elemento com o texto `Total Fat`, crie um elemento `p` com o texto `Saturated Fat 1g 5%`. Encapsule `5%` em outro elemento `span` com o atributo `class` definido como `bold right`. +Abaixo do elemento com o texto `Total Fat`, crie um elemento `p` com o texto `Saturated Fat 1g 5%`. Encapsule `5%` em outro elemento `span` com o atributo `class` definido como `bold`. Nesse caso, é o suficiente definir a porcentagem como `5%`. # --hints-- Você deve criar um elemento `p` abaixo do elemento com o texto `Total Fat`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.innerText.match(/Total Fat 8g\s*10%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.innerText.match(/Total Fat 8g\s*10%/)); ``` O novo elemento `p` deve ter o texto `Saturated Fat 1g 5%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText.match(/Saturated Fat 1g\s*5%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText.match(/Saturated Fat 1g\s*5%/)); ``` O elemento `p` deve ter um elemento `span`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.localName === 'span'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.localName === 'span'); ``` -O elemento `span` deve ter o atributo `class` definido como `bold right`. +O elemento `span` deve ter o atributo `class` com o valor `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); ``` O elemento `span` deve encapsular o texto `5%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.innerText === "5%"); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === "5%"); ``` # --seed-- @@ -50,36 +49,40 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastEle ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                                                                                  ---fcc-editable-region-- ---fcc-editable-region-- + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                  + ``` @@ -111,46 +114,59 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } ``` diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6fddaac1e083502d3e6a.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6fddaac1e083502d3e6a.md index 9180b2c5fbd..20b1d6b45c5 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6fddaac1e083502d3e6a.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6fddaac1e083502d3e6a.md @@ -1,8 +1,8 @@ --- id: 615f6fddaac1e083502d3e6a -title: Passo 44 +title: Passo 45 challengeType: 0 -dashedName: step-44 +dashedName: step-45 --- # --description-- @@ -14,7 +14,7 @@ Esse novo elemento `p` vai precisar ser indentado. Dê a ele uma `class` definid O elemento `p` com o texto `Saturated Fat 1g 5%` deve ter um atributo `class` definido como `indent`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('indent')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('indent')); ``` # --seed-- @@ -24,36 +24,41 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                                                                                  ---fcc-editable-region-- -

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                  + ``` @@ -85,46 +90,59 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } ``` diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f70077a4ff98424236c1e.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f70077a4ff98424236c1e.md index 68f49d7e620..08be638f481 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f70077a4ff98424236c1e.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f70077a4ff98424236c1e.md @@ -1,8 +1,8 @@ --- id: 615f70077a4ff98424236c1e -title: Passo 45 +title: Passo 46 challengeType: 0 -dashedName: step-45 +dashedName: step-46 --- # --description-- @@ -30,34 +30,39 @@ assert(new __helpers.CSSHelp(document).getStyle('.indent')?.marginLeft === '1em' ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                                                                                  + 230
                                                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + ``` @@ -89,47 +94,60 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } --fcc-editable-region-- diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f72a872354a850d4f533e.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f72a872354a850d4f533e.md index 1323c27b1d9..905f486bcb9 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f72a872354a850d4f533e.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f72a872354a850d4f533e.md @@ -1,8 +1,8 @@ --- id: 615f72a872354a850d4f533e -title: Passo 46 +title: Passo 47 challengeType: 0 -dashedName: step-46 +dashedName: step-47 --- # --description-- @@ -30,34 +30,39 @@ assert(new __helpers.CSSHelp(document).getStyle('.daily-value p')?.borderBottom ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                                                                                  + 230
                                                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + ``` @@ -89,47 +94,60 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f74a71f1e498619e38ee8.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f74a71f1e498619e38ee8.md index 4c6795e7c52..ae77e318dd9 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f74a71f1e498619e38ee8.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f74a71f1e498619e38ee8.md @@ -1,8 +1,8 @@ --- id: 615f74a71f1e498619e38ee8 -title: Passo 47 +title: Passo 48 challengeType: 0 -dashedName: step-47 +dashedName: step-48 --- # --description-- @@ -14,16 +14,15 @@ As bordas inferiores sob os elementos `% Daily Value *` e `Saturated Fat 1g 5%` O elemento `p` com o texto `% Daily Value *` deve ter o atributo `no-divider` adicionado ao atributo `class`. Não remova as classes existentes. ```js -const p = document.querySelector('.daily-value.sm-text')?.firstElementChild; +const p = document.querySelector('.daily-value.small-text')?.firstElementChild; assert(p?.classList?.contains('no-divider')); assert(p?.classList?.contains('bold')); -assert(p?.classList?.contains('right')); ``` O elemento `p` com o texto `Saturated Fat 1g 5%` deve ter o atributo `no-divider` adicionado ao atributo `class`. Não remova as classes existentes. ```js -const p = document.querySelector('.daily-value.sm-text')?.lastElementChild; +const p = document.querySelector('.daily-value.small-text')?.lastElementChild; assert(p?.classList?.contains('no-divider')); assert(p?.classList?.contains('indent')); ``` @@ -35,36 +34,41 @@ assert(p?.classList?.contains('indent')); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

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

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                  + ``` @@ -96,47 +100,60 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ad94380408d971d14f6.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ad94380408d971d14f6.md index 0672b608aaa..12bf3a2007e 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ad94380408d971d14f6.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ad94380408d971d14f6.md @@ -1,8 +1,8 @@ --- id: 615f7ad94380408d971d14f6 -title: Passo 48 +title: Passo 49 challengeType: 0 -dashedName: step-48 +dashedName: step-49 --- # --description-- @@ -44,37 +44,43 @@ assert(style?.borderBottom === '1px solid rgb(136, 137, 137)'); ## --seed-contents-- + ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                                                                                  + 230
                                                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + ``` @@ -106,47 +112,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7bc680f7168ea01ebf99.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7bc680f7168ea01ebf99.md index 66ff3d874e4..0f75a1be508 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7bc680f7168ea01ebf99.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7bc680f7168ea01ebf99.md @@ -1,8 +1,8 @@ --- id: 615f7bc680f7168ea01ebf99 -title: Passo 49 +title: Passo 50 challengeType: 0 -dashedName: step-49 +dashedName: step-50 --- # --description-- @@ -13,16 +13,16 @@ O primeiro elemento `.no-divider` tem um `.divider` depois dele. Crie outro `.di # --hints-- -Você deve criar um `div` no final do elemento `.daily-value.sm-text`. +Você deve criar um elemento `div` ao final do elemento `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` O novo `div` deve ter o atributo `class` definido como `divider`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -32,36 +32,41 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                  + ``` @@ -93,47 +98,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7c71eab8218f846e4503.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7c71eab8218f846e4503.md index a83b306f0cb..d6203a2b5c1 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7c71eab8218f846e4503.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7c71eab8218f846e4503.md @@ -1,32 +1,32 @@ --- id: 615f7c71eab8218f846e4503 -title: Passo 50 +title: Passo 51 challengeType: 0 -dashedName: step-50 +dashedName: step-51 --- # --description-- -Após o último `.divider`, crie outro elemento `p` e dê a ele o texto `Trans Fat 0g`. Torne a palavra `Trans` em itálico ao encapsular ela em um elemento `i`. Dê ao elemento `p` o atributo `class` definido como `indent no-divider`. +Após o último `.divider`, crie outro elemento `p` e dê a ele o texto `Trans Fat 0g`. Torne a palavra `Trans` em itálico ao encapsular ela em um elemento `i`. Dê ao elemento `p` o atributo `class` definido como `indent no-divider`. Envolva `Trans Fat 0g` em um elemento `span` para o alinhamento. # --hints-- -Você deve criar um elemento `p` no final do elemento `.daily-value.sm-text`. +Você deve criar um elemento `p` ao final do elemento `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` O novo elemento `p` deve ter o texto `Trans Fat 0g`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText === 'Trans Fat 0g'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText === 'Trans Fat 0g'); ``` O novo elemento `p` deve ter o atributo `class` definido como `indent no-divider`. ```js -const p = document.querySelector('.daily-value.sm-text')?.lastElementChild; +const p = document.querySelector('.daily-value.small-text')?.lastElementChild; assert(p?.classList?.contains('indent')); assert(p?.classList?.contains('no-divider')); ``` @@ -34,13 +34,25 @@ assert(p?.classList?.contains('no-divider')); O novo elemento `p` deve ter um elemento `i`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.localName === 'i'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('i')); ``` O elemento `i` deve encapsular o texto `Trans`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.innerText === 'Trans'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('i')?.innerText === 'Trans'); +``` + +O novo elemento `p` deve ter um elemento `span`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span')); +``` + +O elemento `span` deve envolver o texto `Trans Fat 0g`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span')?.innerText?.match(/Trans[\s|\n]+Fat 0g/)); ``` # --seed-- @@ -50,37 +62,42 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstEl ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                  + ``` @@ -112,47 +129,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7d489a581590d1350288.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7d489a581590d1350288.md index e48620cc593..d1e3e62825d 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7d489a581590d1350288.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7d489a581590d1350288.md @@ -1,8 +1,8 @@ --- id: 615f7d489a581590d1350288 -title: Passo 51 +title: Passo 52 challengeType: 0 -dashedName: step-51 +dashedName: step-52 --- # --description-- @@ -11,16 +11,16 @@ Crie outro `.divider` depois do último elemento `p`. # --hints-- -Você deve criar um elemento `div` no final do elemento `.daily-value.sm-text`. +Você deve criar um elemento `div` ao final do elemento `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` O novo elemento `div` deve ter o atributo `class` definido como `divider`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -30,38 +30,43 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                  + ``` @@ -93,47 +98,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7de4487b64919bb4aa5e.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7de4487b64919bb4aa5e.md index 1dd1796d40c..f5992edafe2 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7de4487b64919bb4aa5e.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7de4487b64919bb4aa5e.md @@ -1,57 +1,62 @@ --- id: 615f7de4487b64919bb4aa5e -title: Passo 52 +title: Passo 53 challengeType: 0 -dashedName: step-52 +dashedName: step-53 --- # --description-- -Após o último `.divider`, crie um elemento `p` com o texto `Cholesterol 0mg 0%`. Encapsule o texto `Cholesterol` em um elemento `span`, e dê a ele o elemento `span` com o atributo `class` definido como `bold`. Encapsule o texto `0%` em outro elemento `span`, com a `class` definida como `bold right`. +Após o último `.divider`, crie um elemento `p` com o texto `Cholesterol 0mg 0%`. Encapsule o texto `Cholesterol` em um elemento `span`, e dê a ele o elemento `span` com o atributo `class` definido como `bold`. Encapsule o texto `0%` em outro elemento `span`, com a `class` definida como `bold`. Também encapsule `Cholesterol 0mg` em um elemento `span` adicional para o alinhamento. # --hints-- -Você deve criar um elemento `p` no final do elemento `.daily-value.sm-text`. +Você deve criar um elemento `p` ao final do elemento `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` O novo elemento `p` deve ter o texto `Cholesterol 0mg 0%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Cholesterol 0mg[\s|\n]+0%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Cholesterol[\s|\n]+0mg[\s|\n]+0%/)); ``` -O novo elemento `p` deve ter dois elementos `span`. +O novo elemento `p` deve ter três elementos `span`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 2); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 3); ``` -O primeiro elemento `span` deve ter o atributo `class` definido como `bold`. +O primeiro elemento `span` `Cholesterol` deve ter o atributo `class` definido como `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.classList?.contains('bold')); +``` + +O primeiro elemento `span` deve encapsular o texto `Cholesterol 0mg`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.innerText?.match(/Cholesterol[\s|\n]+0mg/)); ``` O primeiro elemento `span` deve encapsular o texto `Cholesterol`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.innerText === 'Cholesterol'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.innerText === 'Cholesterol'); ``` -O segundo elemento `span` deve ter o atributo `class` definido como `bold right`. +O segundo elemento `span` deve ter o atributo `class` definido como `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); ``` O segundo elemento `span` deve encapsular o texto `0%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.innerText === '0%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === '0%'); ``` # --seed-- @@ -61,39 +66,44 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastEle ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                  + ``` @@ -125,47 +135,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7e7281626a92bbd62da8.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7e7281626a92bbd62da8.md index 9c556b21fc7..3e63b92fdf9 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7e7281626a92bbd62da8.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7e7281626a92bbd62da8.md @@ -1,57 +1,62 @@ --- id: 615f7e7281626a92bbd62da8 -title: Passo 53 +title: Passo 54 challengeType: 0 -dashedName: step-53 +dashedName: step-54 --- # --description-- -Após o último elemento `p`, crie outro elemento `p` e dê a ele o texto `Sodium 160mg 7%`. Encapsule o texto `Sodium` em um elemento `span` com o atributo `class` definido como `bold`. Encapsule o texto `7%` em outro elemento `span` com a `class` definida como `bold right`. +Após o último elemento `p`, crie outro elemento `p` e dê a ele o texto `Sodium 160mg 7%`. Encapsule o texto `Sodium` em um elemento `span` com o atributo `class` definido como `bold`. Encapsule o texto `7%` em outro elemento `span` com a `class` definida como `bold`. Adicione também um elemento `span` ao redor de `Sodium 160mg` para alinhá-lo corretamente. # --hints-- -Você deve criar um elemento `p` no final do elemento `.daily-value.sm-text`. +Você deve criar um elemento `p` ao final do elemento `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` O novo elemento `p` deve ter o texto `Sodium 160mg 7%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Sodium 160mg[\s|\n]+7%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Sodium[\s|\n]160mg[\s|\n]+7%/)); ``` -O novo elemento `p` deve ter dois elementos `span`. +O novo elemento `p` deve ter três elementos `span`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 2); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 3); ``` -O primeiro elemento `span` deve ter o atributo `class` definido como `bold`. +Um elemento `span` deve encapsular o texto `Sodium 360mg`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.innerText?.match(/Sodium[\s|\n]160mg/)); ``` -O primeiro elemento `span` deve encapsular o texto `Sodium`. +Um elemento `span` deve encapsular o texto `Sodium`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.innerText === 'Sodium'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.innerText === "Sodium"); ``` -O segundo elemento `span` deve ter o atributo `class` definido como `bold right`. +O elemento `span` ao redor de `Sodium` deve ter o atributo `class` definido como `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.classList?.contains('bold')); ``` -O segundo elemento `span` deve encapsular o texto `7%`. +Um elemento `span` deve encapsular o texto `7%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.innerText === '7%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === '7%'); +``` + +O elemento `span` ao redor de `7%` deve ter o atributo `class` definido como `bold`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); ``` # --seed-- @@ -61,40 +66,45 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastEle ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                  + ``` @@ -126,47 +136,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ecb09de9a938ef94756.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ecb09de9a938ef94756.md index a7210a4d9f1..ee70bb8eeb8 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ecb09de9a938ef94756.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ecb09de9a938ef94756.md @@ -1,57 +1,68 @@ --- id: 615f7ecb09de9a938ef94756 -title: Passo 54 +title: Passo 55 challengeType: 0 -dashedName: step-54 +dashedName: step-55 --- # --description-- -Adicione outro elemento `p` com o texto `Total Carbohydrate 37g 13%`. Como antes, use elementos `span` para fazer o texto `Total Carbohydrate` negrito, e o texto `13%` negrito e alinhado à direita. +Adicione outro elemento `p` com o texto `Total Carbohydrate 37g 13%`. Como antes, use elementos `span` para deixar o texto `Total Carbohydrate` e o texto `13%` em negrito. Adicione também um elemento `span` para envolver o texto `Total Carbohydrate 37g` em um elemento span que ele esteja alinhado à esquerda e `13%` à direita. # --hints-- -Você deve criar um elemento `p` no final do elemento `.daily-value.sm-text`. +Você deve criar um elemento `p` ao final do elemento `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` O novo elemento `p` deve ter o texto `Total Carbohydrate 37g 13%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Total Carbohydrate 37g[\s|\n]+13%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Total Carbohydrate[\s|\n]+37g[\s|\n]+13%/)); ``` -O novo elemento `p` deve ter dois elementos `span`. +O novo elemento `p` deve ter três elementos `span`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 2); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 3); ``` -O primeiro elemento `span` deve ter o atributo `class` definido como `bold`. +Um elemento `span` deve encapsular o texto `Total Carbohydrate 37g`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.innerText?.match(/Total Carbohydrate[\s|\n]+37g/)); ``` -O primeiro elemento `span` deve encapsular o texto `Total Carbohydrate`. +Um elemento `span` deve encapsular o texto `Total Carbohydrate`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.innerText === 'Total Carbohydrate'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.innerText === 'Total Carbohydrate'); ``` -O segundo elemento `span` deve ter o atributo `class` definido como `bold right`. +O elemento `span` ao redor de `Total Carbohydrate` deve ter o atributo `class` definido como `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.classList?.contains('bold')); +``` + +Um elemento `span` deve encapsular o texto `13%`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === '13%'); +``` + +O elemento `span` ao redor de `13%` deve ter o atributo `class` definido como `bold`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); ``` O segundo elemento `span` deve encapsular o texto `13%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.innerText === '13%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === '13%'); ``` # --seed-- @@ -61,41 +72,46 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastEle ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                  + ``` @@ -127,47 +143,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7fa959ab75948f96a0d6.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7fa959ab75948f96a0d6.md index 22faf4574ac..ed0fcdd69b2 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7fa959ab75948f96a0d6.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7fa959ab75948f96a0d6.md @@ -1,8 +1,8 @@ --- id: 615f7fa959ab75948f96a0d6 -title: Passo 55 +title: Passo 56 challengeType: 0 -dashedName: step-55 +dashedName: step-56 --- # --description-- @@ -11,30 +11,30 @@ Após o último elemento `p`, crie outro elemento `p` e dê a ele o texto `Dieta # --hints-- -Você deve criar um elemento `p` e `div` no final do elemento `.daily-value.sm-text`. +Você deve criar um elemento `p` e um elemento `div` ao final do elemento `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` O novo elemento `p` deve ter o texto `Dietary Fiber 4g`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.innerText.match(/Dietary Fiber[\s|\n]+4g/)); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.innerText.match(/Dietary Fiber[\s|\n]+4g/)); ``` O novo elemento `p` deve ter o atributo `class` definido como `indent no-divider`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('indent')); -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('indent')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('no-divider')); ``` O novo `div` deve ter o atributo `class` definido como `divider`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -44,42 +44,47 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                  + ``` @@ -111,47 +116,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f808d85793195b0f53be9.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f808d85793195b0f53be9.md index 6cec8cf51a0..f40256263d7 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f808d85793195b0f53be9.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f808d85793195b0f53be9.md @@ -1,8 +1,8 @@ --- id: 615f808d85793195b0f53be9 -title: Passo 56 +title: Passo 57 challengeType: 0 -dashedName: step-56 +dashedName: step-57 --- # --description-- @@ -11,30 +11,30 @@ Crie outro elemento `p` após o último `.divider` e dê a ele o texto `Total Su # --hints-- -Você deve criar um elemento `p` e `div` no final do elemento `.daily-value.sm-text`. +Você deve criar um elemento `p` e um elemento `div` ao final do elemento `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` O novo elemento `p` deve ter o texto `Total Sugars 12g`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.innerText.match(/Total Sugars[\s|\n]+12g/)); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.innerText.match(/Total Sugars[\s|\n]+12g/)); ``` O novo elemento `p` deve ter o atributo `class` definido como `indent no-divider`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('indent')); -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('indent')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('no-divider')); ``` O novo `div` deve ter o atributo `class` definido como `divider`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -44,44 +44,49 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                  + ``` @@ -113,47 +118,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f829d07b18f96f6f6684b.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f829d07b18f96f6f6684b.md index a31384b8c6a..a27fab3ebd0 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f829d07b18f96f6f6684b.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f829d07b18f96f6f6684b.md @@ -1,21 +1,21 @@ --- id: 615f829d07b18f96f6f6684b -title: Passo 57 +title: Passo 58 challengeType: 0 -dashedName: step-57 +dashedName: step-58 --- # --description-- -A vantagem de criar esses divisores é que você pode aplicar classes específicas para estilizá-los individualmente. Adicione `dbl-indent` à `class` para o último `.divider`. +A vantagem de criar esses divisores é que você pode aplicar classes específicas para estilizá-los individualmente. Adicione `double-indent` à `class` para o último `.divider`. # --hints-- -O último elemento `.divider` deve ter `dbl-indent` adicionado à `class`. Não remova o valor existente. +O último elemento `.divider` deve ter `double-indent` adicionado à `class`. Não remova o valor existente. ```js -const last = document.querySelector('.daily-value.sm-text')?.lastElementChild; -assert(last?.classList?.contains('dbl-indent')); +const last = document.querySelector('.daily-value.small-text')?.lastElementChild; +assert(last?.classList?.contains('double-indent')); assert(last?.classList?.contains('divider')); ``` @@ -26,46 +26,51 @@ assert(last?.classList?.contains('divider')); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                                                                                  + 230
                                                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + ``` @@ -97,47 +102,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f83ef928ec9982b785b6a.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f83ef928ec9982b785b6a.md index 272d7255984..707cb6283c1 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f83ef928ec9982b785b6a.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f83ef928ec9982b785b6a.md @@ -1,26 +1,26 @@ --- id: 615f83ef928ec9982b785b6a -title: Passo 58 +title: Passo 59 challengeType: 0 -dashedName: step-58 +dashedName: step-59 --- # --description-- -Crie um seletor `.dbl-indent` e dê a ele uma margem esquerda de `2em`. +Crie um seletor `.double-indent` e dê a ele uma margem esquerda de `2em`. # --hints-- -Você deve ter um novo seletor `.dbl-indent`. +Você deve ter um novo seletor `.double-indent`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.dbl-indent')); +assert(new __helpers.CSSHelp(document).getStyle('.double-indent')); ``` -O seletor `.dbl-indent` deve ter a propriedade `margin-left` definida como `2em`. +O seletor `.double-indent` deve ter a propriedade `margin-left` definida como `2em`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.dbl-indent')?.marginLeft === '2em'); +assert(new __helpers.CSSHelp(document).getStyle('.double-indent')?.marginLeft === '2em'); ``` # --seed-- @@ -30,44 +30,49 @@ assert(new __helpers.CSSHelp(document).getStyle('.dbl-indent')?.marginLeft === ' ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                                                                                  + 230
                                                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + ``` @@ -99,56 +104,70 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } ---fcc-editable-region-- +--fcc-editable-region-- ---fcc-editable-region-- +--fcc-editable-region-- .daily-value p:not(.no-divider) { border-bottom: 1px solid #888989; diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f84f246e8ba98e3cd97be.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f84f246e8ba98e3cd97be.md index ceb6e988620..d2ef11224d5 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f84f246e8ba98e3cd97be.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f84f246e8ba98e3cd97be.md @@ -1,61 +1,60 @@ --- id: 615f84f246e8ba98e3cd97be -title: Passo 59 +title: Passo 60 challengeType: 0 -dashedName: step-59 +dashedName: step-60 --- # --description-- -Abaixo do elemento `.dbl-indent`, adicione um elemento `p` com o texto `Includes 10g Added Sugars 20%`. O novo elemento `p` também deve ter indentação dupla e não ter borda inferior. Use um `span` para fazer com que `20%` esteja alinhado à direita e em negrito. +Abaixo do elemento `.double-indent`, adicione um elemento `p` com o texto `Includes 10g Added Sugars 20%`. O novo elemento `p` também deve ter indentação dupla e não ter borda inferior. Use um `span` para fazer com que `20%` esteja alinhado à direita e em negrito. Em seguida, crie outro divisor abaixo do elemento `p`. # --hints-- -Você deve criar um elemento `p` e um elemento `div` ao final do elemento `.daily-value.sm-text`. +Você deve criar um elemento `p` e um elemento `div` ao final do elemento `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` O novo elemento `p` deve ter o texto `Includes 10g Added Sugars 20%`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.innerText.match(/Includes 10g Added Sugars[\s|\n]+20%/)); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.innerText.match(/Includes 10g Added Sugars[\s|\n]+20%/)); ``` -O novo elemento `p` deve ter o atributo `class` definido como `dbl-indent no-divider`. +O novo elemento `p` deve ter o atributo `class` definido como `double-indent no-divider`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('dbl-indent')); -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('double-indent')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('no-divider')); ``` O novo elemento `p` deve ter um elemento `span`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.firstElementChild?.localName === 'span'); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.firstElementChild?.localName === 'span'); ``` -O elemento `span` deve ter o atributo `class` definido como `bold right`. +O elemento `span` deve ter o atributo `class` com o valor `bold`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.firstElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.firstElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.firstElementChild?.classList?.contains('bold')); ``` O elemento `span` deve encapsular o texto `20%`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type span')?.innerText === '20%'); +assert(document.querySelector('.daily-value.small-text p:last-of-type span')?.innerText === '20%'); ``` A nova `div` deve ter o atributo `class` definido como `divider`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -65,46 +64,51 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                  + ``` @@ -136,54 +140,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f887466db4ba14b5342cc.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f887466db4ba14b5342cc.md index 1913ccd4c2b..9c422dec266 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f887466db4ba14b5342cc.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f887466db4ba14b5342cc.md @@ -1,8 +1,8 @@ --- id: 615f887466db4ba14b5342cc -title: Passo 60 +title: Passo 61 challengeType: 0 -dashedName: step-60 +dashedName: step-61 --- # --description-- @@ -13,30 +13,30 @@ Depois desse elemento, crie um divisor grande. # --hints-- -Você deve criar novos elementos `p` e `div` ao final do elemento `.daily-value.sm-text`. +Você deve criar um elemento `p` e um elemento `div` ao final do elemento `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` O novo elemento `p` deve ter o texto `Protein 3g`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.innerText.match(/Protein[\s|\n]+3g/)); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.innerText.match(/Protein[\s|\n]+3g/)); ``` O novo elemento `p` deve ter o atributo `class` definido como `no-divider`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('no-divider')); ``` -A nova `div` deve ter o atributo `class` definido como `divider lg`. +A nova `div` deve ter o atributo `class` definido como `divider large`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('lg')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('large')); ``` # --seed-- @@ -46,48 +46,53 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                  + ``` @@ -119,54 +124,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f89e055040ba294719d2f.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f89e055040ba294719d2f.md index d5390d8e72f..dd3d5510705 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f89e055040ba294719d2f.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f89e055040ba294719d2f.md @@ -1,39 +1,40 @@ --- id: 615f89e055040ba294719d2f -title: Passo 61 +title: Passo 62 challengeType: 0 -dashedName: step-61 +dashedName: step-62 --- # --description-- -Crie outro elemento `p` abaixo do divisor grande. Dê ao elemento `p` o texto `Vitamin D 2mcg 10%`. Use um `span` para fazer com que `10%` se alinhe à direita, mas não o deixe em negrito. +Crie outro elemento `p` abaixo do divisor grande. Dê ao elemento `p` o texto `Vitamin D 2mcg 10%`. + +O elemento `p` contém apenas texto, Você pode encapsular a porcentagem em um elemento `span` para que seja considerada uma entidade separada do resto do texto e movida para a direita. # --hints-- -Você deve criar um elemento `p` no final do elemento `.daily-value.sm-text`. +Você deve criar um elemento `p` ao final do elemento `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` O novo elemento `p` deve ter o texto `Vitamin D 2mcg 10%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Vitamin D 2mcg[\s|\n]+10%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Vitamin D 2mcg[\s|\n]+10%/)); ``` -O elemento `p` deve ter um elemento `span`. +O novo elemento `p` deve ter um elemento `span`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 1); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 1); ``` -O elemento `span` deve ter a `class` definida como `right`. Lembre-se, não o torne negrito. +O texto do elemento `span` não deve estar em negrito. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.classList?.contains('right')); -assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.classList?.contains('bold')); +assert(!document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span')?.classList?.contains('bold')); ``` # --seed-- @@ -43,50 +44,55 @@ assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.queryS ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                  + ``` @@ -118,54 +124,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8bfe0f30a1a3c340356b.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8bfe0f30a1a3c340356b.md index 08a44951450..206a0e9b7cb 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8bfe0f30a1a3c340356b.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8bfe0f30a1a3c340356b.md @@ -1,8 +1,8 @@ --- id: 615f8bfe0f30a1a3c340356b -title: Passo 62 +title: Passo 63 challengeType: 0 -dashedName: step-62 +dashedName: step-63 --- # --description-- @@ -11,55 +11,53 @@ Crie outro elemento `p`, dê a ele o texto `Calcium 260mg 20%`. Alinhe `20%` à # --hints-- -Você deve criar dois elementos `p` no final do elemento `.daily-value.sm-text`. +Você deve criar dois elementos `p` ao final do elemento `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); ``` O primeiro novo elemento `p` deve ter o texto `Calcium 260mg 20%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.innerText?.match(/Calcium 260mg[\s|\n]+20%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.innerText?.match(/Calcium 260mg[\s|\n]+20%/)); ``` O primeiro novo elemento `p` deve ter um elemento `span`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.localName === 'span'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.localName === 'span'); ``` -O primeiro elemento `span` deve ter o atributo `class` definido como `right`. Lembre-se, não o torne negrito. +O primeiro elemento `span` não deve estar em negrito. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.classList?.contains('right')); -assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.classList?.contains('bold')); +assert(!document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.classList?.contains('bold')); ``` O primeiro elemento `span` deve encapsular o texto `20%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.innerText === '20%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.innerText === '20%'); ``` O segundo novo elemento `p` deve ter o texto `Iron 8mg 45%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Iron 8mg[\s|\n]+45%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Iron 8mg[\s|\n]+45%/)); ``` O segundo novo elemento `p` deve ter um elemento `span`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.localName === 'span'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.localName === 'span'); ``` -O segundo elemento `span` deve ter o atributo `class` definido como `right`. Lembre-se, não o torne negrito. +O segundo elemento `span` não deve estar em negrito. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('right')); -assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(!document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); ``` # --seed-- @@ -69,51 +67,56 @@ assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstE ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                  + ``` @@ -145,54 +148,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8f1223601fa546e93f31.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8f1223601fa546e93f31.md index 5ce4ecf76ac..831136adefd 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8f1223601fa546e93f31.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8f1223601fa546e93f31.md @@ -1,8 +1,8 @@ --- id: 615f8f1223601fa546e93f31 -title: Passo 63 +title: Passo 64 challengeType: 0 -dashedName: step-63 +dashedName: step-64 --- # --description-- @@ -11,35 +11,34 @@ Crie o elemento final `p` para a seção `.daily-value`. Dê a ela o texto `Pota # --hints-- -Você deve criar um elemento `p` no final do elemento `.daily-value.sm-text`. +Você deve criar um elemento `p` ao final do elemento `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` O novo elemento `p` deve ter o atributo `class` definido como `no-divider`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('no-divider')); ``` O novo elemento `p` deve ter o texto `Potassium 235mg 6%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Potassium 235mg[\s|\n]+6%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Potassium 235mg[\s|\n]+6%/)); ``` O novo elemento `p` deve ter um elemento `span`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 1); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 1); ``` -O elemento `span` deve ter a `class` definida como `right`. Lembre-se, não o torne negrito. +O texto do elemento `span` não deve estar em negrito. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.classList?.contains('right')); -assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.classList?.contains('bold')); +assert(!document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span')?.classList?.contains('bold')); ``` # --seed-- @@ -49,53 +48,58 @@ assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.queryS ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Calories 230

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

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                                                                                                                                                  ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Calories

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

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                  + ``` @@ -127,54 +131,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f905fbd1017a65ca224eb.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f905fbd1017a65ca224eb.md index 00c4e7d433f..8993479f663 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f905fbd1017a65ca224eb.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f905fbd1017a65ca224eb.md @@ -1,8 +1,8 @@ --- id: 615f905fbd1017a65ca224eb -title: Passo 64 +title: Passo 65 challengeType: 0 -dashedName: step-64 +dashedName: step-65 --- # --description-- @@ -23,11 +23,11 @@ Você deve criar um `div` após o elemento `.daily-value`. assert(document.querySelector('.daily-value').nextElementSibling?.localName === 'div'); ``` -A nova `div` deve ter `class` definido como `divider md`. +A nova `div` deve ter `class` definido como `divider medium`. ```js assert(document.querySelector('.daily-value')?.nextElementSibling?.classList?.contains('divider')); -assert(document.querySelector('.daily-value')?.nextElementSibling?.classList?.contains('md')); +assert(document.querySelector('.daily-value')?.nextElementSibling?.classList?.contains('medium')); ``` Você deve criar um elemento `p` após o novo elemento `div`. @@ -55,55 +55,60 @@ assert.equal(document.querySelector('.label')?.lastElementChild?.innerText, '* T ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Fat 8g10%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Potassium 235mg 6%

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  ---fcc-editable-region-- ---fcc-editable-region-- + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + 230
                                                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Potassium 235mg 6%

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + --fcc-editable-region-- + + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                  + ``` @@ -135,54 +140,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f94786869e1a7fec54375.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f94786869e1a7fec54375.md index 2536aefe0d4..43c3c02d61f 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f94786869e1a7fec54375.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f94786869e1a7fec54375.md @@ -1,8 +1,8 @@ --- id: 615f94786869e1a7fec54375 -title: Passo 65 +title: Passo 66 challengeType: 0 -dashedName: step-65 +dashedName: step-66 --- # --description-- @@ -36,54 +36,60 @@ assert(new __helpers.CSSHelp(document).getStyle('.note')?.margin === '5px 0px'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Potassium 235mg 6%

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                                                                                                                                                                                                                  + 230
                                                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Potassium 235mg 6%

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily + diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + ``` @@ -115,54 +121,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f951dff9317a900ef683f.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f951dff9317a900ef683f.md index d939f0d2f6e..559878e2e00 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f951dff9317a900ef683f.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f951dff9317a900ef683f.md @@ -1,8 +1,8 @@ --- id: 615f951dff9317a900ef683f -title: Passo 66 +title: Passo 67 challengeType: 0 -dashedName: step-66 +dashedName: step-67 --- # --description-- @@ -35,54 +35,60 @@ assert(new __helpers.CSSHelp(document).getStyle('.note')?.textIndent === '-8px') ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Potassium 235mg 6%

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                                                                                                                                                                                                                  + 230
                                                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Potassium 235mg 6%

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily + diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + ``` @@ -114,54 +120,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } @@ -182,54 +202,60 @@ p { ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Calories 230

                                                                                                                                                                                                                                                                                                  + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% -

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  Potassium 235mg 6%

                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -
                                                                                                                                                                                                                                                                                                  -

                                                                                                                                                                                                                                                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                                                                                                                                                                                                                  + 230
                                                                                                                                                                                                                                                                                                  - +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Trans Fat 0g

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Total Sugars 12g

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Includes 10g Added Sugars 20% +

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Protein 3g

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Vitamin D 2mcg 10%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Calcium 260mg 20%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Iron 8mg 45%

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Potassium 235mg 6%

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily + diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + ``` @@ -261,54 +287,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/635bde33c91c80540eae239b.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/635bde33c91c80540eae239b.md new file mode 100644 index 00000000000..6b968a827ec --- /dev/null +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/635bde33c91c80540eae239b.md @@ -0,0 +1,153 @@ +--- +id: 635bde33c91c80540eae239b +title: Passo 41 +challengeType: 0 +dashedName: step-41 +--- + +# --description-- + +O texto `* Daily Value %` deve ser alinhado à direita. Crie um seletor `.right` e use a propriedade `justify-content` para fazer isso. + +# --hints-- + +Você deve ter um seletor `.right`. + +```js +const hasRight = new __helpers.CSSHelp(document).getStyle('.right'); +assert(hasRight); + +``` + +O seletor `.right` deve ter uma propriedade `justify-content` definida como `flex-end`. + +```js +const rightJustifyContent = new __helpers.CSSHelp(document).getStyle('.right')?.getPropertyValue('justify-content'); +assert(rightJustifyContent === 'flex-end'); + +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + 230 +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  % Daily Value *

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + + +``` + +```css +* { + box-sizing: border-box; +} + +html { + font-size: 16px; +} + +body { + font-family: 'Open Sans', sans-serif; +} + +.label { + border: 2px solid black; + width: 270px; + margin: 20px auto; + padding: 0 7px; +} + +header h1 { + text-align: center; + margin: -4px 0; + letter-spacing: 0.15px +} + +p { + margin: 0; + display: flex; + justify-content: space-between; +} + +.divider { + border-bottom: 1px solid #888989; + margin: 2px 0; +} + +.bold { + font-weight: 800; +} + +.large { + height: 10px; +} + +.large, .medium { + background-color: black; + border: 0; +} + +.medium { + height: 5px; +} + +.small-text { + font-size: 0.85rem; +} + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { + margin: -5px -2px; + font-size: 2em; + font-weight: 700; +} + +.calories-info span { + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +--fcc-editable-region-- + +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6395d33ab5d91bf317107c48.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6395d33ab5d91bf317107c48.md new file mode 100644 index 00000000000..a72639b1281 --- /dev/null +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6395d33ab5d91bf317107c48.md @@ -0,0 +1,117 @@ +--- +id: 6395d33ab5d91bf317107c48 +title: Passo 32 +challengeType: 0 +dashedName: step-32 +--- + +# --description-- + +Crie um seletor `.calories-info h2` e remova todas as margens. + +# --hints-- + +Crie um seletor `.calories-info h2`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info h2')); +``` + +O seletor `.calories-info h2` deve ter uma `margin` definida como `0`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info h2')?.margin === '0px'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + + +``` + +```css +* { + box-sizing: border-box; +} + +html { + font-size: 16px; +} + +body { + font-family: 'Open Sans', sans-serif; +} + +.label { + border: 2px solid black; + width: 270px; + margin: 20px auto; + padding: 0 7px; +} + +header h1 { + text-align: center; + margin: -4px 0; + letter-spacing: 0.15px +} + +p { + margin: 0; + display: flex; + justify-content: space-between; +} + +.divider { + border-bottom: 1px solid #888989; + margin: 2px 0; +} + +.bold { + font-weight: 800; +} + +.large { + height: 10px; +} + +.large, .medium { + background-color: black; + border: 0; +} + +.small-text { + font-size: 0.85rem; +} + +--fcc-editable-region-- + +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6396e33fe478dd264ebbf278.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6396e33fe478dd264ebbf278.md new file mode 100644 index 00000000000..cd1c97f27d1 --- /dev/null +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6396e33fe478dd264ebbf278.md @@ -0,0 +1,135 @@ +--- +id: 6396e33fe478dd264ebbf278 +title: Passo 34 +challengeType: 0 +dashedName: step-34 +--- + +# --description-- + +Crie um seletor `.calories-info` e defina a propriedade `display` como `flex`. Também dê a ele uma propriedade `justify-content` definida como `space-between` e `align-items` definida como `flex-end`. + +# --hints-- + +Você deve criar um seletor `.calories-info`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info')); +``` + +O seletor `.calories-info` deve ter a propriedade `display` definida como `flex`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info')?.display === 'flex'); +``` + +O seletor `.calories-info` deve ter uma propriedade `justify-content` definida como `space-between`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info')?.justifyContent === 'space-between'); +``` + +O seletor `.calories-info` deve ter a propriedade `align-items` definida como `flex-end`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info')?.alignItems === 'flex-end'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Nutrition Facts

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  8 servings per container

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Amount per serving

                                                                                                                                                                                                                                                                                                  +

                                                                                                                                                                                                                                                                                                  Calories

                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + 230 +
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  + + +``` + +```css +* { + box-sizing: border-box; +} + +html { + font-size: 16px; +} + +body { + font-family: 'Open Sans', sans-serif; +} + +.label { + border: 2px solid black; + width: 270px; + margin: 20px auto; + padding: 0 7px; +} + +header h1 { + text-align: center; + margin: -4px 0; + letter-spacing: 0.15px +} + +p { + margin: 0; + display: flex; + justify-content: space-between; +} + +.divider { + border-bottom: 1px solid #888989; + margin: 2px 0; +} + +.bold { + font-weight: 800; +} + +.large { + height: 10px; +} + +.large, .medium { + background-color: black; + border: 0; +} + +.small-text { + font-size: 0.85rem; +} + +--fcc-editable-region-- + +--fcc-editable-region-- + +.calories-info h2 { + margin: 0; +} +``` diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c8bf3980c14c438d2aed.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c8bf3980c14c438d2aed.md index ef86d4bda40..b448f505734 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c8bf3980c14c438d2aed.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c8bf3980c14c438d2aed.md @@ -7,7 +7,7 @@ dashedName: step-39 # --description-- -Por enquanto, faça a função `goStore` retornar a mensagem `Going to store.` para o console. Por exemplo, aqui está uma função que produz a mensagem "Hello World". +Por enquanto, faça a função `goStore` retornar a mensagem `Going to store.` para o console. Por exemplo, aqui está uma função que produz a mensagem `Hello World`. ```js function functionName() { diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b0b5053f16111b0b6b5f.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b0b5053f16111b0b6b5f.md index 2ff3efadbbb..f2ebb430203 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b0b5053f16111b0b6b5f.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b0b5053f16111b0b6b5f.md @@ -47,7 +47,7 @@ A função `update` deve definir `button3.onclick` para `fightDragon`. assert.match(update.toString(), /button3\.onclick\s*=\s*fightDragon/); ``` -A função `update` deve definir `text.innerText` para `You are in the town square. You see a sign that says "Store".`. +A função `update` deve definir `text.innerText` como `You are in the town square. You see a sign that says \"Store\".`. ```js assert.match(update.toString(), /text\.innerText\s*=\s*"You are in the town square. You see a sign that says \\"Store\\"\."/); diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md index 49a3014b7bf..29a65d1e307 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md @@ -7,7 +7,7 @@ dashedName: step-62 # --description-- -O array `locations` contém dois locais: a praça da cidade (em inglês, town square) e a loja (em inglês, store). Atualmente, você está passando esse array inteiro para as funções de atualização. Passe apenas o primeiro elemento do array `locations` adicionando `[0]` no final da variável. Por exemplo: `myFunction(arg[0]);`. +O array `locations` contém dois locais: a praça da cidade (em inglês, `town square`) e a loja (em inglês, `store`). No momento, você está passando esse array inteiro para a função de `update`. Passe apenas o primeiro elemento do array `locations` adicionando `[0]` no final da variável. Por exemplo: `myFunction(arg[0]);`. Isso é chamado de notação de colchete. Valores em um array são acessados pelo índice. Índices são valores numéricos e começam em 0 – isto é chamado de indexação baseada em zero. `arg[0]` deve ser o primeiro elemento no array `arg`. diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md index d67981f1402..61c109a30e5 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md @@ -7,7 +7,7 @@ dashedName: step-67 # --description-- -Finalmente, atualize a atribuição `text.innerText` para que seja igual ao `text` do objeto de localização. No entanto, em vez de usar notação de colchete, use a notação de ponto. Aqui está um exemplo acesso à propriedade `name` de um objeto chamado `obj`: `obj.name`. +Finalmente, atualize a atribuição `text.innerText` para que seja igual ao `text` do objeto `location`. No entanto, em vez de usar notação de colchete, use a notação de ponto. Aqui está um exemplo acesso à propriedade `name` de um objeto chamado `obj`: `obj.name`. # --hints-- diff --git a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c89e4272512d44fc1c66.md b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c89e4272512d44fc1c66.md index 42fe9b9594c..f9bf69d03fc 100644 --- a/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c89e4272512d44fc1c66.md +++ b/curriculum/challenges/portuguese/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c89e4272512d44fc1c66.md @@ -7,7 +7,7 @@ dashedName: step-83 # --description-- -Semelhante à função `buyHealth`, defina `gold` igual a 30 a menos que o valor atual. Certifique-se de que você está dentro da instrução `if`. +Semelhante à função `buyHealth`, defina `gold` igual a `30` a menos que o valor atual. Certifique-se de que você está dentro da instrução `if`. # --hints-- diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/declare-a-read-only-variable-with-the-const-keyword.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/declare-a-read-only-variable-with-the-const-keyword.md index 54d09b76687..739cc63f87b 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/declare-a-read-only-variable-with-the-const-keyword.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/declare-a-read-only-variable-with-the-const-keyword.md @@ -1,6 +1,6 @@ --- id: 587d7b87367417b2b2512b41 -title: Оголосіть змінну, доступну лише для читання, з ключовим словом Const +title: Оголошення змінної для читання з ключовим словом const challengeType: 1 forumTopicId: 301201 dashedName: declare-a-read-only-variable-with-the-const-keyword @@ -10,57 +10,57 @@ dashedName: declare-a-read-only-variable-with-the-const-keyword Ключове слово `let` є не єдиним новим способом оголосити змінну. В ES6 можливо також оголосити змінні, використовуючи ключове слово `const`. -У `const` є ті ж круті функції, що й в `let` з приємним бонусом — тепер змінні, оголошені за допомогою `const`, доступні лише для читання. Вони мають константне значення. Тобто, як тільки змінна стає призначеною `const`, її вже неможливо призначити знову: +`const` має ті ж круті функції, що й `let`, але з бонусом: тепер змінні, оголошені за допомогою `const`, доступні лише для читання. Вони мають константне значення, тобто після присвоєння змінної з `const`, її неможливо присвоїти знову: ```js const FAV_PET = "Cats"; FAV_PET = "Dogs"; ``` -Консоль показуватиме помилку через перепризначення значення `FAV_PET`. +Консоль показуватиме помилку через повторне присвоєння значення `FAV_PET`. -Змінні, які не передбачають перепризначення, слід називати, використовуючи ключове слово `const`. Це може знадобитися, якщо ви випадково спробуєте перепризначити змінну, яка повинна бути константною. +Змінні, які не передбачають повторного присвоєння, потрібно називати, використовуючи ключове слово `const`. Це може знадобитися, якщо ви випадково спробуєте повторно присвоїти змінну, яка повинна залишатись константною. -**Note:** It is common for developers to use uppercase variable identifiers for immutable values and lowercase or camelCase for mutable values (objects and arrays). You will learn more about objects, arrays, and immutable and mutable values in later challenges. Also in later challenges, you will see examples of uppercase, lowercase, or camelCase variable identifiers. +**Примітка:** зазвичай розробники використовують ідентифікатори змінних у верхньому регістрі для незмінних значень та у нижньому регістрі чи верблюдячомуРегістрі для змінних значень (об’єктів чи масивів). Ви дізнаєтесь більше про об’єкти, масиви, а також змінні та незмінні значення в наступних завданнях. Також ви побачите приклади ідентифікаторів змінних у верхньому регістрі, нижньому регістрі та верблюдячомуРегістрі. # --instructions-- -Change the code so that all variables are declared using `let` or `const`. Use `let` when you want the variable to change, and `const` when you want the variable to remain constant. Also, rename variables declared with `const` to conform to common practices. Do not change the strings assigned to the variables. +Змініть код так, щоб усі змінні були оголошені за допомогою `let` або `const`. Використайте `let` для змінних значень, а `const` для незмінних значень. Крім того, перейменуйте змінні, оголошені за допомогою `const`, щоб відповідати загальним практикам. Не змінюйте рядки, які присвоєні змінним. # --hints-- -`var` should not exist in your code. +`var` повинне бути відсутнім у коді. ```js assert.notMatch(code, /var/g); ``` -You should change `fCC` to all uppercase. +Ви повинні змінити `fCC` на верхній регістр. ```js assert.match(code, /(FCC)/); assert.notMatch(code, /(fCC)/); ``` -`FCC` should be a constant variable declared with `const`. +`FCC` повинна бути константною змінною, оголошеною з `const`. ```js assert.match(code, /const\s+FCC/); ``` -The string assigned to `FCC` should not be changed. +Не потрібно змінювати рядок, присвоєний до `FCC`. ```js assert.equal(FCC, 'freeCodeCamp'); ``` -`fact` should be declared with `let`. +`fact` повинна бути оголошеною із `let`. ```js assert.match(code, /(let\s+fact)/g); ``` -`console.log` should be changed to print the `FCC` and `fact` variables. +`console.log` потрібно змінити так, щоб виводились змінні `FCC` та `fact`. ```js assert.match(code, /console\.log\(\s*FCC\s*\,\s*fact\s*\)\s*;?/g); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/decrement-a-number-with-javascript.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/decrement-a-number-with-javascript.md index 244928cfae4..1da4fdd1a16 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/decrement-a-number-with-javascript.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/decrement-a-number-with-javascript.md @@ -1,6 +1,6 @@ --- id: 56533eb9ac21ba0edf2244ad -title: Зменшення числа з JavaScript +title: Зменшення числа за допомогою JavaScript challengeType: 1 videoUrl: 'https://scrimba.com/c/cM2KeS2' forumTopicId: 17558 @@ -9,7 +9,7 @@ dashedName: decrement-a-number-with-javascript # --description-- -Ви можете легко зменшити або збільшити змінну на один за допомогою оператора `--`. +Ви можете легко зменшити або відняти одиницю від змінної за допомогою оператора `--`. ```js i--; diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/escaping-literal-quotes-in-strings.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/escaping-literal-quotes-in-strings.md index 84c1e5b448f..f565a0baa10 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/escaping-literal-quotes-in-strings.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/escaping-literal-quotes-in-strings.md @@ -1,6 +1,6 @@ --- id: 56533eb9ac21ba0edf2244b5 -title: Уникнення літературних цитат в рядках +title: Порятунок цитат у рядках challengeType: 1 videoUrl: 'https://scrimba.com/c/c2QvgSr' forumTopicId: 17568 @@ -9,15 +9,15 @@ dashedName: escaping-literal-quotes-in-strings # --description-- -Коли ви зазначаєте рядок, вам потрібно починати і закінчувати його одинарними або подвійними лапками. Що стається, коли ви потребуєте літературну цитату `"` or `'` всередині вашого рядка? +Коли ви визначаєте рядок, він повинен починатися та закінчуватися одинарними або подвійними лапками. Що робити, якщо всередині рядка потрібно написати цитату в `"` чи `'`? -В JavaScript, ви можете вийти з цитати і розглядати її як кінець рядка лапки, розмістивши зворотнього слешу (`\`) перед лапкою. +У JavaScript можна уникнути непотрібного завершення рядка, написавши зворотну косу риску (`\`) на початку цитати. ```js const sampleStr = "Alan said, \"Peter is learning JavaScript\"."; ``` -Це сигнали для JavaScript про те, що така цитата не є кінцевим рядком, а повинна з'явитися всередині рядка. Тому якщо ви введете це в консолі, то отримаєте: +Це повідомляє JavaScript про те, що цитата не є кінцем рядка, а повинна з’явитися всередині рядка. Якщо ви надрукуєте це на консолі, то отримаєте: ```js Alan said, "Peter is learning JavaScript". @@ -25,7 +25,7 @@ Alan said, "Peter is learning JavaScript". # --instructions-- -Використовуйте косі риски щоб зазначити для рядка змінну `myStr`, і таким чином ввівши її на консолі, побачите: +Використайте зворотні косі риски, щоб присвоїти рядок до змінної `myStr` та при виводі на консоль ви бачили наступне: ```js I am a "double quoted" string inside "double quotes". @@ -33,13 +33,13 @@ I am a "double quoted" string inside "double quotes". # --hints-- -Вам слід використовувати дві подвійні лапки (`"`) і чотири подвійні лапки (`\"`). +Ви повинні використати дві подвійні лапки (`"`) та чотири екрановані подвійні лапки (`\"`). ```js assert(code.match(/\\"/g).length === 4 && code.match(/[^\\]"/g).length === 2); ``` -Variable `myStr` should contain the string: `I am a "double quoted" string inside "double quotes".` +Змінна `myStr` повинна містити рядок `I am a "double quoted" string inside "double quotes".` ```js assert(/I am a "double quoted" string inside "double quotes(\."|"\.)$/.test(myStr)); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/golf-code.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/golf-code.md index f03d417fb5e..277cd296d14 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/golf-code.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/golf-code.md @@ -1,6 +1,6 @@ --- id: 5664820f61c48e80c9fa476c -title: Golf Code +title: Гольф-код challengeType: 1 videoUrl: 'https://scrimba.com/c/c9ykNUR' forumTopicId: 18195 @@ -9,13 +9,13 @@ dashedName: golf-code # --description-- -In the game of Golf, each hole has a `par`, meaning, the average number of `strokes` a golfer is expected to make in order to sink the ball in the hole to complete the play. Залежно від того, на скільки вище або нижче `par` є ваші `удари`, існують різні псевдоніми. +У грі в гольф кожна лунка має `par`, що відповідає середній кількості ударів (`strokes`), які повинен зробити гравець, щоб забити м’яч у лунку та завершити гру. Існують різні псевдоніми залежно від того, де знаходяться ваші удари (`strokes`) відповідно до `par`. -Ваша функція проходитиме аргументи `par` та `strokes`. Поверніть правильний рядок відповідно до цієї таблиці, яка перелічує удари в порядку пріоритету; зверху (найвищий) до низу (найнижчий): +Вашій функції буде передано аргументи `par` та `strokes`. Поверніть правильний рядок відповідно до цієї таблиці, в якій перелічено удари за пріоритетом зверху (найвищий) донизу (найнижчий): -
                                                                                                                                                                                                                                                                                                  УдариВідображений результат
                                                                                                                                                                                                                                                                                                  1"В лунку з першого удару"
                                                                                                                                                                                                                                                                                                  <= par - 2"Орел"
                                                                                                                                                                                                                                                                                                  par - 1"Пташка"
                                                                                                                                                                                                                                                                                                  par"Середнячок"
                                                                                                                                                                                                                                                                                                  par + 1"Страшко"
                                                                                                                                                                                                                                                                                                  par + 2"Двічі Страшко"
                                                                                                                                                                                                                                                                                                  >= par + 3"Йди додому!"
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  УдариПовернений рядок
                                                                                                                                                                                                                                                                                                  1"Hole-in-one!"
                                                                                                                                                                                                                                                                                                  <= par - 2"Eagle"
                                                                                                                                                                                                                                                                                                  par - 1"Birdie"
                                                                                                                                                                                                                                                                                                  par"Par"
                                                                                                                                                                                                                                                                                                  par + 1"Bogey"
                                                                                                                                                                                                                                                                                                  par + 2"Double Bogey"
                                                                                                                                                                                                                                                                                                  >= par + 3"Go Home!"
                                                                                                                                                                                                                                                                                                  -`par` та `удари` завжди будуть числовими та додатніми. Ми додали масив усіх ваших імен для зручності. +`par` та `strokes` завжди будуть додатними числами. Ми додали масив усіх імен для вашої зручності. # --hints-- diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/increment-a-number-with-javascript.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/increment-a-number-with-javascript.md index cfa5270c689..6bc1e7e46a3 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/increment-a-number-with-javascript.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/increment-a-number-with-javascript.md @@ -1,6 +1,6 @@ --- id: 56533eb9ac21ba0edf2244ac -title: Збільшення Числа з JavaScript +title: Збільшення числа за допомогою JavaScript challengeType: 1 videoUrl: 'https://scrimba.com/c/ca8GLT9' forumTopicId: 18201 @@ -9,27 +9,27 @@ dashedName: increment-a-number-with-javascript # --description-- -Ви можете легко збільшити або додати до змінної з оператором `++`. +Ви можете легко збільшити або додати одиницю до змінної за допомогою оператора `++`. ```js i++; ``` -є еквівалентом +те й саме, що ```js i = i + 1; ``` -**Note:** Весь рядок стає `i++;`, усуваючи потребу в знаку рівності. +**Примітка:** весь рядок стає `i++;`, усуваючи потребу в знаку рівності. # --instructions-- -Змініть код, щоб використовувати оператор `++` у `myVar`. +Змініть код, щоб використати оператор `++` на `myVar`. # --hints-- -`myVar` повинен дорівнювати `88`. +`myVar` повинна дорівнювати `88`. ```js assert(myVar === 88); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/initializing-variables-with-the-assignment-operator.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/initializing-variables-with-the-assignment-operator.md index adc9b5b872c..d4beb352c44 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/initializing-variables-with-the-assignment-operator.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/initializing-variables-with-the-assignment-operator.md @@ -1,6 +1,6 @@ --- id: 56533eb9ac21ba0edf2244a9 -title: Ініціалізація Змінних за допомогою Оператора Присвоєння +title: Ініціалізація змінних за допомогою оператора присвоєння challengeType: 1 videoUrl: 'https://scrimba.com/c/cWJ4Bfb' forumTopicId: 301171 @@ -9,21 +9,21 @@ dashedName: initializing-variables-with-the-assignment-operator # --description-- -Є загальноприйнятим ініціалізувати змінну до початкового значення в тому ж рядку, в якому вона була вказана. +Часто змінній ініціалізовують початкове значення в тому ж рядку, що оголошення. ```js var myVar = 0; ``` -Створіть нову змінну з назвою `myVar` та призначте їй початкове значення `0`. +Створює нову змінну під назвою `myVar` та призначає їй початкове значення `0`. # --instructions-- -Визначте змінну `a` з `var` та ініціалізуйте її до значення `9`. +Визначте змінну `a` за допомогою `var` та ініціалізуйте їй значення `9`. # --hints-- -Вам потрібно ініціалізувати `a` до значення `9`. +Ви повинні ініціалізувати `a` зі значенням `9`. ```js assert(/var\s+a\s*=\s*9(\s*;?\s*)$/.test(code)); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/introducing-else-if-statements.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/introducing-else-if-statements.md index d93beb046d2..42ad7bc009d 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/introducing-else-if-statements.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/introducing-else-if-statements.md @@ -1,6 +1,6 @@ --- id: 56533eb9ac21ba0edf2244db -title: Поняття про команду Else If +title: Вступ до інструкцій else if challengeType: 1 videoUrl: 'https://scrimba.com/c/caeJ2hm' forumTopicId: 18206 @@ -9,7 +9,7 @@ dashedName: introducing-else-if-statements # --description-- -Якщо вам потрібно донести декілька умов, ви можете з'єднати команди з `if` разом з командами `else if`. +Якщо вам потрібно звернутися до декількох умов, можна об’єднати інструкції `if` та `else if`. ```js if (num > 15) { @@ -23,23 +23,23 @@ if (num > 15) { # --instructions-- -Перетворіть оператори використовуючи команди `else if`. +Змініть логіку, щоб використовувати інструкції `else if`. # --hints-- -Щонайменше потрібно мати дві команди `else` +Ви повинні мати принаймні дві інструкції `else` ```js assert(code.match(/else/g).length > 1); ``` -Щонайменше потрібно мати дві команди `if` +Ви повинні мати принаймні дві інструкції `if` ```js assert(code.match(/if/g).length > 1); ``` -Кожен блок коду `if else` повинен мати закриті і відкриті фігурні дужки. +Ви повинні мати початкові та кінцеві фігурні дужки для кожного блоку коду `if else`. ```js assert( diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/introducing-else-statements.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/introducing-else-statements.md index 0e027de0c86..37cdb67743f 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/introducing-else-statements.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/introducing-else-statements.md @@ -1,6 +1,6 @@ --- id: 56533eb9ac21ba0edf2244da -title: Поняття про команду Else +title: Вступ до інструкцій else challengeType: 1 videoUrl: 'https://scrimba.com/c/cek4Efq' forumTopicId: 18207 @@ -9,7 +9,7 @@ dashedName: introducing-else-statements # --description-- -Коли умова команди `if` правильна, то наступний блок з кодом виконується. Що ж коли ця умова хибна? Зазвичай нічого не станеться. У випадку `else`, альтернативний блок коду може спрацювати. +Якщо умова інструкції `if` правильна, то виконується наступний блок коду. А якщо умова хибна? Зазвичай нічого не станеться. У випадку інструкції `else` може спрацювати альтернативний блок коду. ```js if (num > 10) { @@ -21,7 +21,7 @@ if (num > 10) { # --instructions-- -Об’єднайте команди `if` в єдину команду `if/else`. +Об’єднайте інструкції `if` в єдину інструкцію `if/else`. # --hints-- @@ -31,7 +31,7 @@ if (num > 10) { assert(code.match(/if/g).length === 1); ``` -Вам слід використати команду `else` +Ви повинні використати інструкцію `else` ```js assert(/else/g.test(code)); @@ -61,7 +61,7 @@ assert(testElse(6) === 'Bigger than 5'); assert(testElse(10) === 'Bigger than 5'); ``` -Не варто змінювати код вище або нижче зазначених коментарів. +Не змінюйте код над/під зазначеним коментарем. ```js assert(/let result = "";/.test(code) && /return result;/.test(code)); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/iterate-odd-numbers-with-a-for-loop.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/iterate-odd-numbers-with-a-for-loop.md index 61aa53890e2..1484fe4f584 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/iterate-odd-numbers-with-a-for-loop.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/iterate-odd-numbers-with-a-for-loop.md @@ -1,6 +1,6 @@ --- id: 56104e9e514f539506016a5c -title: Ітерація непарних чисел у циклі for +title: Ітерація непарних чисел за допомогою циклу for challengeType: 1 videoUrl: 'https://scrimba.com/c/cm8n7T9' forumTopicId: 18212 @@ -9,9 +9,9 @@ dashedName: iterate-odd-numbers-with-a-for-loop # --description-- -Цикли for не повинні повторювати один одного по черзі. При зміні `final-expression`ми можемо порахувати парними числами. +Цикли for не обов’язково повинні повторювати одне число за раз. Змінюючи наш `final-expression`, ми можемо перерахувати лише парні числа. -Розпочнемо з `i = 0` та створимо цикл, коли `i < 10`. Збільшуватимемо значення `i` на 2 в кожному циклі при тому, що `i += 2`. +Розпочнемо з `i = 0` та створимо цикл, коли `i < 10`. Кожного циклу ми збільшуватимемо `i` на 2 за допомогою `i += 2`. ```js const ourArray = []; @@ -21,7 +21,7 @@ for (let i = 0; i < 10; i += 2) { } ``` -`ourArray` тепер міститиме `[0, 2, 4, 6, 8]`. Тепер змінимо нашу `initialization` так, щоб ми могли рахувати за непарними числами. +Тепер `ourArray` міститиме `[0, 2, 4, 6, 8]`. Змінимо нашу `initialization` так, щоб ми могли перерахувати непарні числа. # --instructions-- @@ -29,13 +29,13 @@ for (let i = 0; i < 10; i += 2) { # --hints-- -Для цього потрібно використовувати цикл `for`. +Ви повинні використати цикл `for`. ```js assert(/for\s*\([^)]+?\)/.test(code)); ``` -`myArray` повинне дорівнювати `[1, 3, 5, 7, 9]`. +`myArray` повинен дорівнювати `[1, 3, 5, 7, 9]`. ```js assert.deepEqual(myArray, [1, 3, 5, 7, 9]); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/iterate-through-an-array-with-a-for-loop.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/iterate-through-an-array-with-a-for-loop.md index 84d6820c899..4e8bd19e667 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/iterate-through-an-array-with-a-for-loop.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/iterate-through-an-array-with-a-for-loop.md @@ -1,6 +1,6 @@ --- id: 5675e877dbd60be8ad28edc6 -title: Ітерація через масив за допомогою циклу For +title: Ітерація масиву за допомогою циклу for challengeType: 1 videoUrl: 'https://scrimba.com/c/caeR3HB' forumTopicId: 18216 @@ -9,7 +9,7 @@ dashedName: iterate-through-an-array-with-a-for-loop # --description-- -Ітерація через вміст масиву є поширеною задачею у JavaScript. Це можна робити за допомогою циклу `for`. Цей код буде виводити кожен елемент масиву `arr` на консоль: +У JavaScript часто доводиться перебрати вміст масиву. Це можна зробити за допомогою циклу `for`. Цей код виводитиме кожен елемент масиву `arr` на консоль: ```js const arr = [10, 9, 8, 7, 6]; @@ -19,11 +19,11 @@ for (let i = 0; i < arr.length; i++) { } ``` -Пам'ятайте, що масиви мають індексацію, яка рахується від нуля і це означає, що останній індекс масиву - це `length - 1`. Нашою умовою для цього циклу є `i < arr.length`, який зупиняє цикл, коли `i` дорівнює `length`. У цьому випадку останньою ітерацією є `i === 4`, тобто коли `i` дорівнює `arr.length - 1` і виводить `6` на консоль. Тоді `i` збільшується на `5`, і цикл закінчується тому, що код `i < arr.length` є `false`. +Пам'ятайте, що масиви мають індексацію на основі нуля і це означає, що останнім індексом масиву є `length - 1`. Нашою умовою для цього циклу є `i < arr.length`, який зупиняє цикл, коли `i` дорівнює `length`. У цьому випадку останньою ітерацією є `i === 4`, тобто коли `i` дорівнює `arr.length - 1` і виводить `6` на консоль. Тоді `i` збільшується до `5`, і цикл закінчується через те, що `i < arr.length` є `false`. # --instructions-- -Оголосіть та ініціалізуйте змінну `total` до `0`. Використовуйте цикл `for` для додавання значення кожного елементу масиву `myArr` до `total`. +Оголосіть та ініціалізуйте змінну `total` до `0`. Використайте цикл `for`, щоб додати значення кожного елемента масиву `myArr` до `total`. # --hints-- @@ -39,13 +39,13 @@ assert(code.match(/(var|let|const)\s*?total\s*=\s*0.*?;?/)); assert(total === 20); ``` -Слід використовувати цикл `for` для ітерації через `myArr`. +Ви повинні використати цикл `for`, щоб перебрати `myArr`. ```js assert(/for\s*\(/g.test(code) && /myArr\s*\[/g.test(code)); ``` -Не потрібно намагатися напряму призначити `total` значення 20. +Не потрібно намагатися напряму присвоїти значення 20 до `total`. ```js assert(!__helpers.removeWhiteSpace(code).match(/total[=+-]0*[1-9]+/gm)); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/iterate-with-javascript-do...while-loops.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/iterate-with-javascript-do...while-loops.md index 779306c8279..bb63650e883 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/iterate-with-javascript-do...while-loops.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/iterate-with-javascript-do...while-loops.md @@ -1,6 +1,6 @@ --- id: 5a2efd662fb457916e1fe604 -title: Ітерація з "do...while" циклами, JavaScript +title: Ітерація з циклами do...while у JavaScript challengeType: 1 videoUrl: 'https://scrimba.com/c/cDqWGcp' forumTopicId: 301172 @@ -9,7 +9,7 @@ dashedName: iterate-with-javascript-do---while-loops # --description-- -Наступний вид циклів, який ви вивчите, називається `do...while` циклом. Він називається `do...while` циклом, тому що, спочатку, не зважаючи ні на що, він `do` (робить) одну передачу коду, а потім продовжує виконувати цикл `while` поки вказана умова обчислюється до `true`. +Наступним ви вивчите цикл `do...while`. Цикл `do...while` називається так, бо спочатку він щось виконує у коді (`do`), а потім продовжує цикл (`while`), доки умова не становитиме `true`. ```js const ourArray = []; @@ -21,7 +21,7 @@ do { } while (i < 5); ``` -Приклад вище поводиться аналогічно з іншими типами циклів, і результуючий масив буде виглядати як `[0, 1, 2, 3, 4]`. Однак, що відрізняє `do...while` від інших циклів, так це те, як він поводиться, коли умова підводить при першій перевірці. Let's see this in action. Here is a regular `while` loop that will run the code in the loop as long as `i < 5`: +Наведений вище приклад поводиться подібно до інших типів циклів, і кінцевий масив матиме такий вигляд: `[0, 1, 2, 3, 4]`. Однак цикл `do...while` відрізняється від інших циклів своєю поведінкою, коли умова не відповідає першій перевірці. Розглянемо на дії. Ось звичайний цикл `while`, який запускає код за умови, що `i < 5`: ```js const ourArray = []; @@ -33,7 +33,7 @@ while (i < 5) { } ``` -У цьому прикладі ми ініціалізуємо значення `ourArray` до порожнього масиву і значення `i` до 5. Коли ми виконуємо `while` цикл, умова обчислюється до `false`, тому що `i` не менше ніж 5, таким чином ми не виконуємо код всередині циклу. Результатом є те, що до `ourArray` не буде додано ніяких значень і він все ще виглядатиме, як `[]`, коли всі коди, в наведеному вище прикладі, вже завершили роботу. А зараз погляньте на `do...while` цикл: +У цьому прикладі ми ініціалізуємо значення `ourArray` до порожнього масиву і значення `i` до 5. Коли ми виконуємо цикл `while`, умова обчислюється як `false`, оскільки `i` не менше за 5, тому ми не виконуємо код всередині циклу. Результатом є те, що `ourArray` не матиме доданих значень і досі виглядатиме як `[]`, коли весь код у прикладі вище вже завершить виконання. А зараз погляньте на цикл `do...while`: ```js const ourArray = []; @@ -45,27 +45,27 @@ do { } while (i < 5); ``` -У цьому випадку, ми ініціалізуємо значення `i` до 5, так само, як ми зробили з `while` циклом. Коли ми доходимо до наступного рядка, то бачимо, що умови для обчислення немає. Таким чином, ми рухаємось до коду, що знаходиться у фігурних дужках, і виконуємо його. Ми додамо єдиний елемент до масиву, а потім збільшимо `i` перед тим, як перейти до перевірки умови. Коли ми нарешті обчислимо умову `i < 5` в останньому рядку, ми побачимо, що зараз `i` становить 6, що провалює перевірку умови. Тому, ми виходимо з циклу і завершуємо роботу. Наприкінці наведеного вище прикладу, значення `ourArray` становить `[5]`. В цілому, `do...while` цикл гарантує те, що код всередині циклу буде виконуватися принаймні один раз. Давайте спробуємо підготувати `do...while` цикл до роботи, висуваючи значення до масиву. +У цьому випадку ми ініціалізуємо значення `i` до 5, так само, як ми зробили з циклом `while`. Коли ми доходимо до наступного рядка, то бачимо, що немає умови, тому ми переходимо до коду у фігурних дужках та виконуємо його. Ми додамо один елемент до масиву та збільшимо `i` перед тим, як перейти до перевірки умови. Коли ми обчислимо умову `i < 5` в останньому рядку, ми побачимо, що зараз `i` дорівнює 6 та не проходить перевірку умови, тому ми виходимо з циклу і завершуємо роботу. В кінці вищеподаного прикладу, значення `ourArray` становить `[5]`. По суті, цикл `do...while` гарантує те, що код всередині циклу виконається принаймні один раз. Спробуємо заставити цикл `do...while` працювати, передаючи значення до масиву. # --instructions-- -В коді змініть `while` цикл на `do...while` цикл і він висуватиме лише число `10` до `myArray`, а `i` буде дорівнювати `11`, коли код закінчить роботу. +Змініть цикл `while` у коді на цикл `do...while` так, щоб цикл передавав лише число `10` до `myArray`, та `i` дорівнювала `11`, коли код закінчить виконання. # --hints-- -Для цього завдання вам слід використовувати `do...while` цикл. +Для цього завдання ви повинні використати цикл `do...while`. ```js assert(code.match(/do/g)); ``` -`myArray` повинне дорівнювати `[10]`. +`myArray` повинен дорівнювати `[10]`. ```js assert.deepEqual(myArray, [10]); ``` -`i` повинне дорівнювати `11` +`i` повинна дорівнювати `11` ```js assert.equal(i, 11); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/iterate-with-javascript-for-loops.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/iterate-with-javascript-for-loops.md index 61fe604ef9c..eb5f4b8a640 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/iterate-with-javascript-for-loops.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/iterate-with-javascript-for-loops.md @@ -1,6 +1,6 @@ --- id: cf1111c1c11feddfaeb5bdef -title: Ітерація для циклів з JavaScript +title: Ітерація з циклами for у JavaScript challengeType: 1 videoUrl: 'https://scrimba.com/c/c9yNVCe' forumTopicId: 18219 @@ -9,21 +9,21 @@ dashedName: iterate-with-javascript-for-loops # --description-- -Ви можете виконати один і той самий код декілька разів, використовуючи цикл. +Ви можете виконати один і той самий код декілька разів за допомогою циклу. -Найбільш поширеним типом JavaScript циклу є `for` цикл, тому що він виконується протягом певної кількості разів. +Найпоширенішим типом циклу в JavaScript є `for`, оскільки він виконується певну кількість разів. -For-цикли визнано трьома додатковими виразами, які розділені крапкою з комою: +Цикли for оголошуються з трьома додатковими виразами, які розділені крапкою з комою: -`for (a; b; c)`, де `a` — це твердження ініціалізації, `b` — твердження умови, а `c` — остаточний вираз. +`for (a; b; c)`, де `a` є інструкцією ініціалізації, `b` є інструкцією умови, а `c` є кінцевим виразом. -Твердження ініціалізації виконується лише один раз, перед початком циклу. Воно переважно використовується для визначення і налаштування змінної циклу. +Інструкція ініціалізації виконується лише один раз (перед початком циклу). Її переважно використовують, щоб визначити та налаштувати змінну циклу. -Твердження умови обчислюється на початку кожної ітерації циклу і продовжуватиметься до тих пір, поки не обчислиться до `true`. Коли, на початку ітерації, умова становить `false`, цикл припинить виконуватись. Це означає те, що якщо умова починається як "false", ваш цикл ніколи не виконається. +Інструкція умови обчислюється на початку кожної ітерації циклу і продовжуватиметься до тих пір, поки не обчислиться до `true`. Коли на початку ітерації умова становить `false`, цикл припинить виконуватись. Це означає те, що якщо умова починається як «false», ваш цикл ніколи не виконається. -Остаточний вираз виконується наприкінці кожної ітерації циклу, перед перевіркою наступної умови і, зазвичай, використовується для того, щоб збільшити або зменшити лічильник циклу. +Кінцевий вираз виконується в кінці кожної ітерації циклу, перед перевіркою наступної умови і, зазвичай, використовується для того, щоб збільшити або зменшити лічильник. -У наступному прикладі ми ініціалізуємо та ітеруємо `i = 0` допоки наша умова `i < 5` не буде правильною. Ми збільшимо `i` на `1` у кожній ітерації циклу `i++` у ролі нашого остаточного виразу. +У наступному прикладі ми ініціалізуємо з `i = 0` та ітеруємо, доки наша умова `i < 5` не буде істинною. Ми збільшимо `i` на `1` у кожній ітерації циклу з кінцевим виразом `i++`. ```js const ourArray = []; @@ -33,21 +33,21 @@ for (let i = 0; i < 5; i++) { } ``` -`ourArray` тепер матиме значення `[0, 1, 2, 3, 4]`. +Тепер `ourArray` матиме значення `[0, 1, 2, 3, 4]`. # --instructions-- -Використовуйте `for` цикл для того, щоб перемістити значення 1 через 5 на `myArray`. +Використайте цикл `for`, щоб передати значення від 1 до 5 до `myArray`. # --hints-- -Для цього вам слід використовувати `for` цикл. +Ви повинні використати цикл `for`. ```js assert(/for\s*\([^)]+?\)/.test(code)); ``` -`myArray` повинне дорівнювати `[1, 2, 3, 4, 5]`. +`myArray` повинен дорівнювати `[1, 2, 3, 4, 5]`. ```js assert.deepEqual(myArray, [1, 2, 3, 4, 5]); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/iterate-with-javascript-while-loops.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/iterate-with-javascript-while-loops.md index 2d9812b187d..6ad26a95202 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/iterate-with-javascript-while-loops.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/iterate-with-javascript-while-loops.md @@ -1,6 +1,6 @@ --- id: cf1111c1c11feddfaeb1bdef -title: Ітерація циклів JavaScript +title: Ітерація з циклами while у JavaScript challengeType: 1 videoUrl: 'https://scrimba.com/c/c8QbnCM' forumTopicId: 18220 @@ -9,7 +9,7 @@ dashedName: iterate-with-javascript-while-loops # --description-- -Завдяки циклу, Ви можете запустити той самий код декілька разів. +Ви можете виконати один і той самий код декілька разів за допомогою циклу. Перший тип циклу, який ми вивчатимемо, називається `while`, оскільки виконується за заданою істинною умовою і припиняється, як тільки ця умова більше не буде істинною. @@ -23,9 +23,9 @@ while (i < 5) { } ``` -У прикладі вище коду цикл `while` виконуватиметься 5 разів і додаватиме числа від 0 до 4 до `ourArray`. +У вищеподаному прикладі цикл `while` виконуватиметься 5 разів і додаватиме числа від 0 до 4 до `ourArray`. -Спробуймо підготувати цикл while до роботи, розміщуючи значення в масиві даних. +Спробуємо заставити цикл while працювати, передаючи значення до масиву. # --instructions-- @@ -33,13 +33,13 @@ while (i < 5) { # --hints-- -Для цього слід використовувати цикл `while`. +Ви повинні використати цикл `while`. ```js assert(code.match(/while/g)); ``` -`myArray` повинне дорівнювати `[5, 4, 3, 2, 1, 0]`. +`myArray` повинен дорівнювати `[5, 4, 3, 2, 1, 0]`. ```js assert.deepEqual(myArray, [5, 4, 3, 2, 1, 0]); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/local-scope-and-functions.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/local-scope-and-functions.md index 8160a978569..8b125e10a07 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/local-scope-and-functions.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/local-scope-and-functions.md @@ -9,9 +9,9 @@ dashedName: local-scope-and-functions # --description-- -Змінні, оголошені в межах функції, мають локальну область дії (як і параметри функції). Це означає, що вони є видимими лише в межах цієї функції. +Змінні, оголошені в межах функції, мають локальну область видимості (як і параметри функції). Це означає, що вони видимі лише в межах цієї функції. -Це функція `myTest` з локальною змінною `loc`. +Ось функція `myTest` з локальною змінною під назвою `loc`. ```js function myTest() { @@ -23,11 +23,11 @@ myTest(); console.log(loc); ``` -Виклик функції `myTest()` відображатиме рядок `foo` в консолі. Рядок `console.log(loc)` (за межами функції `myTest`) видасть помилку, тому що `loc` не визначено поза функцією. +Виклик функції `myTest()` показуватиме рядок `foo` на консолі. Рядок `console.log(loc)` (за межами функції `myTest`) видасть помилку, тому що `loc` не визначено поза функцією. # --instructions-- -Редактор має два `console.log` щоб допомогти вам побачити, що відбувається. Перевіряйте консоль, коли програмуєте, щоб побачити зміни. Оголосіть локальну змінну `myVar` всередині `myLocalScope` та запустіть тести. +Редактор має два `console.log`, щоб ви могли бачити, що відбувається. Перевіряйте консоль, коли програмуєте, щоб побачити зміни. Оголосіть локальну змінну `myVar` всередині `myLocalScope` та запустіть тести. **Примітка:** на консолі досі буде `ReferenceError: myVar is not defined`, але це не спричинить збій тестів. @@ -43,7 +43,7 @@ function declared() { assert.throws(declared, ReferenceError); ``` -Вам слід додати локальну змінну `myVar`. +Ви повинні додати локальну змінну `myVar`. ```js assert( diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/logical-order-in-if-else-statements.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/logical-order-in-if-else-statements.md index b6bd76085d5..ded945f387e 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/logical-order-in-if-else-statements.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/logical-order-in-if-else-statements.md @@ -1,6 +1,6 @@ --- id: 5690307fddb111c6084545d7 -title: Логічна послідовність в команді If Else +title: Логічна послідовність в інструкції if else challengeType: 1 videoUrl: 'https://scrimba.com/c/cwNvMUV' forumTopicId: 18228 @@ -9,9 +9,9 @@ dashedName: logical-order-in-if-else-statements # --description-- -Послідовність є важливою в командах `if` та `else if`. +В інструкціях `if` та `else if` важлива послідовність. -Функція виконується зверху до низу, тому уважно перевірте, яке речення стоїть першим. +Функція виконується зверху донизу, тому уважно перевіряйте, яка інструкція написана першою. Візьмемо ці дві функції як приклад. @@ -29,7 +29,7 @@ function foo(x) { } ``` -А друга лише міняє порядок команд: +А друга лише змінює порядок інструкцій: ```js function bar(x) { @@ -43,18 +43,18 @@ function bar(x) { } ``` -Оскільки ці дві функції виглядають майже однаково, навіть якщо ми надаємо однакове число обом, то отримуємо різні результати. +Ці функції виглядають майже однаково, але ми отримаємо різні результати, навіть якщо надамо те саме число обом. ```js foo(0) bar(0) ``` -`foo(0)` видаватиме рядок `Less than one`, і `bar(0)` видаватиме рядок `Less than two`. +`foo(0)` повертатиме рядок `Less than one`, а `bar(0)` повертатиме рядок `Less than two`. # --instructions-- -Змініть логічну послідовність функції так, щоб вона видавала правильні команди у всіх випадках. +Змініть логічну послідовність функції так, щоб вона повертала правильні твердження у всіх випадках. # --hints-- diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/manipulate-arrays-with-pop.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/manipulate-arrays-with-pop.md index 0ea01b7a03b..b150e526880 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/manipulate-arrays-with-pop.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/manipulate-arrays-with-pop.md @@ -1,6 +1,6 @@ --- id: 56bbb991ad1ed5201cd392cc -title: Керування масивами за допомогою pop() +title: Маніпулювання масивами за допомогою pop() challengeType: 1 videoUrl: 'https://scrimba.com/c/cRbVZAB' forumTopicId: 18236 @@ -9,11 +9,11 @@ dashedName: manipulate-arrays-with-pop # --description-- -Іншим способом змінити дані у масиві можна за допомогою функції `.pop()`. +Змінити дані у масиві також можна за допомогою функції `.pop()`. -`.pop()` використовується для виведення значення з кінця масиву. Ми можемо зберігати значення, яке виводиться, присвоюючи його змінній. Іншими словами, `.pop()` видаляє останній елемент з масиву і повертає цей елемент. +`.pop()` використовують для виведення останнього значення масиву. Ми можемо зберігати виведене значення, присвоюючи його змінній. Іншими словами, `.pop()` видаляє останній елемент з масиву і повертає цей елемент. -Будь-який тип запису може бути виведений з масиву - цифри, рядки, навіть вкладені масиви. +З масиву можна вивести будь-який запис: числа, рядки, навіть вкладені масиви. ```js const threeArr = [1, 4, 6]; @@ -22,11 +22,11 @@ console.log(oneDown); console.log(threeArr); ``` -Перший `console.log` відображатиме значення `6`, а другий - значення `[1, 4]`. +Перший `console.log` показуватиме значення `6`, а другий показуватиме `[1, 4]`. # --instructions-- -Використовуйте функцію `.pop()`, щоб видалити останній елемент з `myArray` та призначити значення, яке виводиться для `removedFromMyArray`. +Використайте функцію `.pop()`, щоб вилучити останній елемент з `myArray` та призначити виведене значення до нової змінної `removedFromMyArray`. # --hints-- @@ -44,7 +44,7 @@ assert( ); ``` -Вам слід використовувати `pop()` на `myArray`. +Ви повинні використати `pop()` на `myArray`. ```js assert(/removedFromMyArray\s*=\s*myArray\s*.\s*pop\s*(\s*)/.test(code)); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/manipulate-arrays-with-push.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/manipulate-arrays-with-push.md index 68e95c0b1d3..a9251417f7f 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/manipulate-arrays-with-push.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/manipulate-arrays-with-push.md @@ -1,6 +1,6 @@ --- id: 56bbb991ad1ed5201cd392cb -title: Керування масивами за допомогою push() +title: Маніпулювання масивами за допомогою push() challengeType: 1 videoUrl: 'https://scrimba.com/c/cnqmVtJ' forumTopicId: 18237 @@ -9,9 +9,9 @@ dashedName: manipulate-arrays-with-push # --description-- -Найпростіший спосіб додати дані до кінця масиву - це використати функцію `push()`. +Найпростіший спосіб додати дані до кінця масиву – використати функцію `push()`. -`.push()` приймає один або більше parameters і "виштовхує" їх в кінець масиву. +`.push()` приймає один або більше параметрів і «виштовхує» їх в кінець масиву. Приклади: @@ -23,7 +23,7 @@ const arr2 = ["Stimpson", "J", "cat"]; arr2.push(["happy", "joy"]); ``` -`arr1` зараз набуває значення `[1, 2, 3, 4]` та `arr2` набуває значення `["Stimpson", "J", "cat", ["happy", "joy"]]`. +Тепер `arr1` має значення `[1, 2, 3, 4]`, а `arr2` має значення `["Stimpson", "J", "cat", ["happy", "joy"]]`. # --instructions-- @@ -31,7 +31,7 @@ arr2.push(["happy", "joy"]); # --hints-- -`myArray` тепер має дорівнювати `[["John", 23], ["cat", 2], ["dog", 3]]`. +Тепер `myArray` повинен дорівнювати `[["John", 23], ["cat", 2], ["dog", 3]]`. ```js assert( diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/manipulate-arrays-with-shift.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/manipulate-arrays-with-shift.md index 6cbee870c04..22d5bd857aa 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/manipulate-arrays-with-shift.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/manipulate-arrays-with-shift.md @@ -1,6 +1,6 @@ --- id: 56bbb991ad1ed5201cd392cd -title: Керування масивами за допомогою shift() +title: Маніпулювання масивами за допомогою shift() challengeType: 1 videoUrl: 'https://scrimba.com/c/cRbVETW' forumTopicId: 18238 @@ -9,26 +9,26 @@ dashedName: manipulate-arrays-with-shift # --description-- -`pop()` завжди видаляє останній елемент масиву. А якщо ти хочеш видалити перший? +`pop()` завжди видаляє останній елемент масиву. А якщо потрібно видалити перший? -Саме тут нам на допомогу може прийти `.shift()`. Це працює точно так як `.pop()`, за винятком того, що видаляє перший елемент замість останнього. +Саме тут нам на допомогу приходить `.shift()`. Вона працює так само, як і `.pop()`, але видаляє перший елемент замість останнього. -Наприклад: +Приклад: ```js const ourArray = ["Stimpson", "J", ["cat"]]; const removedFromOurArray = ourArray.shift(); ``` -`removedFromOurArray` матиме значення рядка `Stimpson` та `ourArray` отримає `["J", ["cat"]]`. +`removedFromOurArray` матиме значення рядка `Stimpson`, а `ourArray` матиме значення `["J", ["cat"]]`. # --instructions-- -Використовуйте функцію `.shift()`, щоб видалити перший елемент з `myArray` та призначивши значення "викреслено" для нової змінної `removedFromMyArray`. +Використайте функцію `.shift()`, щоб вилучити перший елемент з `myArray` та призначити виведене значення до нової змінної `removedFromMyArray`. # --hints-- -`myArray` має дорівнювати `[["dog", 3]]`. +Тепер `myArray` повинен дорівнювати `[["dog", 3]]`. ```js assert( diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/manipulate-arrays-with-unshift.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/manipulate-arrays-with-unshift.md index 811b575cae0..ff7bcc348eb 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/manipulate-arrays-with-unshift.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/manipulate-arrays-with-unshift.md @@ -1,6 +1,6 @@ --- id: 56bbb991ad1ed5201cd392ce -title: Керування масивами за допомогою unshift() +title: Маніпулювання масивами за допомогою unshift() challengeType: 1 videoUrl: 'https://scrimba.com/c/ckNDESv' forumTopicId: 18239 @@ -13,7 +13,7 @@ dashedName: manipulate-arrays-with-unshift `.unshift()` працює в точності як `.push()`, але замість додавання елемента в кінець масиву, `unshift()` додає елемент на початку масиву. -Наприклад: +Приклад: ```js const ourArray = ["Stimpson", "J", "cat"]; @@ -29,7 +29,7 @@ ourArray.unshift("Happy"); # --hints-- -`myArray` тепер має мати `[["Paul", 35], ["dog", 3]]`. +Тепер `myArray` повинен мати `[["Paul", 35], ["dog", 3]]`. ```js assert( diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/manipulating-complex-objects.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/manipulating-complex-objects.md index 3523aab691a..5760afc274f 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/manipulating-complex-objects.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/manipulating-complex-objects.md @@ -1,6 +1,6 @@ --- id: 56533eb9ac21ba0edf2244cb -title: Керування складними об'єктами +title: Маніпулювання складними об'єктами challengeType: 1 videoUrl: 'https://scrimba.com/c/c9yNMfR' forumTopicId: 18208 @@ -9,9 +9,9 @@ dashedName: manipulating-complex-objects # --description-- -Іноді ви можете зберігати дані в гнучкій Data Structure. Об'єкт JavaScript є одним із способів обробки гнучких даних. Вони створюють можливість довільних комбінацій strings, numbers, booleans, arrays, functions та objects. +Іноді ви можете зберігати дані в гнучкій структурі даних. Об'єкт JavaScript є одним із способів обробки гнучких даних. Вони дозволяють створювати комбінації рядків, чисел, булевих значень, масивів, функцій та об’єктів. -Ось приклад структури складних даних: +Ось приклад складної структури даних: ```js const ourMusic = [ @@ -29,13 +29,13 @@ const ourMusic = [ ]; ``` -Це масив, який містить один об'єкт всередині. Об'єкт має різні частини metadata про альбом. Він також має вкладений масив `formats`. Якщо ви хочете додати більше записів в альбом, це можна зробити, додавши записи до масиву верхнього рівня. Об'єкти зберігають дані у властивості, яка має формат ключ-значення. У прикладі вище, `"artist": "Daft Punk"` - це властивість, що має ключ `artist` і значення `Daft Punk`. +Це масив, який містить один об'єкт всередині. Об'єкт має різні метадані альбому. Він також має вкладений масив `formats`. Якщо ви хочете додати більше записів, додайте їх до масиву верхнього рівня. Об'єкти зберігають дані у властивості, яка має формат «ключ-значення». У прикладі вище властивістю виступає `"artist": "Daft Punk"`, що має ключ `artist` і значення `Daft Punk`. -**Примітка:** Вам потрібно буде розмістити кому після кожного об'єкта в масиві, якщо він не є останнім його об'єктом. +**Примітка:** вам потрібно розмістити кому після кожного об'єкта в масиві, якщо він не є останнім об'єктом. # --instructions-- -Додайте новий альбом до масиву `myMusic`. Додайте `artist` та `title` рядки, `release_year` число та масив рядків `formats`. +Додайте новий альбом до масиву `myMusic`. Додайте рядки `artist` та `title`, число `release_year` та масив рядків `formats`. # --hints-- @@ -45,7 +45,7 @@ const ourMusic = [ assert(Array.isArray(myMusic)); ``` -`myMusic` має мати принаймні два елементи +`myMusic` повинен мати принаймні два елементи ```js assert(myMusic.length > 1); @@ -57,13 +57,13 @@ assert(myMusic.length > 1); myMusic.forEach(object => {assert.typeOf(object, 'object')}) ``` -Ваш об'єкт в `myMusic` повинен мати щонайменше 4 властивості +Ваш об'єкт у `myMusic` повинен мати принаймні 4 властивості ```js myMusic.forEach(object => {assert(Object.keys(object).length > 3); }); ``` -Ваш об'єкт в `myMusic` повинен містити властивість `artist`, яка належить до типу string +Ваш об'єкт у `myMusic` повинен містити властивість `artist`, яка є рядком ```js myMusic.forEach(object => { @@ -72,7 +72,7 @@ myMusic.forEach(object => { }) ``` -Ваш об'єкт в `myMusic` повинен містити властивість `title`, яка належить до типу string +Ваш об'єкт у `myMusic` повинен містити властивість `title`, яка є рядком ```js myMusic.forEach(object => { @@ -81,7 +81,7 @@ myMusic.forEach(object => { }) ``` -Ваш об'єкт в `myMusic` повинен містити властивість `release_year`, яка належить до типу number +Ваш об'єкт у `myMusic` повинен містити властивість `release_year`, яка є числом ```js myMusic.forEach(object => { @@ -99,7 +99,7 @@ myMusic.forEach(object => { }) ``` -`formats` повинен бути масивом рядків з щонайменше двома елементами +`formats` повинен бути масивом рядків з принаймні двома елементами ```js myMusic.forEach(object => { diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/modify-array-data-with-indexes.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/modify-array-data-with-indexes.md index 85ec6f9e950..7f0e8810496 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/modify-array-data-with-indexes.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/modify-array-data-with-indexes.md @@ -9,7 +9,7 @@ dashedName: modify-array-data-with-indexes # --description-- -На відміну від рядків, записи масиву можуть бути змінювані, навіть якщо масив був оголошений з `const`. +На відміну від рядків, записи масиву є мінливими та їх легко змінити, навіть якщо масив оголошено з `const`. **Приклад** @@ -18,17 +18,17 @@ const ourArray = [50, 40, 30]; ourArray[0] = 15; ``` -`ourArray` має значення `[15, 40, 30]`. +Тепер `ourArray` має значення `[15, 40, 30]`. -**Примітка:** ніколи не вставляйте пробіл між іменем масиву і квадратними дужками, наприклад `array [0]`. Хоча JavaScript прочитає це правильно, але це може створити труднощі для інших програмістів, які читатимуть ваш код. +**Примітка:** ніколи не вставляйте пробіл між назвою масиву і квадратними дужками, наприклад `array [0]`. Хоча JavaScript і може це обробити, таке написання може ускладнити читання коду для інших програмістів. # --instructions-- -Змінюйте дані, що зберігаються в індексі `0` масиву `myArray` до значення `45`. +Змініть дані в індексі `0` масиву `myArray` на значення `45`. # --hints-- -`myArray` тепер повинен бути `[45, 64, 99]`. +Тепер `myArray` повинен бути `[45, 64, 99]`. ```js assert( @@ -47,7 +47,7 @@ assert( ); ``` -Слід використовувати правильний індекс для зміни значення у `myArray`. +Ви повинні використати правильний індекс, щоб змінити значення у `myArray`. ```js assert( diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/multiple-identical-options-in-switch-statements.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/multiple-identical-options-in-switch-statements.md index 9d3ca518d24..a3b91eae622 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/multiple-identical-options-in-switch-statements.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/multiple-identical-options-in-switch-statements.md @@ -1,6 +1,6 @@ --- id: 56533eb9ac21ba0edf2244df -title: Кілька ідентичних параметрів у інструкціях перемикання +title: Обробка ідентичних параметрів в інструкціях switch challengeType: 1 videoUrl: 'https://scrimba.com/c/cdBKWCV' forumTopicId: 18242 @@ -9,7 +9,7 @@ dashedName: multiple-identical-options-in-switch-statements # --description-- -Якщо команда `break` не включена в `switch` команди `case`, наступна (і) команди `case` буде виконуватись до тих пір поки `break` не буде виконано. Якщо у вас є кілька входів з одним і тим же виходом, ви можете подати їх в `switch` такої команди як ця: +Якщо інструкція `break` виключена із `case` інструкції `switch`, наступні інструкції `case` будуть виконуватись доки не зустрінуть `break`. Якщо у вас декілька вводів з одним виводом, ви можете подати їх в інструкції `switch`, ось так: ```js let result = ""; @@ -24,16 +24,16 @@ switch (val) { } ``` -Кейси 1,2,3 дадуть один і той же результат. +Кейси 1, 2 та 3 матимуть однаковий результат. # --instructions-- -Запис інструкції перемикача для установки `answer` для наступних діапазонів: +Напишіть інструкції switch, щоб налаштувати `answer` для наступних діапазонів: `1-3` - `Low` `4-6` - `Mid` `7-9` - `High` -**Note:** Ви повинні мати `case` для кожного числа в діапазоні. +**Примітка:** ви повинні мати інструкцію `case` для кожного числа в діапазоні. # --hints-- @@ -91,13 +91,13 @@ assert(sequentialSizes(8) === 'High'); assert(sequentialSizes(9) === 'High'); ``` -Ви не повинні використовувати будь які `if` або `else` команди +Ви не повинні використовувати інструкції `if` або `else` ```js assert(!/else/g.test(code) || !/if/g.test(code)); ``` -У вас має бути дев'ять `case` команд +Ви повинні мати дев'ять інструкцій `case` ```js assert(code.match(/case/g).length === 9); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/multiply-two-decimals-with-javascript.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/multiply-two-decimals-with-javascript.md index 35802e6ba4b..b25ea8e3dcf 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/multiply-two-decimals-with-javascript.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/multiply-two-decimals-with-javascript.md @@ -9,7 +9,7 @@ dashedName: multiply-two-decimals-with-javascript # --description-- -У JavaScript, ви можете здійснювати розрахунки як з десятковими числами, так і цілими числами. +У JavaScript ви можете здійснювати розрахунки як з цілими числами, так і десятковими. Перемножимо два десяткових числа, щоб отримати їх добуток. diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/nest-one-array-within-another-array.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/nest-one-array-within-another-array.md index fd9f9561316..660a29e5776 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/nest-one-array-within-another-array.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/nest-one-array-within-another-array.md @@ -1,6 +1,6 @@ --- id: cf1111c1c11feddfaeb7bdef -title: Вкладіть один масив всередину іншого масиву +title: Вкладення одного масиву в інший challengeType: 1 videoUrl: 'https://scrimba.com/c/crZQZf8' forumTopicId: 18247 @@ -9,13 +9,13 @@ dashedName: nest-one-array-within-another-array # --description-- -Ви також можете вкладати масиви всередину інших масивів, як це показано нижче: +Ви можете вкладати масиви всередину інших масивів, як показано нижче: ```js const teams = [["Bulls", 23], ["White Sox", 45]]; ``` -Це також називається багатовимірний масив. +Це називається багатовимірним масивом. # --instructions-- @@ -23,7 +23,7 @@ const teams = [["Bulls", 23], ["White Sox", 45]]; # --hints-- -`myArray` повинен мати щонайменше один масив, вкладений в інший масив. +`myArray` повинен мати принаймні один масив, вкладений в інший масив. ```js assert(Array.isArray(myArray) && myArray.some(Array.isArray)); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/nesting-for-loops.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/nesting-for-loops.md index 8b8c84165fd..97d20a67345 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/nesting-for-loops.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/nesting-for-loops.md @@ -1,6 +1,6 @@ --- id: 56533eb9ac21ba0edf2244e1 -title: Вкладення для циклів +title: Вкладення циклів for challengeType: 1 videoUrl: 'https://scrimba.com/c/cRn6GHM' forumTopicId: 18248 @@ -9,7 +9,7 @@ dashedName: nesting-for-loops # --description-- -Якщо ви маєте багатовимірний масив, ви можете використати ту ж логіку, що і в попередній точці проходження до циклу через масив і будь-які підмасиви. Ось приклад: +Ви можете використати ту ж логіку для перебору як масиву, так і вкладених масивів, якщо перед вами багатовимірний масив. Ось приклад: ```js const arr = [ @@ -23,11 +23,11 @@ for (let i = 0; i < arr.length; i++) { } ``` -Це виводить кожен піделемент у `arr` по одному. Зверніть увагу, що для внутрішнього циклу ми перевіряємо `.length` цього `arr[i]`, оскільки `arr[i]` і є масивом. +Це виводить кожен вкладений елемент в `arr` по одному. Зверніть увагу, що для внутрішнього циклу ми перевіряємо `.length` цього `arr[i]`, оскільки `arr[i]` і є масивом. # --instructions-- -Змініть функцію `multiplyAll` для того, щоб повернути добуток усіх чисел у підмасивах `arr`. +Змініть функцію `multiplyAll` так, щоб повертався добуток усіх чисел у підмасивах `arr`. # --hints-- diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/passing-values-to-functions-with-arguments.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/passing-values-to-functions-with-arguments.md index de52d4a9e10..5730ae34913 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/passing-values-to-functions-with-arguments.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/passing-values-to-functions-with-arguments.md @@ -1,6 +1,6 @@ --- id: 56533eb9ac21ba0edf2244bd -title: Передача значень до функцій з аргументами +title: Передача значень до функцій за допомогою аргументів challengeType: 1 videoUrl: 'https://scrimba.com/c/cy8rahW' forumTopicId: 18254 @@ -9,7 +9,7 @@ dashedName: passing-values-to-functions-with-arguments # --description-- -Параметри - це змінні, які діють як місця для заповнення тих значень, які вводяться у функцію під час її виклику. Коли функцію визначають, її зазвичай визначають разом з одним або декількома параметрами. Реальні значення, які введені (або "передані") до функції під час її виклику, називаються аргументами. +Параметри – це змінні, які поводяться як заповнювачі тих значень, які потрібно ввести до функції під час її виклику. Функцію зазвичай визначають разом з одним або декількома параметрами. Значення, які вводять (або «передають») до функції під час її виклику, називаються аргументами. Ось функція з двома параметрами, `param1` та `param2`: @@ -19,21 +19,21 @@ function testFun(param1, param2) { } ``` -Потім ми можемо викликати `testFun`, отак: `testFun("Hello", "World");`. Ми передали два рядкові аргументи: `Hello` and `World`. Всередині функції, `param1` дорівнюватиме рядку `Hello`, а `param2` дорівнюватиме рядку `World`. Зверніть увагу на те, що ви можете викликати `testFun` знову, використовуючи різні аргументи та параметри, які візьмуть значення нових аргументів. +Потім ми можемо викликати `testFun`, ось так: `testFun("Hello", "World");`. Ми передали два рядкові аргументи: `Hello` та `World`. Всередині функції `param1` дорівнюватиме рядку `Hello`, а `param2` дорівнюватиме рядку `World`. Зверніть увагу на те, що ви можете викликати `testFun` знову, використовуючи інші аргументи та параметри, які приймуть значення нових аргументів. # --instructions-- -
                                                                                                                                                                                                                                                                                                  1. Створіть функцію з назвою functionWithArgs, яка приймає 2 аргументи і виводить їхню суму в dev-консоль.
                                                                                                                                                                                                                                                                                                  2. Викличте функцію з двома числами так, як аргументи.
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  1. Створіть функцію під назвою functionWithArgs, яка приймає 2 аргументи та виводить їх суму на консолі.
                                                                                                                                                                                                                                                                                                  2. Викличте функцію з двома числами як аргументи.
                                                                                                                                                                                                                                                                                                  # --hints-- -`functionWithArgs` має бути функцією. +`functionWithArgs` повинна бути функцією. ```js assert(typeof functionWithArgs === 'function'); ``` -`functionWithArgs(1,2)` має вивести `3`. +`functionWithArgs(1,2)` повинна вивести `3`. ```js if (typeof functionWithArgs === 'function') { @@ -44,7 +44,7 @@ if (typeof functionWithArgs === 'function') { assert(logOutput == 3); ``` -`functionWithArgs(7,9)` має вивести `16`. +`functionWithArgs(7,9)` повинна вивести `16`. ```js if (typeof functionWithArgs === 'function') { @@ -55,7 +55,7 @@ if (typeof functionWithArgs === 'function') { assert(logOutput == 16); ``` -Вам слід викликати `functionWithArgs` з двома числами після того як визначите його. +Ви повинні викликати `functionWithArgs` з двома числами після того, як визначите її. ```js assert( diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/practice-comparing-different-values.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/practice-comparing-different-values.md index 2bf7df29e0d..27b3882b97d 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/practice-comparing-different-values.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/practice-comparing-different-values.md @@ -1,6 +1,6 @@ --- id: 599a789b454f2bbd91a3ff4d -title: Вчіться порівнювати різні значення +title: Порівняння різних значень на практиці challengeType: 1 videoUrl: 'https://scrimba.com/c/cm8PqCa' forumTopicId: 301174 @@ -9,15 +9,15 @@ dashedName: practice-comparing-different-values # --description-- -В останніх двох задачах, ми вивчили оператор рівності (`==`) та оператор абсолютної рівності (`===`). Пригадаймо пройдену інформацію та спробуймо використати ці оператори знову. +В останніх двох завданнях ми вивчили оператор рівності (`==`) та оператор строгої рівності (`===`). Пригадаємо пройдену інформацію та попрактикуємо ці оператори знову. -Якщо ми порівнюємо значення різних типів, то оператор рівності спершу конвертує типи, а потім обраховує значення. Однак, оператор абсолютної рівності порівнюватиме, як тип даних, так і значення у вихідному вигляді, не конвертуючи типи. +Якщо ми порівнюємо значення різних типів, то оператор рівності спочатку конвертує їх, а потім вирахує значення. А ось оператор строгої рівності порівнюватиме тип даних та значення у вихідному вигляді, не конвертуючи їх. -**Наприклад:** +**Приклади** -`3 == '3'` повертає результат `true` тому, що JavaScript конвертує рядок у число. `3 === '3'` returns `false` because the types are different and type conversion is not performed. +`3 == '3'` повертає `true`, оскільки JavaScript конвертує рядок у число. `3 === '3'` повертає `false`, оскільки це різні типи і конвертація не виконується. -**Примітка:** В JavaScript, ви можете визначити тип змінної або значення за допомогою оператора `typeof`, наступним чином: +**Примітка:** у JavaScript можна визначити тип змінної або значення за допомогою оператора `typeof`, ось так: ```js typeof 3 @@ -28,7 +28,7 @@ typeof '3' # --instructions-- -Функція `compareEquality` в редакторі порівнює два значення за допомогою оператора рівності. Змініть функцію так, щоб вона повернула рядок `Equal` лише тоді, коли значення абсолютно рівні. +Функція `compareEquality` в редакторі порівнює два значення за допомогою оператора рівності. Змініть функцію так, щоб вона повернула рядок `Equal` лише тоді, коли значення строго рівні. # --hints-- diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/profile-lookup.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/profile-lookup.md index fd53cebbad6..03954acee4f 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/profile-lookup.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/profile-lookup.md @@ -9,17 +9,17 @@ dashedName: profile-lookup # --description-- -У нас є безліч об'єктів, що представляють різних людей у наших списках контактів. +У нас є масив об'єктів, які представляють різних людей зі списку контактів. -Функція `lookUpProfile` яка приймає `name` та властивість (`prop`) як аргументи були попередньо записані для вас. +Функція `lookUpProfile`, яка приймає `name` та властивість (`prop`) як аргументи, вже записана для вас. -Функція має перевірити, чи `name` є фактичним контактом `firstName` і даний параметр (`prop`) є властивістю цього контакту. +Функція повинна перевірити, чи `name` дійсно є ім’ям (`firstName`) контакту і надана властивість (`prop`) є властивістю цього контакту. -Якщо обидва є правдою, то поверніть "значення" цієї власності. +Якщо обидва є істинними, то поверніть значення цієї власності. Якщо `name` не відповідає жодному контакту, поверніть рядок `No such contact`. -Якщо `prop` не відповідає жодним дійсним властивостям контакту, знайденим за відповідністю `name` потім поверніться на рядок `No such property`. +Якщо `prop` не збігається з жодною дійсною властивістю контакту, що відповідає `name`, поверніть рядок `No such property`. # --hints-- diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/quoting-strings-with-single-quotes.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/quoting-strings-with-single-quotes.md index cf4c208fffa..4a1d059ddf1 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/quoting-strings-with-single-quotes.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/quoting-strings-with-single-quotes.md @@ -1,6 +1,6 @@ --- id: 56533eb9ac21ba0edf2244b4 -title: Цитування рядків з одинарними лапками +title: Цитування рядків одинарними лапками challengeType: 1 videoUrl: 'https://scrimba.com/c/cbQmnhM' forumTopicId: 18260 @@ -9,14 +9,14 @@ dashedName: quoting-strings-with-single-quotes # --description-- -Значення String у JavaScript може бути записане з одинарними чи подвійними лапками, якщо ті ж самі лапки використовуються на початку та в кінці. На відміну від інших мов програмування, одинарні і подвійні лапки працюють однаково в JavaScript. +Значення рядків у JavaScript можна записати в одинарних чи подвійних лапках: головне, щоб спочатку та вкінці використовувались ті самі лапки. На відміну від інших мов програмування, у JavaScript одинарні і подвійні лапки працюють однаково. ```js const doubleQuoteStr = "This is a string"; const singleQuoteStr = 'This is also a string'; ``` -Причиною використовувати один тип лапок поруч з іншим є використання обидвох типів лапок у рядку. Наприклад, коли ви хочете відтворити розмову у рядку і оформити цю розмову лапками. Або ж, коли ви зберігаєте тег `` з різними атрибутами в лапках і все в межах одного рядка. +Іноді можна використати обидва типи лапок в одному рядку. Наприклад, коли потрібно відтворити розмову в рядку і взяти її в лапки. Або ж, коли ви зберігаєте тег `` з різними атрибутами в лапках і все в межах одного рядка. ```js const conversation = 'Finn exclaims to Jake, "Algebraic!"'; @@ -29,21 +29,21 @@ const goodStr = 'Jake asks Finn, "Hey, let\'s go on an adventure?"'; const badStr = 'Finn responds, "Let's go!"'; ``` -В цього випадку `badStr` покаже помилку. +В такому випадку `badStr` покаже помилку. -У goodStr вище, можна спокійно використовувати лапки, додавши зворотну скісну риску `\` як екранований символ. +У goodStr вище можна спокійно використати лапки, додавши зворотну скісну риску `\` як екранований символ. -**Примітка:** Зворотну скісну риску `\` не слід плутати з скісною рискою `/`. Вони мають різні функції. +**Примітка:** не плутайте зворотну скісну риску `\` зі скісною рискою `/`. Вони мають різні функції. # --instructions-- -Змініть поданий рядок на рядок з одинарними лапками на початку і в кінці та не використовуйте екрановані символи. +Змініть поданий рядок на рядок з одинарними лапками спочатку і вкінці, не використовуючи екрановані символи. -Зараз тег `` у рядку може використовувати всюди подвійні лапки. Вам потрібно буде змінити зовнішні лапки на одинарні лапки, щоб видалити екрановані символи. +Наразі тег `` у рядку використовує подвійні лапки всюди. Вам потрібно буде змінити зовнішні лапки на одинарні лапки, щоб видалити екрановані символи. # --hints-- -Вам слід видалити усі зворотні скісні риски (`\`). +Ви повинні видалити всі зворотні скісні риски (`\`). ```js assert( @@ -54,7 +54,7 @@ assert( ); ``` -У вас повинні бути дві одинарні лапки `'` і чотири подвійні лапки `"`. +Ви повинні мати дві одинарні лапки `'` та чотири подвійні лапки `"`. ```js assert(code.match(/"/g).length === 4 && code.match(/'/g).length === 2); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md index b20db1b155d..6e872c248a9 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md @@ -1,6 +1,6 @@ --- id: 56533eb9ac21ba0edf2244cf -title: Збірка записів +title: Колекція музичних альбомів challengeType: 1 forumTopicId: 18261 dashedName: record-collection @@ -8,21 +8,21 @@ dashedName: record-collection # --description-- -Вам наданий літерал об'єкту, який є частиною вашої збірки музичних альбомів. Кожен альбом має свій унікальний ідентифікаційний номер та декілька інших властивостей. Не всі альбоми мають повну інформацію. +Вам надано літерал об'єкта, який представляє вашу колекцію музичних альбомів. Кожен альбом має унікальний id як свій ключ та декілька інших властивостей. Не всі альбоми мають повну інформацію. -Ви починаєте з функції `updateRecords`, яка приймає літерал об'єкту `records`, який містить колекцію музичного альбому, `id`, `prop` (такі як `artist` чи `tracks`), і `value`. Завершіть функцію, використовуючи правила нижче, щоб змінити об'єкт, переданий до функції. +Ви починаєте з функції `updateRecords`, що приймає літерал об'єкта `records`, який містить колекцію музичних альбомів, `id`, `prop` (типу `artist` чи `tracks`) та `value`. Завершіть функцію, використовуючи правила нижче, щоб змінити об'єкт, переданий до функції. -- Ваша функція повинна завжди повертати весь об'єкт збірки записів. -- Якщо `prop` це не `tracks` і `value` не є пустим рядком, то оновіть або встановіть `prop` альбому до `value`. -- Якщо `prop` є `tracks` але альбом немає властивості `tracks`, створіть пустий масив та додайте `value` до нього. -- Якщо `prop` є `tracks` та `value` не є пустим рядком, додайте `value` до кінця наявного масиву `tracks` у альбомі. +- Ваша функція завжди повинна повертати весь об'єкт-колекцію. +- Якщо `prop` не є `tracks`, а `value` не є пустим рядком, то оновіть або встановіть `prop` альбому на `value`. +- Якщо `prop` є `tracks`, але альбом не має властивості `tracks`, то створіть пустий масив та додайте `value` до нього. +- Якщо `prop` є `tracks` та `value` не є пустим рядком, то додайте `value` в кінець наявного масиву `tracks` в альбомі. - Якщо `value` є пустим рядком, видаліть дану властивість `prop` з альбому. -**Note:** Копія об'єкту `recordCollection` використовується для тестування. +**Примітка:** копія об'єкту `recordCollection` використовується для тестів. # --hints-- -Після `updateRecords(recordCollection, 5439, "artist", "ABBA")`, `artist` повинен бути рядок `ABBA` +Після `updateRecords(recordCollection, 5439, "artist", "ABBA")`, `artist` повинен стати рядком `ABBA` ```js assert( @@ -31,7 +31,7 @@ assert( ); ``` -After `updateRecords(recordCollection, 5439, "tracks", "Take a Chance on Me")`, `tracks` should have the string `Take a Chance on Me` as the last and only element. +Після `updateRecords(recordCollection, 5439, "tracks", "Take a Chance on Me")`, `tracks` повинен мати рядок `Take a Chance on Me` як останній та єдиний елемент. ```js assert( @@ -41,14 +41,14 @@ assert( ); ``` -Після `updateRecords(recordCollection, 2548, "artist", "")`, не потрібно встановлювати `artist` +Після `updateRecords(recordCollection, 2548, "artist", "")` не потрібно налаштовувати `artist` ```js updateRecords(_recordCollection, 2548, 'artist', ''); assert(!_recordCollection[2548].hasOwnProperty('artist')); ``` -Після `updateRecords(recordCollection, 1245, "tracks", "Addicted to Love")`, `tracks` повинні мати рядок `Addicted to Love` останнім елементом. +Після `updateRecords(recordCollection, 1245, "tracks", "Addicted to Love")`, `tracks` повинен мати рядок `Addicted to Love` як останній елемент. ```js assert( @@ -58,7 +58,7 @@ assert( ); ``` -Після `updateRecords(recordCollection, 2468, "tracks", "Free")`, `tracks` повинні мати рядок `1999` першим елементом. +Після `updateRecords(recordCollection, 2468, "tracks", "Free")`, `tracks` повинен мати рядок `1999` як перший елемент. ```js assert( @@ -68,14 +68,14 @@ assert( ); ``` -Після `updateRecords(recordCollection, 2548, "tracks", "")`, не потрібно встановлювати `tracks` +Після `updateRecords(recordCollection, 2548, "tracks", "")` не потрібно налаштовувати `tracks` ```js updateRecords(_recordCollection, 2548, 'tracks', ''); assert(!_recordCollection[2548].hasOwnProperty('tracks')); ``` -Після `updateRecords(recordCollection, 1245, "albumTitle", "Riptide")`, `albumTitle` повинно стати рядком `Riptide` +Після `updateRecords(recordCollection, 1245, "albumTitle", "Riptide")`, `albumTitle` повинен стати рядком `Riptide` ```js assert( diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/replace-loops-using-recursion.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/replace-loops-using-recursion.md index 66100684f2d..96f76ff65a5 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/replace-loops-using-recursion.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/replace-loops-using-recursion.md @@ -10,7 +10,7 @@ dashedName: replace-loops-using-recursion # --description-- -Рекурсія - це концепція, згідно з якою функція може бути вираженою в термінах сама по собі. Щоб краще зрозуміти це, почніть з роздумів про наступне завдання: перемножте перші `n` елементів масиву, щоб створити добуток цих елементів. Ви могли б це зробити, використовуючи цикл `for`: +Рекурсія – це концепція того, що функція може бути виражена сама собою. Щоб краще зрозуміти, подумайте над наступним завданням: перемножте перші `n` елементи масиву, щоб отримати їх добуток. Ви могли б це зробити, використовуючи цикл `for`: ```js function multiply(arr, n) { @@ -22,7 +22,7 @@ dashedName: replace-loops-using-recursion } ``` -Проте, зверніть увагу, що `multiply(arr, n) == multiply(arr, n - 1) * arr[n - 1]`. Це означає, що ви можете перезаписати `multiply` саме по собі і ніколи не використовувати цикл. +Проте, зверніть увагу, що `multiply(arr, n) == multiply(arr, n - 1) * arr[n - 1]`. Це означає, що ви можете переписати `multiply` у самій функції і ніколи не використовувати цикл. ```js function multiply(arr, n) { @@ -34,13 +34,13 @@ dashedName: replace-loops-using-recursion } ``` -Рекурсивна версія `multiply` переривається таким чином. У base case, де `n <= 0`, повертає до 1. Для більших значень `n`, він викликає сам себе, але з `n - 1`. Цей виклик функції обчислюється так само, викликаючи `multiply` знову до `n <= 0`. На даному етапі, всі функції можуть повертати результат і початковий `multiply` повертає відповідь. +Рекурсивна версія `multiply` розбивається таким чином. У базовому випадку, де `n <= 0`, повертається 1. Функція викликає сама себе, якщо значення `n` більше, але `n - 1`. Цей виклик функції обчислюється так само, викликаючи `multiply` знову, доки `n <= 0`. На даному етапі всі функції можуть повертатися, а вихідна функція `multiply` повертає відповідь. -**Примітка:** Рекурсивні функції повинні мати базовий регістр, коли вони повертають результат, не викликаючи функцію знову (в цьому прикладі, коли `n <= 0`), інакше вони ніколи не зможуть закінчити виконання. +**Примітка:** рекурсивні функції повинні мати базовий випадок, коли вони повертаються без повторного виклику функції (у цьому прикладі, коли `n <= 0`), інакше вони ніколи не завершаться. # --instructions-- -Напишіть рекурсивну функцію, `sum(arr, n)`, що повертає суму перших `n` елементів масиву `arr`. +Напишіть рекурсивну функцію `sum(arr, n)`, яка повертає суму перших `n` елементів масиву `arr`. # --hints-- @@ -62,7 +62,7 @@ assert.equal(sum([2, 3, 4], 1), 2); assert.equal(sum([2, 3, 4, 5], 3), 9); ``` -Ваш код не має опиратися на жодні цикли (`for`, `while` або функції більш високої послідовності, такі як `forEach`, `map`, `filter` або `reduce`.). +Ваш код не повинен опиратися на жодні цикли (`for`, `while` або функції вищого порядку, як-от `forEach`, `map`, `filter` або `reduce`.). ```js assert( @@ -70,7 +70,7 @@ assert( ); ``` -Вам слід використати рекурсію, щоб вирішити цю проблему. +Ви повинні використати рекурсію, щоб розв’язати це завдання. ```js assert( diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/replacing-if-else-chains-with-switch.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/replacing-if-else-chains-with-switch.md index ae35d169df1..b294228045f 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/replacing-if-else-chains-with-switch.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/replacing-if-else-chains-with-switch.md @@ -1,6 +1,6 @@ --- id: 56533eb9ac21ba0edf2244e0 -title: Заміна "if else" ланцюжка ключем +title: Заміна ланцюжків if else на switch challengeType: 1 videoUrl: 'https://scrimba.com/c/c3JE8fy' forumTopicId: 18266 @@ -9,7 +9,7 @@ dashedName: replacing-if-else-chains-with-switch # --description-- -Якщо ви маєте багато опцій, з яких можете вибирати, то твердження `switch` може бути легшим для написання, ніж багатоланцюгові `if`/`else if` твердження. Наступне: +Якщо ви маєте багато варіантів для вибору, простіше використати інструкцію `switch` замість багатьох ланцюжків `if`/`else if`. Наступне: ```js if (val === 1) { @@ -21,7 +21,7 @@ if (val === 1) { } ``` -можна замінити цим: +можна замінити на: ```js switch (val) { @@ -38,23 +38,23 @@ switch (val) { # --instructions-- -Змініть ланцюжкові `if`/`else if` твердження на `switch` твердження. +Змініть ланцюжки інструкцій `if`/`else if` на інструкцію `switch`. # --hints-- -Вам не слід використовувати будь-які `else` твердження будь-де в редакторі +Ви не повинні використовувати інструкцію `else` в редакторі ```js assert(!/else/g.test(code)); ``` -Вам не слід використовувати будь-які `if` твердження будь-де в редакторі +Ви не повинні використовувати інструкцію `if` в редакторі ```js assert(!/if/g.test(code)); ``` -Ви повинні мати хоча б чотири `break` твердження +Ви повинні мати принаймні чотири інструкції `break` ```js assert(code.match(/break/g).length >= 4); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/return-a-value-from-a-function-with-return.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/return-a-value-from-a-function-with-return.md index 5cecb0778ae..505673d3de1 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/return-a-value-from-a-function-with-return.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/return-a-value-from-a-function-with-return.md @@ -1,6 +1,6 @@ --- id: 56533eb9ac21ba0edf2244c2 -title: Повернути значення за допомогою функції повернення +title: Повернення значення функції за допомогою return challengeType: 1 videoUrl: 'https://scrimba.com/c/cy87wue' forumTopicId: 18271 @@ -9,9 +9,9 @@ dashedName: return-a-value-from-a-function-with-return # --description-- -Ми можемо передати значення у функцію за допомогою аргументів. Ви можете використати команду `return`, щоб надіслати значення назад за межі фунції. +Ми можемо передати значення до функції за допомогою аргументів. Ви можете використати інструкцію `return`, щоб надіслати значення з фунції. -**Наприклад** +**Приклад** ```js function plusThree(num) { @@ -31,25 +31,25 @@ const answer = plusThree(5); # --hints-- -`timesFive` має бути функцією +`timesFive` повинна бути функцією ```js assert(typeof timesFive === 'function'); ``` -`timesFive(5)` має повернутися до `25` +`timesFive(5)` повинна повертати `25` ```js assert(timesFive(5) === 25); ``` -`timesFive(2)` має повернутися до `10` +`timesFive(2)` повинна повертати `10` ```js assert(timesFive(2) === 10); ``` -`timesFive(0)` має повернутися до `0` +`timesFive(0)` повинна повертати `0` ```js assert(timesFive(0) === 0); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/return-early-pattern-for-functions.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/return-early-pattern-for-functions.md index c0c5264303f..b9d3c880ab0 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/return-early-pattern-for-functions.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/return-early-pattern-for-functions.md @@ -1,6 +1,6 @@ --- id: 56533eb9ac21ba0edf2244c4 -title: Повернення початкового шаблона для функцій +title: Повернення початкового шаблону функцій challengeType: 1 videoUrl: 'https://scrimba.com/c/cQe39Sq' forumTopicId: 18272 @@ -9,9 +9,9 @@ dashedName: return-early-pattern-for-functions # --description-- -Коли ви досягнули команди `return`, виконання поточної функції припиняється і об'єкт керування повертається до місця виклику. +Коли досягається інструкція `return`, виконання поточної функції припиняється, а керування повертається до місця, де було викликано функцію. -**Наприклад** +**Приклад** ```js function myFun() { @@ -22,54 +22,54 @@ function myFun() { myFun(); ``` -Показане вище відобразить рядок `Hello` у консолі і поверне рядок `World`. Рядок `byebye` ніколи не відобразиться у консолі, тому що функція виходить з команди `return`. +Вищеподане покаже рядок `Hello` на консолі та поверне рядок `World`. Рядок `byebye` ніколи не зобразиться на консолі, оскільки функція виходить з інструкції `return`. # --instructions-- -Модифікуйте функцію `abTest` і тому, якщо `a` або `b` дорівнюватиме менше `0`, функція відразу вийде зі значенням `undefined`. +Змініть функцію `abTest` таким чином, що коли `a` або `b` буде менше за `0`, функція одразу вийде зі значенням `undefined`. -**Hint** -Remember that undefined is a keyword, not a string. +**Підказка** +Пам’ятайте, що undefined є ключовим словом, а не рядком. # --hints-- -`abTest(2, 2)` повинен повернути число +`abTest(2, 2)` повинна повертати число ```js assert(typeof abTest(2, 2) === 'number'); ``` -`abTest(2, 2)` повинен повернути `8` +`abTest(2, 2)` повинна повертати `8` ```js assert(abTest(2, 2) === 8); ``` -`abTest(-2, 2)` повинен повернути `undefined` +`abTest(-2, 2)` повинна повертати `undefined` ```js assert(abTest(-2, 2) === undefined); ``` -`abTest(2, -2)` повинен повернути `undefined` +`abTest(2, -2)` повинна повертати `undefined` ```js assert(abTest(2, -2) === undefined); ``` -`abTest(2, 8)` повинен повернути `18` +`abTest(2, 8)` повинна повертати `18` ```js assert(abTest(2, 8) === 18); ``` -`abTest(3, 3)` повинен повернути `12` +`abTest(3, 3)` повинна повертати `12` ```js assert(abTest(3, 3) === 12); ``` -`abTest(0, 0)` повинен повернути `0` +`abTest(0, 0)` повинна повертати `0` ```js assert(abTest(0, 0) === 0); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/returning-boolean-values-from-functions.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/returning-boolean-values-from-functions.md index 8eacab1dfb0..02b0e606584 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/returning-boolean-values-from-functions.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/returning-boolean-values-from-functions.md @@ -1,6 +1,6 @@ --- id: 5679ceb97cbaa8c51670a16b -title: Повернення логічних значень з функцій +title: Повернення булевих значень із функцій challengeType: 1 videoUrl: 'https://scrimba.com/c/cp62qAQ' forumTopicId: 18273 @@ -9,9 +9,9 @@ dashedName: returning-boolean-values-from-functions # --description-- -You may recall from Comparison with the Equality Operator that all comparison operators return a boolean `true` or `false` value. +Як ви можете пригадати з порівняння з оператором «дорівнює», всі оператори порівняння повертають булеве значення `true` або `false`. -Інколи люди використовують `if/else` команду для того, щоб зробити порівняння на зразок цього: +Іноді люди використовують інструкцію `if/else`, щоб виконати порівняння: ```js function isEqual(a, b) { @@ -23,7 +23,7 @@ function isEqual(a, b) { } ``` -Але є кращий спосіб це зробити. Оскільки `===` повертає `true` або `false`, ми можемо повернути результат порівняння: +Але існує кращий спосіб. Оскільки `===` повертає `true` або `false`, ми можемо повернути результат порівняння: ```js function isEqual(a, b) { @@ -33,23 +33,23 @@ function isEqual(a, b) { # --instructions-- -Виправте функцію `isLess` для того, щоб видалити `if/else` команду. +Виправте функцію `isLess` так, щоб видалити інструкції `if/else`. # --hints-- -`isLess(10, 15)` повинен повернути `true` +`isLess(10, 15)` повинна повертати `true` ```js assert(isLess(10, 15) === true); ``` -`isLess(15, 10)` повинен повернути `false` +`isLess(15, 10)` повинна повертати `false` ```js assert(isLess(15, 10) === false); ``` -Вам не слід використовувати будь-які `if` чи `else` команди +Ви не повинні використовувати інструкції `if` або `else` ```js assert(!/if|else/g.test(code)); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/selecting-from-many-options-with-switch-statements.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/selecting-from-many-options-with-switch-statements.md index 593f8e69d60..990a0c9359e 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/selecting-from-many-options-with-switch-statements.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/selecting-from-many-options-with-switch-statements.md @@ -1,6 +1,6 @@ --- id: 56533eb9ac21ba0edf2244dd -title: Вибір з багатьох опцій за допомогою перемикачів +title: Вибір із багатьох варіантів за допомогою інструкцій switch challengeType: 1 videoUrl: 'https://scrimba.com/c/c4mv4fm' forumTopicId: 18277 @@ -9,9 +9,9 @@ dashedName: selecting-from-many-options-with-switch-statements # --description-- -Якщо у вас є багато опцій для вибору, використовуйте команду switch. `switch` тести на значення і може мати багато випадків інструкцій, які визначають різні значення. Інструкції виконуються від першого узгодженого значення `case до тих пір, поки break не відбудиться.

                                                                                                                                                                                                                                                                                                  +Якщо ви маєте багато варіантів для вибору, використовуйте інструкцію switch. Інструкція `switch` тестує значення та може мати багато інструкцій case, які визначають можливі значення. Інструкції виконуються від першого відповідного значення `case` до тих пір, поки не зіткнуться із `break`. -

                                                                                                                                                                                                                                                                                                  Ось наводиться приклад інструкції switch`: +Ось приклад інструкції `switch`: ```js switch (lowercaseLetter) { @@ -24,11 +24,11 @@ switch (lowercaseLetter) { } ``` -`case` значень перевіряється абсолютною рівністю (`===`). `break` пропонує JavaScript припинити виконання інструкцій. Якщо `break` пропущений, тоді наступна команда буде виконуватись. +Значення `case` перевіряються за допомогою строгої рівності (`===`). `break` вказує JavaScript зупинити запущені інструкції. Якщо пропустити `break`, виконується наступна інструкція. # --instructions-- -Напишіть команду switch, щоб встановити `answer` за наступних умов: +Напишіть інструкцію switch, яка перевіряє `val` та встановлює `answer` для наступних умов: `1` - `alpha` `2` - `beta` `3` - `gamma` @@ -36,31 +36,31 @@ switch (lowercaseLetter) { # --hints-- -`caseInSwitch(1)` повинно відповідати значенню рядка `alpha` +`caseInSwitch(1)` повинна мати значення рядка `alpha` ```js assert(caseInSwitch(1) === 'alpha'); ``` -`caseInSwitch(2)` повинно відповідати значенню рядка `beta` +`caseInSwitch(2)` повинна мати значення рядка `beta` ```js assert(caseInSwitch(2) === 'beta'); ``` -`caseInSwitch(3)` повинно відповідати значенню рядка `gamma` +`caseInSwitch(3)` повинна мати значення рядка `gamma` ```js assert(caseInSwitch(3) === 'gamma'); ``` -`caseInSwitch(4)` повинно відповідати значенню рядка `delta` +`caseInSwitch(4)` повинна мати значення рядка `delta` ```js assert(caseInSwitch(4) === 'delta'); ``` -Не варто використовувати `if` або `else` команди +Ви не повинні використовувати інструкції `if` чи `else` ```js assert(!/else/g.test(code) || !/if/g.test(code)); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/shopping-list.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/shopping-list.md index b6002732b79..2f73e75582c 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/shopping-list.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/shopping-list.md @@ -11,13 +11,13 @@ dashedName: shopping-list Створіть список покупок у змінній `myList`. Список повинен бути багатовимірним масивом, який містить декілька підмасивів. -Перший елемент у кожному підмасиві повинен містити рядок з назвою одиниці. Другий елемент повинен бути числом, яке відображає кількість. +Перший елемент у кожному підмасиві повинен містити рядок з назвою одиниці. Другим елементом повинне бути число, яке вказує кількість. ```js ["Chocolate Bar", 15] ``` -У списку повинно бути щонайменше 5 підмасивів. +У списку повинно бути принаймні 5 підмасивів. # --hints-- @@ -39,7 +39,7 @@ assert(hasString); assert(hasNumber); ``` -У списку має бути щонайменше 5 одиниць. +У списку повинно бути принаймні 5 одиниць. ```js assert(count > 4); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/stand-in-line.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/stand-in-line.md index fa01106df13..a0e9a11ea8a 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/stand-in-line.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/stand-in-line.md @@ -1,6 +1,6 @@ --- id: 56533eb9ac21ba0edf2244c6 -title: Стояти в черзі +title: Станьте в чергу challengeType: 1 videoUrl: 'https://scrimba.com/c/ca8Q8tP' forumTopicId: 18307 @@ -9,43 +9,43 @@ dashedName: stand-in-line # --description-- -В комп'ютерних науках queue це абстрактне поняття Data Structure, де усі елементи зберігають певний порядок. Нові елементи можуть бути додані до черги, а старі елементи - зняті з черги. +Черга в комп’ютерних науках – це абстрактна структура даних, де усі елементи зберігають певний порядок. Нові елементи можна додати в кінець черги, а старі елементи знімають з початку. # --instructions-- -Напишіть функцію `nextInLine`, аргументами якої є масив (`arr`) та число (`item`). +Напишіть функцію `nextInLine`, яка приймає масив (`arr`) та число (`item`) як аргументи. Додайте число до кінця масиву, а тоді видаліть перший елемент з масиву. -Функція `nextInLine` повинна повернути видалений елемент. +Функція `nextInLine` повинна повертати видалений елемент. # --hints-- -`nextInLine([], 5)` має повернути до числа. +`nextInLine([], 5)` повинна повертати число. ```js assert.isNumber(nextInLine([], 5)); ``` -`nextInLine([], 1)` має повернути до `1` +`nextInLine([], 1)` повинна повертати `1` ```js assert(nextInLine([], 1) === 1); ``` -`nextInLine([2], 1)` має повернути до `2` +`nextInLine([2], 1)` повинна повертати `2` ```js assert(nextInLine([2], 1) === 2); ``` -`nextInLine([5,6,7,8,9], 1)` має повернути до `5` +`nextInLine([5,6,7,8,9], 1)` повинна повертати `5` ```js assert(nextInLine([5, 6, 7, 8, 9], 1) === 5); ``` -Після `nextInLine(testArr, 10)`, код `testArr[4]` має стати `10` +Після `nextInLine(testArr, 10)`, `testArr[4]` повинен бути `10` ```js nextInLine(testArr, 10); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/store-multiple-values-in-one-variable-using-javascript-arrays.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/store-multiple-values-in-one-variable-using-javascript-arrays.md index b51fa94707c..7921f774513 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/store-multiple-values-in-one-variable-using-javascript-arrays.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/store-multiple-values-in-one-variable-using-javascript-arrays.md @@ -1,6 +1,6 @@ --- id: bd7993c9c69feddfaeb8bdef -title: Зберігання кількох значень в одній змінній, використовуючи масиви JavaScript +title: Зберігання декількох значень в одній змінній за допомогою масивів JavaScript challengeType: 1 videoUrl: 'https://scrimba.com/c/crZQWAm' forumTopicId: 18309 @@ -9,9 +9,9 @@ dashedName: store-multiple-values-in-one-variable-using-javascript-arrays # --description-- -Зі змінними масивів `array` JavaScript, ми можемо зберігати частини даних в одному місці. +Ми можемо зберігати деякі дані в одному місці завдяки змінним `array` у JavaScript. -Ви починаєте оголошення масиву з відкритої квадратної дужки, а завершуєте його закриваючи квадратною дужкою і ставлячи кому між кожним елементом приблизно так: +Оголошення масиву починається з початкової квадратної дужки, закінчується кінцевою квадратною дужкою, а між кожним елементом ставиться кома: ```js const sandwich = ["peanut butter", "jelly", "bread"]; @@ -29,13 +29,13 @@ const sandwich = ["peanut butter", "jelly", "bread"]; assert(typeof myArray == 'object'); ``` -Першим елементом у масиві `myArray` має бути рядок. +Першим елементом у `myArray` повинен бути рядок. ```js assert(typeof myArray[0] !== 'undefined' && typeof myArray[0] == 'string'); ``` -Другий пункт в `myArray` має бути числом. +Другим елементом у `myArray` повинне бути число. ```js assert(typeof myArray[1] !== 'undefined' && typeof myArray[1] == 'number'); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/storing-values-with-the-assignment-operator.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/storing-values-with-the-assignment-operator.md index 6c674c29e0c..0b87f73812c 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/storing-values-with-the-assignment-operator.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/storing-values-with-the-assignment-operator.md @@ -1,6 +1,6 @@ --- id: 56533eb9ac21ba0edf2244a8 -title: Зберігання значень за допомогою оператора присвоєння +title: Зберігання значень за допомогою оператора присвоювання challengeType: 1 videoUrl: 'https://scrimba.com/c/cEanysE' forumTopicId: 18310 @@ -9,7 +9,7 @@ dashedName: storing-values-with-the-assignment-operator # --description-- -In JavaScript ви можете зберігати значення в змінній assignment з оператором (`=`). +У JavaScript можна зберігати значення в змінній за допомогою оператора присвоювання (`=`). ```js myVariable = 5; @@ -17,14 +17,14 @@ myVariable = 5; Вона призначає `Number` зі значенням `5` до `myVariable`. -Якщо праворуч від оператора є будь-які розрахунки `=`, ті з них, які розташовані перед значенням належать до змінної зліва від оператора. +Якщо праворуч від оператора `=` є будь-які розрахунки, вони виконуються до того, як значення буде присвоєно змінній ліворуч від оператора. ```js var myVar; myVar = 5; ``` -Спочатку, цей код створює змінну з ім'ям `myVar`. Тоді код присвоює `5` на `myVar`. Тепер, якщо `myVar` знову з'являється в коді, програма буде розглядати його так, як `5`. +Спочатку цей код створює змінну під назвою `myVar`. Потім код присвоює `5` до `myVar`. Якщо `myVar` знову з’явиться у коді, програма розглядатиме її як `5`. # --instructions-- @@ -38,7 +38,7 @@ myVar = 5; assert(/var a;/.test(code)); ``` -`a` має мати значення 7. +`a` повинна мати значення 7. ```js assert(typeof a === 'number' && a === 7); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/subtract-one-number-from-another-with-javascript.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/subtract-one-number-from-another-with-javascript.md index 3668b2d3734..6cb4bd9ef8f 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/subtract-one-number-from-another-with-javascript.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/subtract-one-number-from-another-with-javascript.md @@ -1,6 +1,6 @@ --- id: cf1111c1c11feddfaeb4bdef -title: Віднімати одне число від іншого використовуючи JavaScript +title: Віднімання одного числа від іншого за допомогою JavaScript challengeType: 1 videoUrl: 'https://scrimba.com/c/cP3yQtk' forumTopicId: 18314 @@ -9,11 +9,11 @@ dashedName: subtract-one-number-from-another-with-javascript # --description-- -Ми також можемо віднімати одне число від іншого. +Ми також можемо відняти одне число від іншого. JavaScript використовує символ `-` для віднімання. -**Наприклад** +**Приклад** ```js const myVar = 12 - 6; @@ -22,17 +22,17 @@ const myVar = 12 - 6; `myVar` тепер матиме значення `6`. # --instructions-- -Змініть `0` так, щоб сума дорівнювала `12`. +Змініть `0` так, щоб різниця дорівнювала `12`. # --hints-- -Змінна `difference` має дорівнювати 12. +Змінна `difference` повинна дорівнювати `12`. ```js assert(difference === 12); ``` -Потрібно відняти лише одне число від 45. +Ви повинні відняти лише одне число від `45`. ```js assert(/difference=45-33;?/.test(__helpers.removeWhiteSpace(code))); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/testing-objects-for-properties.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/testing-objects-for-properties.md index 6423bed3c81..702bbc50883 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/testing-objects-for-properties.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/testing-objects-for-properties.md @@ -1,6 +1,6 @@ --- id: 567af2437cbaa8c51670a16c -title: Тестування властивостей об'єктів +title: Перевірка властивостей об’єктів challengeType: 1 forumTopicId: 18324 dashedName: testing-objects-for-properties @@ -8,9 +8,9 @@ dashedName: testing-objects-for-properties # --description-- -Іноді варто перевіряти чи даний об'єкт вже має певні властивості. Ми можемо використовувати метод об'єктів `.hasOwnProperty(propname)`, щоб визначити чи об'єкт має ім'я властивості. `.hasOwnProperty()` показує `true` чи `false`, в залежності чи властивість знайдена, чи ні. +Іноді потрібно перевіряти, чи об'єкт має певну властивість. Ми можемо використати метод об'єктів `.hasOwnProperty(propname)`, щоб визначити, чи має цей об’єкт задану назву властивості. `.hasOwnProperty()` повертає `true` або `false`, якщо властивість знайдена чи не знайдена. -**Наприклад** +**Приклад** ```js const myObj = { @@ -22,11 +22,11 @@ myObj.hasOwnProperty("top"); myObj.hasOwnProperty("middle"); ``` -Перший `hasOwnProperty` стає `true`, а другий - `false`. +Перший `hasOwnProperty` повертає `true`, а другий повертає `false`. # --instructions-- -Змініть функцію `checkObj`, щоб перевірити чи об'єкт переданий до функції (`obj`) містить особливу властивість (`checkProp`). Якщо властивість знайдена, поверніть значення властивості. Якщо ні, поверніть `"Not Found"`. +Змініть функцію `checkObj` так, щоб вона перевіряла, чи переданий до функції об’єкт (`obj`) містить певну властивість (`checkProp`). Якщо властивість знайдена, поверніть значення властивості. Якщо ні, поверніть `"Not Found"`. # --hints-- diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/understand-string-immutability.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/understand-string-immutability.md index 638fbf24f55..17838d6240a 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/understand-string-immutability.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/understand-string-immutability.md @@ -1,6 +1,6 @@ --- id: 56533eb9ac21ba0edf2244ba -title: Розуміння нестійкості рядка +title: Незмінність рядка challengeType: 1 videoUrl: 'https://scrimba.com/c/cWPVaUR' forumTopicId: 18331 @@ -9,16 +9,16 @@ dashedName: understand-string-immutability # --description-- -У JavaScript, `String` значення immutable, означає, що їх не можна буде змінити після створення. +Значення рядка (`String`) у JavaScript є незмінним, тобто його не можна змінити після створення. -For example, the following code will produce an error because the letter `B` in the string `Bob` cannot be changed to the letter `J`: +Наприклад, наступний код спричинить помилку, оскільки літеру `B` у рядку `Bob` не можна змінити на літеру `J`: ```js let myStr = "Bob"; myStr[0] = "J"; ``` -Note that this does *not* mean that `myStr` could not be re-assigned. The only way to change `myStr` would be to assign it with a new value, like this: +Зауважте, що це *не* означає, що `myStr` не можна повторно присвоїти. Єдиний спосіб змінити `myStr` – присвоїти нове значення: ```js let myStr = "Bob"; @@ -27,11 +27,11 @@ myStr = "Job"; # --instructions-- -Виправте призначення `myStr` так, щоб код містив рядок зі значенням `Hello World`, використовуючи підхід, показаний вище. +Використовуючи приклад вище, виправте присвоєння `myStr` так, щоб значенням рядка було `Hello World`. # --hints-- -`myStr` має мати значення рядка `Hello World`. +`myStr` повинен мати значення рядка `Hello World`. ```js assert(myStr === 'Hello World'); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-boolean-values.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-boolean-values.md index a9fc89baebe..7f360e08b1c 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-boolean-values.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-boolean-values.md @@ -1,6 +1,6 @@ --- id: bd7123c9c441eddfaeb5bdef -title: Розуміння булевих значень +title: Булеві значення challengeType: 1 videoUrl: 'https://scrimba.com/c/c9Me8t4' forumTopicId: 301176 @@ -9,9 +9,9 @@ dashedName: understanding-boolean-values # --description-- -Інший тип даних це Boolean. Булеві значення можуть мати лише два значення: `true` чи `false`. Фактично, це маленькі перемикачі, де `true` це "увімкнено" і `false` - "вимкнено". Ці два стани несумісні. +Іншим типом даних є булеві. Булеві можуть мати лише два значення: `true` або `false`. По суті, це маленькі перемикачі, де `true` означає «увімкнено», а `false` означає «вимкнено». Ці два стани несумісні. -**Note:** Булеві вирази ніколи не записуються в дужках. Рядки `"true"` й `"false"` не булеві і не мають особливого значення в JavaScript. +**Примітка:** булеві значення завжди записують без лапок. Рядки `"true"` та `"false"` не є булевими та не мають особливого значення у JavaScript. # --instructions-- @@ -19,13 +19,13 @@ dashedName: understanding-boolean-values # --hints-- -Функція `welcomeToBooleans()` має повернути значення (`true` or `false`). +Функція `welcomeToBooleans()` повинна повертати булеве значення (`true` або `false`). ```js assert(typeof welcomeToBooleans() === 'boolean'); ``` -`welcomeToBooleans()` має повернути `true`. +`welcomeToBooleans()` повинна повертати `true`. ```js assert(welcomeToBooleans() === true); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-case-sensitivity-in-variables.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-case-sensitivity-in-variables.md index 19a7875014d..320f8759ee6 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-case-sensitivity-in-variables.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-case-sensitivity-in-variables.md @@ -1,6 +1,6 @@ --- id: 56533eb9ac21ba0edf2244ab -title: Розуміння врахування регістру в змінних +title: Чуттєвість змінних до регістру challengeType: 1 videoUrl: 'https://scrimba.com/c/cd6GDcD' forumTopicId: 18334 @@ -9,13 +9,13 @@ dashedName: understanding-case-sensitivity-in-variables # --description-- -У JavaScript усі змінні та назви функцій існують з урахуванням регістру. Це означає, що написання з великої літери має значення. +Усі назви змінних та функцій у JavaScript чуттєві до регістру. Це означає, що написання з великої літери має значення. -`MYVAR` - це не теж саме, що й `MyVar` чи `myvar`. Цілком можливо мати декілька різних змінних з одинаковою назвою, але різним відмінком. Наполегливо рекомендується, щоб, заради чіткості, ви *не* використовували цю мовну особливість. +`MYVAR` – це не саме, що `MyVar` чи `myvar`. Ви можете мати декілька різних змінних з одинаковою назвою, але різним регістром. Заради чіткості рекомендовано *не* використовувати цю особливість мови. **Найкраща практика** -Напишіть назви змінних у JavaScript в camelCase. У camelCase, у назвах змінних, які складаються з декількох слів, перше слово ми пишемо з малої букви, а першу букву кожного наступного слова - з великої. +Напишіть назви змінних у JavaScript верблюдячимРегістром. Назви змінних верблюдячимРегістром складаються з декількох слів, де перше слово ми пишемо з малої букви, а першу букву кожного наступного слова пишемо з великої. **Приклади:** @@ -27,19 +27,19 @@ var thisVariableNameIsSoLong; # --instructions-- -Модифікуйте існуючі оголошення та завдання так, щоб їхні назви використовували camelCase. +Змініть наявні оголошення та присвоєння так, щоб їхні назви були написані верблюдячимРегістром. Не створюйте жодних нових змінних. # --hints-- -`studlyCapVar` має бути визначене і мати значення `10`. +`studlyCapVar` повинна бути визначеною та мати значення `10`. ```js assert(typeof studlyCapVar !== 'undefined' && studlyCapVar === 10); ``` -`properCamelCase` має бути визначене і мати значення рядка `A String`. +`properCamelCase` повинна бути визначеною та мати значення рядка `A String`. ```js assert( @@ -47,25 +47,25 @@ assert( ); ``` -`titleCaseOver` має бути визначене і мати значення `9000`. +`titleCaseOver` повинна бути визначеною та мати значення `9000`. ```js assert(typeof titleCaseOver !== 'undefined' && titleCaseOver === 9000); ``` -`studlyCapVar` має використовувати camelCase як в оголошенні, так і в розділах завдань. +`studlyCapVar` повинна використовувати верблюдячийРегістр як в оголошенні, так і в присвоєнні. ```js assert(code.match(/studlyCapVar/g).length === 2); ``` -`properCamelCase` має використовувати camelCase як в оголошенні, так і в розділах завдань. +`properCamelCase` повинна використовувати верблюдячийРегістр як в оголошенні, так і в присвоєнні. ```js assert(code.match(/properCamelCase/g).length === 2); ``` -`titleCaseOver` має використовувати camelCase як в оголошенні, так і в розділах завдань. +`titleCaseOver` повинна використовувати верблюдячийРегістр як в оголошенні, так і в присвоєнні. ```js assert(code.match(/titleCaseOver/g).length === 2); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-undefined-value-returned-from-a-function.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-undefined-value-returned-from-a-function.md index 1da37c8da7a..5a0ed6ebc32 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-undefined-value-returned-from-a-function.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-undefined-value-returned-from-a-function.md @@ -1,6 +1,6 @@ --- id: 598e8944f009e646fc236146 -title: Розуміння невизначеного значення, яке повернуто з функції +title: Невизначене значення, повернуте з функції challengeType: 1 videoUrl: 'https://scrimba.com/c/ce2p7cL' forumTopicId: 301177 @@ -9,7 +9,7 @@ dashedName: understanding-undefined-value-returned-from-a-function # --description-- -Функція може містити команду `return`, але не обов'язково. У цьому випадку функція не має команди `return`. Натомість, коли ви викликаєте її, функція обробляє внутрішній код, але повернене значення є `undefined`. +Функція може містити інструкцію `return`, але це необов'язково. Якщо функція не має інструкції `return`, то під час виклику функція обробляє внутрішній код, але поверненим значенням є `undefined`. **Приклад** @@ -23,33 +23,33 @@ function addSum(num) { addSum(3); ``` -`addSum` - це функція без команди `return`. Функція змінить загальну `sum` (суму) змінної, але повернене значення функції буде `undefined`. +`addSum` є функцією без інструкції `return`. Функція змінить глобальну змінну `sum`, але поверненим значенням функції буде `undefined`. # --instructions-- -Створіть функцію `addFive` без аргументів. Ця функція додає 5 до `sum` (суми) змінної, але повернене значення є `undefined`. +Створіть функцію `addFive` без аргументів. Ця функція додає 5 до змінної `sum`, але поверненим значенням є `undefined`. # --hints-- -`addFive` має бути функцією. +`addFive` повинна бути функцією. ```js assert(typeof addFive === 'function'); ``` -Після запуску обидвох функцій, `sum` має дорівнювати `8`. +Після запуску обидвох функцій, `sum` повинна дорівнювати `8`. ```js assert(sum === 8); ``` -Повернене з `addFive` значення, має бути `undefined`. +Поверненим значенням з `addFive` повинне бути `undefined`. ```js assert(addFive() === undefined); ``` -Всередині функції `addFive` вам слід додати `5` до `sum` змінної. +Всередині функції `addFive` ви повинні додати `5` до змінної `sum`. ```js assert( diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-uninitialized-variables.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-uninitialized-variables.md index 8aeb65007bd..81600b1d38d 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-uninitialized-variables.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/understanding-uninitialized-variables.md @@ -1,6 +1,6 @@ --- id: 56533eb9ac21ba0edf2244aa -title: Розуміння неініціалізованих змінних +title: Неініціалізовані змінні challengeType: 1 videoUrl: 'https://scrimba.com/c/cBa2JAL' forumTopicId: 18335 @@ -9,7 +9,7 @@ dashedName: understanding-uninitialized-variables # --description-- -Коли змінні JavaScript проголошено, вони мають початкове значення `undefined`. Якщо ви виконуєте математичну дію з `undefined` змінної, вашим результатом буде `NaN`, що означає "Not a Number". If you concatenate a string with an `undefined` variable, you will get a string of `undefined`. +Коли змінні у JavaScript оголошено, вони отримують початкове значення `undefined`. Якщо виконати математичну дію на змінній `undefined`, то результатом буде `NaN`, що означає «Not a Number» (укр. «не є числом»). Якщо об’єднати рядок зі змінною `undefined`, ви отримаєте рядок з `undefined`. # --instructions-- @@ -17,25 +17,25 @@ dashedName: understanding-uninitialized-variables # --hints-- -`a` should be defined and have a final value of `6`. +`a` повинна бути визначеною та мати кінцеве значення `6`. ```js assert(typeof a === 'number' && a === 6); ``` -`b` should be defined and have a final value of `15`. +`b` повинна бути визначеною та мати кінцеве значення `15`. ```js assert(typeof b === 'number' && b === 15); ``` -`c` should not contain `undefined` and should have a final value of the string `I am a String!` +`c` не повинна містити `undefined` та повинна мати кінцеве значення рядка `I am a String!` ```js assert(!/undefined/.test(c) && c === 'I am a String!'); ``` -Вам не слід змінювати код під зазначеним коментарем. +Не змінюйте код під зазначеним коментарем. ```js assert( diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/updating-object-properties.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/updating-object-properties.md index 933435b6819..179b115adaa 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/updating-object-properties.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/updating-object-properties.md @@ -9,7 +9,7 @@ dashedName: updating-object-properties # --description-- -Після того, як ви створили об'єкт JavaScript, ви можете оновити його властивості в будь-який час, так як і будь-які інші його змінні. Ви можете використовувати точкову або дужкову нотацію для оновлення. +Після створення об’єкта JavaScript ви можете будь-коли оновити його властивості так само, як оновлювали б будь-яку іншу змінну. Для оновлення можна використати точкову або дужкову нотацію. Наприклад, погляньмо на `ourDog`: @@ -22,21 +22,21 @@ const ourDog = { }; ``` -Оскільки це винятково щасливий собака, змінімо його ім'я на рядок `Happy Camper`. Ось як ми оновимо властивість імені його об'єкта: `ourDog.name = "Happy Camper";` або `ourDog["name"] = "Happy Camper";` Тепер коли ми оцінюємо `ourDog.name`, замість того, щоб отримати `Camper`, ми отримаємо його нове ім'я `Happy Camper`. +Оскільки це особливо щаслива собака, змінимо його ім'я на рядок `Happy Camper`. Ось як ми оновлюємо властивість назви об’єкта: `ourDog.name = "Happy Camper";` або `ourDog["name"] = "Happy Camper";`. Тепер, коли ми визначаємо `ourDog.name`, замість `Camper` ми отримуватимемо нове ім’я `Happy Camper`. # --instructions-- -Оновити властивість імені об'єкта `myDog`. Змінімо його ім'я з `Coder` на `Happy Coder`. Ви можете використати точкову або дужкову нотацію. +Оновіть властивість імені об'єкта `myDog`. Змінимо ім'я з `Coder` на `Happy Coder`. Ви можете використати точкову або дужкову нотацію. # --hints-- -Вам слід оновити властивість `name` `myDog`, щоб вона дорівнювала рядку`Happy Coder`. +Ви повинні оновити властивість `name` об’єкта `myDog`, щоб вона дорівнювала рядку `Happy Coder`. ```js assert(/happy coder/gi.test(myDog.name)); ``` -Не слід змінювати визначення `myDog`. +Ви не повинні редагувати визначення `myDog`. ```js assert(/"name": "Coder"/.test(code)); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-first-character-in-a-string.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-first-character-in-a-string.md index 88cfff3c774..997e60c6b65 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-first-character-in-a-string.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-first-character-in-a-string.md @@ -1,6 +1,6 @@ --- id: bd7123c9c549eddfaeb5bdef -title: Використовуйте Дужкову Нотацію для Пошуку Першого Символу в Рядку +title: Дужкова нотація для пошуку першого символа рядка challengeType: 1 videoUrl: 'https://scrimba.com/c/ca8JwhW' forumTopicId: 18341 @@ -9,26 +9,26 @@ dashedName: use-bracket-notation-to-find-the-first-character-in-a-string # --description-- -Дужкова нотація - це спосіб отримання символу з певним індексом в рядку. +Завдяки дужковій нотації можна отримати символ з певним індексом в рядку. -Більшість сучасних мов програмування, таких як JavaScript, не починають рахувати з 1, як це роблять люди. Вони починають з 0. Це називають індексація на основі нуля. +Більшість сучасних мов програмування, наприклад JavaScript, не починають рахунок з 1, як це роблять люди. Вони починають з 0. Це називається індексацією на основі нуля. -Наприклад, символ з індексом 0 у слові `Charles` буде `C`. Отже, якщо `const firstName = "Charles"`, ви можете отримати значення першої літери рядка, використовуючи `firstName[0]`. +Наприклад, символом з індексом 0 у слові `Charles` буде `C`. Тому, якщо `const firstName = "Charles"`, ви можете отримати значення першої літери рядка, використовуючи `firstName[0]`. -Наприклад: +Приклад: ```js const firstName = "Charles"; const firstLetter = firstName[0]; ``` -`firstLetter` повинна мати значення рядка `C`. +`firstLetter` матиме значення рядка `C`. # --instructions-- -Використовуйте дужкову нотацію, щоб знайти перший символ в змінній `lastName` та задайте його до `firstLetterOfLastName`. +Використайте дужкову нотацію, щоб знайти перший символ у змінній `lastName` та призначте його до `firstLetterOfLastName`. -**Підказка:**Спробуйте подивитися на приклад вище, якщо застрягли. +**Підказка:** якщо застрягли, перегляньте вищеподаний приклад. # --hints-- @@ -38,7 +38,7 @@ const firstLetter = firstName[0]; assert(firstLetterOfLastName === 'L'); ``` -Вам слід використовувати дужкову нотацію. +Ви повинні використати дужкову нотацію. ```js assert(code.match(/firstLetterOfLastName\s*=\s*lastName\s*\[\s*\d\s*\]/)); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-last-character-in-a-string.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-last-character-in-a-string.md index d0476568550..56ce0139fc6 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-last-character-in-a-string.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-last-character-in-a-string.md @@ -1,6 +1,6 @@ --- id: bd7123c9c451eddfaeb5bdef -title: Використовуйте Дужкову Нотацію для Пошуку Останнього Символу в Рядку +title: Дужкова нотація для пошуку останнього символа рядка challengeType: 1 videoUrl: 'https://scrimba.com/c/cBZQGcv' forumTopicId: 18342 @@ -9,28 +9,28 @@ dashedName: use-bracket-notation-to-find-the-last-character-in-a-string # --description-- -Щоб отримати останню літеру рядка, ви можете відняти її від довжини рядка. +Щоб отримати останню літеру рядка, можна відняти одиницю від довжини рядка. -Наприклад, якщо `const firstName = "Ada"`, ви можете отримати значення останньої літери, використовуючи `firstName[firstName.length - 1]`. +Наприклад, якщо `const firstName = "Ada"`, ви можете отримати значення останньої літери, використавши `firstName[firstName.length - 1]`. -Наприклад: +Приклад: ```js const firstName = "Ada"; const lastLetter = firstName[firstName.length - 1]; ``` -`lastLetter` повинна мати значення рядка `a`. +`lastLetter` матиме значення рядка `a`. # --instructions-- -Використовуйте дужкову нотацію, щоб знайти останній символ у змінній `lastName`. +Використайте дужкову нотацію, щоб знайти останній символ у змінній `lastName`. -**Підказка:**Спробуйте подивитися на приклад вище, якщо застрягли. +**Підказка:** якщо застрягли, перегляньте вищеподаний приклад. # --hints-- -`lastLetterOfLastName` повинно бути літерою `e`. +`lastLetterOfLastName` повинна бути літера `e`. ```js assert(lastLetterOfLastName === 'e'); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-nth-character-in-a-string.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-nth-character-in-a-string.md index 7a2a1ae2423..4443cc2eae7 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-nth-character-in-a-string.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-nth-character-in-a-string.md @@ -1,6 +1,6 @@ --- id: bd7123c9c450eddfaeb5bdef -title: Використовуйте Дужкову Нотацію для Пошуку N-го Символу в Рядку +title: Дужкова нотація для пошуку n-го символа рядка challengeType: 1 videoUrl: 'https://scrimba.com/c/cWPVJua' forumTopicId: 18343 @@ -9,24 +9,24 @@ dashedName: use-bracket-notation-to-find-the-nth-character-in-a-string # --description-- -Ви можете також використовувати дужкову нотацію, щоб отримати символ на інших позиціях в рядку. +Ви також можете використати дужкову нотацію, щоб отримати символ на інших позиціях рядка. -Пам'ятайте, що комп'ютер починає рахувати з `0`, тому перший символ є в дійсності нульовим. +Пам’ятайте, що комп’ютер починає рахувати з `0`, тому насправді першим символом є нульовий. -Наприклад: +Приклад: ```js const firstName = "Ada"; const secondLetterOfFirstName = firstName[1]; ``` -`secondLetterOfFirstName` повинна мати значення рядка `d`. +`secondLetterOfFirstName` матиме значення рядка `d`. # --instructions-- -Спробуйте встановити `thirdLetterOfLastName` на рівні третьої літери змінної `lastName`, використовуючи дужкову нотацію. +Спробуйте встановити `thirdLetterOfLastName`, щоб вона дорівнювала третій літері змінної `lastName`, використовуючи дужкову нотацію. -**Підказка:** Спробуйте подивитися на приклад вище, якщо застрягли. +**Підказка:** якщо застрягли, перегляньте вищеподаний приклад. # --hints-- @@ -36,7 +36,7 @@ const secondLetterOfFirstName = firstName[1]; assert(thirdLetterOfLastName === 'v'); ``` -Вам слід використовувати дужкову нотацію. +Ви повинні використати дужкову нотацію. ```js assert(code.match(/thirdLetterOfLastName\s*=\s*lastName\s*\[\s*\d\s*\]/)); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-nth-to-last-character-in-a-string.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-nth-to-last-character-in-a-string.md index 2f0dd284938..b698783888b 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-nth-to-last-character-in-a-string.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-bracket-notation-to-find-the-nth-to-last-character-in-a-string.md @@ -1,6 +1,6 @@ --- id: bd7123c9c452eddfaeb5bdef -title: Використовуйте Дужкову Нотацію для Пошуку Символу N-го до Останнього в Рядку +title: Дужкова нотація для пошуку n-го символа з кінця рядка challengeType: 1 videoUrl: 'https://scrimba.com/c/cw4vkh9' forumTopicId: 18344 @@ -9,34 +9,34 @@ dashedName: use-bracket-notation-to-find-the-nth-to-last-character-in-a-string # --description-- -Ви можете використовувати той самий принцип, який ми використовували для отримання останнього символу в рядку, щоб отримати символ N-го до останнього. +Ви можете використати той самий принцип, який ми щойно використовували для отримання останнього символу в рядку, щоб отримати n-ий символ з кінця. -Наприклад, ви можете отримати значення третьої до останньої літери рядка `const firstName = "Augusta"`, використовуючи `firstName[firstName.length - 3]` +Наприклад, ви можете отримати значення третьої з кінця літери рядка `const firstName = "Augusta"`, використавши `firstName[firstName.length - 3]` -Наприклад: +Приклад: ```js const firstName = "Augusta"; const thirdToLastLetter = firstName[firstName.length - 3]; ``` -`thirdToLastLetter` повинен мати значення рядка `s`. +`thirdToLastLetter` матиме значення рядка `s`. # --instructions-- -Використовуйте дужкову нотацію для пошуку передостаннього символу в `lastName` в рядку. +Використайте дужкову нотацію, щоб знайти другий з кінця символ у рядку `lastName`. -**Підказка:**Спробуйте подивитися на приклад вище, якщо застрягли. +**Підказка:** якщо застрягли, перегляньте вищеподаний приклад. # --hints-- -`secondToLastLetterOfLastName` повинно бути літерою `c`. +`secondToLastLetterOfLastName` повинна бути літера `c`. ```js assert(secondToLastLetterOfLastName === 'c'); ``` -Вам слід використовувати `.length`, щоб отримати передостанню літеру. +Ви повинні використати `.length`, щоб отримати передостанню літеру. ```js assert(code.match(/\.length/g).length > 0); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-conditional-logic-with-if-statements.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-conditional-logic-with-if-statements.md index d743b19a570..c4258e437f1 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-conditional-logic-with-if-statements.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-conditional-logic-with-if-statements.md @@ -1,6 +1,6 @@ --- id: cf1111c1c12feddfaeb3bdef -title: Використання умовної логіки з командою if +title: Використання умовної логіки з інструкцією if challengeType: 1 videoUrl: 'https://scrimba.com/c/cy87mf3' forumTopicId: 18348 @@ -9,15 +9,15 @@ dashedName: use-conditional-logic-with-if-statements # --description-- -Інструкції `If` використовуються для прийняття рішень у коді. Ключове слово `if` наказує JavaScript виконати код у фігурних дужках за певних умов, вказаних у круглих дужках. Ці умови ще називаються умовами `Boolean` і вони можуть бути лише `true` або `false`. +Інструкції `if` використовують для прийняття рішень у коді. Ключове слово `if` вказує JavaScript виконати код у фігурних дужках за певних умов, вказаних у круглих дужках. Ці умови ще називаються булевими умовами (`Boolean`), і вони можуть бути лише `true` або `false`. -Коли умова є оціненою як `true`, програма виконує команду у фігурних дужках. Коли булева умова є оцінена як `false`, команда у фігурних дужках не буде виконана. +Якщо умова оцінена як `true`, програма виконує інструкцію у фігурних дужках. Якщо булева умова оцінена як `false`, команда у фігурних дужках не виконується. **Псевдокод** -

                                                                                                                                                                                                                                                                                                  if (condition is true) {
                                                                                                                                                                                                                                                                                                    statement is executed
                                                                                                                                                                                                                                                                                                  }
                                                                                                                                                                                                                                                                                                  +
                                                                                                                                                                                                                                                                                                  if (умова оцінена як true) {
                                                                                                                                                                                                                                                                                                    інструкція виконується
                                                                                                                                                                                                                                                                                                  }
                                                                                                                                                                                                                                                                                                  -**Наприклад:** +**Приклад** ```js function test (myCondition) { @@ -33,39 +33,39 @@ test(false); `test(true)` повертає рядок `It was true`, а `test(false)` повертає рядок `It was false`. -Коли `test` отримує значення `true`, оператор `if` оцінює `myCondition`, щоб побачити чи воно є `true` чи ні. Оскільки це `true`, функція повертає `It was true`. Коли ми викликаємо `test` зі значенням `false`, `myCondition` *не* `true`, інструкція у круглих дужках не виконується та функція повертає `It was false`. +Коли `test` викликається зі значенням `true`, інструкція `if` оцінює `myCondition`, щоб побачити чи воно `true`. Оскільки воно `true`, функція повертає `It was true`. Коли ми викликаємо `test` зі значенням `false`, то `myCondition` *не* оцінюється як `true`, інструкція у круглих дужках не виконується та функція повертає `It was false`. # --instructions-- -Створіть оператора `if` всередині функції, щоб повернути `Yes, that was true`, якщо параметр `wasThatTrue` є `true` та повернути `No, that was false` у протилежному випадку. +Створіть інструкцію `if` всередині функції, щоб повернути `Yes, that was true`, якщо параметр `wasThatTrue` є `true` та повернути `No, that was false` у протилежному випадку. # --hints-- -`trueOrFalse` повинен бути функцією +`trueOrFalse` повинна бути функцією ```js assert(typeof trueOrFalse === 'function'); ``` -`trueOrFalse(true)` повинен повертати рядок +`trueOrFalse(true)` повинна повертати рядок ```js assert(typeof trueOrFalse(true) === 'string'); ``` -`trueOrFalse(false)` повинен повертати рядок +`trueOrFalse(false)` повинна повертати рядок ```js assert(typeof trueOrFalse(false) === 'string'); ``` -`trueOrFalse(true)` повинен повертати рядок `Yes, that was true` +`trueOrFalse(true)` повинна повертати рядок `Yes, that was true` ```js assert(trueOrFalse(true) === 'Yes, that was true'); ``` -`trueOrFalse(false)` повинен повертати рядок `No, that was false` +`trueOrFalse(false)` повинна повертати рядок `No, that was false` ```js assert(trueOrFalse(false) === 'No, that was false'); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-multiple-conditional-ternary-operators.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-multiple-conditional-ternary-operators.md index a33c54866ef..3b7d6708b85 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-multiple-conditional-ternary-operators.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-multiple-conditional-ternary-operators.md @@ -1,6 +1,6 @@ --- id: 587d7b7e367417b2b2512b21 -title: Використання декількох умовних (трикомпонентних) операторів +title: Використання декількох умовних (тернарних) операторів challengeType: 1 videoUrl: 'https://scrimba.com/c/cyWJBT4' forumTopicId: 301179 @@ -11,7 +11,7 @@ dashedName: use-multiple-conditional-ternary-operators У попередньому завданні ви використовували одинарний умовний оператор. Ви також можете їх об'єднати для того, щоб перевірити декілька умов. -Наступна функція використовує `if`, `else if`, а також `else` твердження, щоб перевірити декілька умов: +Наступна функція використовує інструкції `if`, `else if` та `else`, щоб перевірити декілька умов: ```js function findGreaterOrEqual(a, b) { @@ -47,29 +47,29 @@ function findGreaterOrEqual(a, b) { # --instructions-- -У функції `checkSign`, використовуйте декілька умовних операторів, дотримуючись рекомендованого формату, що використаний у `findGreaterOrEqual` - для того, щоб перевірити чи число додатнє, від'ємне або нуль. Функція має повернути `positive`, `negative` or `zero`. +Використайте декілька умовних операторів у функції `checkSign`, дотримуючись рекомендованого формату, використаного у `findGreaterOrEqual`, щоб перевірити, чи число додатнє, від’ємне або дорівнює нулю. Функція повинна повертати `positive`, `negative` або `zero`. # --hints-- -`checkSign` має використовувати декілька умовних операторів +`checkSign` повинна використовувати декілька умовних операторів ```js assert(/.+?\s*?\?\s*?.+?\s*?:\s*?.+?\s*?\?\s*?.+?\s*?:\s*?.+?/gi.test(code)); ``` -`checkSign(10)` повинен повертати рядок `positive`. Зверніть увагу на те, що написання з великої літери - важливе +`checkSign(10)` повинна повертати рядок `positive`. Зверніть увагу на те, що важливе написання з великої/малої літери ```js assert(checkSign(10) === 'positive'); ``` -`checkSign(-12)` повинен повертати рядок `negative`. Зверніть увагу на те, що написання з великої літери - важливе +`checkSign(-12)` повинна повертати рядок `negative`. Зверніть увагу на те, що важливе написання з великої/малої літери ```js assert(checkSign(-12) === 'negative'); ``` -`checkSign(0)` повинен повертати рядок `zero`. Зверніть увагу на те, що написання з великої літери - важливе +`checkSign(0)` повинна повертати рядок `zero`. Зверніть увагу на те, що важливе написання з великої/малої літери ```js assert(checkSign(0) === 'zero'); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-recursion-to-create-a-countdown.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-recursion-to-create-a-countdown.md index b46d142741e..95b5c3d366a 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-recursion-to-create-a-countdown.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-recursion-to-create-a-countdown.md @@ -1,6 +1,6 @@ --- id: 5cd9a70215d3c4e65518328f -title: Використовуйте рекурсію для створення зворотного відліку +title: Використання рекурсії для створення зворотного відліку challengeType: 1 forumTopicId: 305925 dashedName: use-recursion-to-create-a-countdown @@ -8,11 +8,11 @@ dashedName: use-recursion-to-create-a-countdown # --description-- -In a previous challenge, you learned how to use recursion to replace a `for` loop. Тепер подивимося на більш складну функцію, яка повертає масив послідовних чисел, починаючи з `1` до числа, переданого функції. +У попередньому завданні ви дізнались, як використовувати рекурсію для заміни циклів `for`. Тепер розглянемо складнішу функцію, яка повертає масив послідовних цілих чисел, починаючи з `1` до числа, переданого функції. -Як уже було згадано в попередньому завданні, це буде base case. Він повідомляє рекурсивній функції, коли їй більше не потрібно викликати саму себе. Це простий випадок, коли значення, яке повертається, вже відоме. Також існує recursive call, який виконує початкову функцію з різними параметрами. Якщо функція написана правильно, то буде досягнутий базовий випадок. +Як було згадано в попередньому завданні, ми матимемо базовий випадок. Він повідомляє рекурсивній функції, коли їй більше не потрібно викликати саму себе. Це простий випадок, коли повернене значення вже відоме. Також існує рекурсивний виклик, який виконує початкову функцію з різними аргументами. Якщо функція написана правильно, то буде досягнутий базовий випадок. -Наприклад, скажімо, ви хочете написати рекурсивну функцію, яка повертає масив, що містить числа від `1` до `n`. Цій функції потрібно прийняти параметр `n`, який означає остаточне число. Тоді їй потрібно викликати саму себе, поступово зменшуючи значення числа `n`, поки воно не досягне `1`. Ви можете написати функцію наступним чином: +Скажімо, ви хочете написати рекурсивну функцію, що повертає масив, який містить числа від `1` до `n`. Цій функції потрібно прийняти аргумент `n`, який позначає кінцеве число. Тоді їй потрібно викликати саму себе, поступово зменшуючи значення числа `n`, поки воно не досягне `1`. Ви можете написати функцію наступним чином: ```javascript function countup(n) { @@ -29,33 +29,33 @@ console.log(countup(5)); Значення `[1, 2, 3, 4, 5]` будуть відображені на консолі. -Спочатку це може здатися парадоксальним, адже значення `n` *зростає*, але значення у остаточному масиві *зростають*. Так відбувається, тому що підвищення відбувається останнім після рекурсивного виклику. У точці, де `n` вставляється в масив `countup(n - 1)` вже проаналізовано та повернуто `[1, 2, ..., n - 1]`. +Спочатку це може здатися парадоксальним, адже значення `n` *зменшується*, а значення у кінцевому масиві *збільшується*. Так відбувається через те, що збільшення відбувається останнім, після повернення рекурсивного виклику. На моменті, коли `n` поміщається у масив, `countup(n - 1)` вже проаналізований та повернуто `[1, 2, ..., n - 1]`. # --instructions-- -Ми вже визначили функцію під назвою `countdown` з одним параметром (`n`). Функція має використовувати рекурсію, щоб повернути масив, який містить цілі числа від `n` до `1` на основі параметра `n`. Якщо функція викликається числом меншим за 1, вона має повернути порожній масив. Наприклад, виклик цієї функції зі значенням `n = 5` має повернути масив `[5, 4, 3, 2, 1]`. Ваша функція має використовувати рекурсію шляхом виклику самої себе, але не повинна використовувати ніякі цикли. +Ми вже визначили функцію під назвою `countdown` з одним параметром (`n`). Функція повинна використовувати рекурсію, щоб повернути масив, який містить цілі числа від `n` до `1` на основі параметра `n`. Якщо функція викликається числом меншим за 1, вона повинна повернути порожній масив. Наприклад, якщо викликати цю функцію із `n = 5`, повинен повернутися масив `[5, 4, 3, 2, 1]`. Ваша функція повинна використовувати рекурсію, викликаючи саму себе, та не повинна використовувати цикли. # --hints-- -`countdown(-1)` має повернути пустий масив. +`countdown(-1)` повинна повертати порожній масив. ```js assert.isEmpty(countdown(-1)); ``` -`countdown(10)` має повернути `[10, 9, 8, 7, 6, 5, 4, 3, 2, 1]` +`countdown(10)` повинна повертати `[10, 9, 8, 7, 6, 5, 4, 3, 2, 1]` ```js assert.deepStrictEqual(countdown(10), [10, 9, 8, 7, 6, 5, 4, 3, 2, 1]); ``` -`countdown(5)` має повернути `[5, 4, 3, 2, 1]` +`countdown(5)` повинна повертати `[5, 4, 3, 2, 1]` ```js assert.deepStrictEqual(countdown(5), [5, 4, 3, 2, 1]); ``` -Ваш код не має опиратися на жодні цикли (`for`, `while` або функції більш високого порядку, такі як `forEach`, `map`, `filter`, and `reduce`). +Ваш код не повинен опиратися на жодні цикли (`for`, `while` або функції вищого порядку, як-от `forEach`, `map`, `filter` або `reduce`). ```js assert( @@ -63,7 +63,7 @@ assert( ); ``` -Вам слід використати рекурсію, щоб вирішити цю проблему. +Ви повинні використати рекурсію, щоб розв’язати це завдання. ```js assert( @@ -71,7 +71,7 @@ assert( ); ``` -Global variables should not be used to cache the array. +Не використовуйте глобальні змінні для кешування масиву. ```js countdown(1) diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-recursion-to-create-a-range-of-numbers.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-recursion-to-create-a-range-of-numbers.md index 52192450bb6..3f27bed193c 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-recursion-to-create-a-range-of-numbers.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-recursion-to-create-a-range-of-numbers.md @@ -8,11 +8,11 @@ dashedName: use-recursion-to-create-a-range-of-numbers # --description-- -Продовжуючи попереднє завдання, ми пропонуємо вам ще одну можливість створити рекурсивну функцію для вирішення проблеми. +Продовжуючи попереднє завдання, ми пропонуємо створити рекурсивну функцію ще раз, щоб розв’язати завдання. # --instructions-- -Ми визначили функцію під назвою `rangeOfNumbers` з двома параметрами. Функція повинна повернути масив цілих чисел, що починаються з числа, представленого параметром `startNum` і закінчується числом, яке представлене параметром `endNum`. Початкове число завжди буде меншим або рівним кінцевому номеру. Ваша функція має використовувати рекурсію, викликаючи сама себе, але не повинна використовувати якісь цикли. Вона також повинна працювати у випадках, коли`startNum` і `endNum` однакові. +Ми визначили функцію під назвою `rangeOfNumbers` з двома параметрами. Функція повинна повернути масив цілих чисел, що починається з числа, представленого параметром `startNum` і закінчується числом, представленим параметром `endNum`. Початкове число завжди буде меншим або дорівнюватиме кінцевому числу. Ваша функція повинна використовувати рекурсію, викликаючи саму себе, та не повинна використовувати цикли. Вона також повинна працювати, якщо `startNum` та `endNum` однакові. # --hints-- @@ -22,7 +22,7 @@ dashedName: use-recursion-to-create-a-range-of-numbers assert(Array.isArray(rangeOfNumbers(5, 10))); ``` -У вашому коді не повинні використовуватися ніякі циклічні синтаксичні структури (`for` або `while` або функції вищого порядку, такі як `forEach`, `map`, `filter`, або `reduce`). +Ваш код не повинен використовувати синтаксиси циклу (`for`, `while` або функції вищого порядку, як-от `forEach`, `map`, `filter` або `reduce`). ```js assert( @@ -30,7 +30,7 @@ assert( ); ``` -`rangeOfNumbers` повинен використовувати рекурсію (викликати самого себе) для вирішення цьгого завдання. +`rangeOfNumbers` повинна використовувати рекурсію (викликати саму себе), щоб розв’язати це завдання. ```js assert( @@ -38,25 +38,25 @@ assert( ); ``` -`rangeOfNumbers(1, 5)` повинен повертати `[1, 2, 3, 4, 5]`. +`rangeOfNumbers(1, 5)` повинна повертати `[1, 2, 3, 4, 5]`. ```js assert.deepStrictEqual(rangeOfNumbers(1, 5), [1, 2, 3, 4, 5]); ``` -`rangeOfNumbers(6, 9)` повинен повертати `[6, 7, 8, 9]`. +`rangeOfNumbers(6, 9)` повинна повертати `[6, 7, 8, 9]`. ```js assert.deepStrictEqual(rangeOfNumbers(6, 9), [6, 7, 8, 9]); ``` -`rangeOfNumbers(4, 4)` повинен повертати `[4]`. +`rangeOfNumbers(4, 4)` повинна повертати `[4]`. ```js assert.deepStrictEqual(rangeOfNumbers(4, 4), [4]); ``` -Global variables should not be used to cache the array. +Не використовуйте глобальні змінні для кешування масиву. ```js rangeOfNumbers(1, 3) diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-the-conditional-ternary-operator.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-the-conditional-ternary-operator.md index 80716483e62..5e9fe8c9050 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-the-conditional-ternary-operator.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-the-conditional-ternary-operator.md @@ -1,6 +1,6 @@ --- id: 587d7b7e367417b2b2512b24 -title: Використання умовного (трикомпонентного) оператора +title: Використання умовного (тернарного) оператора challengeType: 1 forumTopicId: 301181 dashedName: use-the-conditional-ternary-operator @@ -8,11 +8,11 @@ dashedName: use-the-conditional-ternary-operator # --description-- -Умовний оператор, який також називається трикомпонентним оператором, може використовуватися як однорядковий "if-else" вираз. +Умовний оператор, який також називається тернарним оператором, можна використовувати як однорядкову інструкцію «if-else». -Синтаксисом є `a ? b : c`, де `a` - це умова, `b` - це код, що запускається, коли умова повертає `true` і `c` - код, що запускається, коли умова повертає `false`. +Синтаксисом є `a ? b : c`, де `a` – умова, `b` – код, якщо умова повертає `true` та `c` – код, якщо умова повертає `false`. -Ця функція використовує `if/else` твердження для того, щоб перевірити умову: +Ця функція використовує інструкцію `if/else`, щоб перевірити умову: ```js function findGreater(a, b) { @@ -35,29 +35,29 @@ function findGreater(a, b) { # --instructions-- -Використовуйте умовний оператор у функції `checkEqual`, щоб перевірити чи два числа рівні, чи ні. Функція повинна повернути рядок `Equal` або рядок `Not Equal`. +Використайте умовний оператор у функції `checkEqual`, щоб перевірити, чи два числа рівні. Функція повинна повернути рядок `Equal` або рядок `Not Equal`. # --hints-- -`checkEqual` має використовувати умовний оператор +`checkEqual` повинна використовувати умовний оператор ```js assert(/.+?\s*?\?\s*?.+?\s*?:\s*?.+?/.test(code)); ``` -`checkEqual(1, 2)` повинен повертати рядок `Not Equal` +`checkEqual(1, 2)` повинна повертати рядок `Not Equal` ```js assert(checkEqual(1, 2) === 'Not Equal'); ``` -`checkEqual(1, 1)` повинен повертати рядок `Equal` +`checkEqual(1, 1)` повинна повертати рядок `Equal` ```js assert(checkEqual(1, 1) === 'Equal'); ``` -`checkEqual(1, -1)` повинен повертати рядок `Not Equal` +`checkEqual(1, -1)` повинна повертати рядок `Not Equal` ```js assert(checkEqual(1, -1) === 'Not Equal'); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-the-parseint-function-with-a-radix.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-the-parseint-function-with-a-radix.md index 6122e32ee71..20165988bd6 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-the-parseint-function-with-a-radix.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-the-parseint-function-with-a-radix.md @@ -1,6 +1,6 @@ --- id: 587d7b7e367417b2b2512b22 -title: Використайте функцію ParseInt з радіусом +title: Використання функції parseInt з розрядом challengeType: 1 videoUrl: 'https://scrimba.com/c/c6K4Kh3' forumTopicId: 301182 @@ -9,7 +9,7 @@ dashedName: use-the-parseint-function-with-a-radix # --description-- -Функція `parseInt()` аналізує рядок і повертає ціле число. Для радікса потрібен другий аргумент, який визначає основу числа у рядку. Радіксом може бути ціле число від 2 до 36. +Функція `parseInt()` аналізує рядок і повертає ціле число. Вона приймає другий аргумент для розряду, який вказує базу числа в рядку. Розрядом може бути ціле число від 2 до 36. Виклик функції виглядає так: @@ -23,39 +23,39 @@ parseInt(string, radix); const a = parseInt("11", 2); ``` -Змінна радікса говорить, що `11` знаходиться у двійковій системі або у базі 2. Цей приклад перетворює рядок `11` на ціле число `3`. +Змінна розряду каже, що `11` знаходиться у двійковій системі, або у базі 2. Цей приклад перетворює рядок `11` на ціле число `3`. # --instructions-- -Використовуйте `parseInt()` у функції `convertToInteger`, щоб воно перетворило двійкове число на ціле число і повернуло його. +Використайте `parseInt()` у функції `convertToInteger`, щоб двійкове число перетворилось на ціле число і повернулось. # --hints-- -`convertToInteger` має використати функцію `parseInt()` +`convertToInteger` повинна використовувати функцію `parseInt()` ```js assert(/parseInt/g.test(code)); ``` -`convertToInteger("10011")` має повернути число +`convertToInteger("10011")` повинна повертати число ```js assert(typeof convertToInteger('10011') === 'number'); ``` -`convertToInteger("10011")` має повернути 19 +`convertToInteger("10011")` повинна повертати 19 ```js assert(convertToInteger('10011') === 19); ``` -`convertToInteger("111001")` має повернути 57 +`convertToInteger("111001")` повинна повертати 57 ```js assert(convertToInteger('111001') === 57); ``` -`convertToInteger("JamesBond")` має повернути `NaN` +`convertToInteger("JamesBond")` повинна повертати `NaN` ```js assert.isNaN(convertToInteger('JamesBond')); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-the-parseint-function.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-the-parseint-function.md index 6aba56ffb0a..2c346959fca 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-the-parseint-function.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/use-the-parseint-function.md @@ -1,6 +1,6 @@ --- id: 587d7b7e367417b2b2512b23 -title: Використовуйте Функцію parseInt +title: Використання функції parseInt challengeType: 1 videoUrl: 'https://scrimba.com/c/cm83LSW' forumTopicId: 301183 @@ -15,39 +15,39 @@ dashedName: use-the-parseint-function const a = parseInt("007"); ``` -Наведена вище функція перетворює рядок `007` у ціле `7`. Якщо перший символ у рядку не може бути перетвореним у число, тоді він повертає `NaN`. +Наведена вище функція перетворює рядок `007` на ціле число `7`. Якщо перший символ у рядку не можна перетворити на число, повертається `NaN`. # --instructions-- -Використовуйте `parseInt()` у функції `convertToInteger`, щоб вона конвертувала вхідний рядок `str` у ціле число та повернула його. +Використайте `parseInt()` у функції `convertToInteger`, щоб вхідний рядок `str` перетворився на ціле число та повернувся. # --hints-- -`convertToInteger` має використати функцію `parseInt()` +`convertToInteger` повинна використовувати функцію `parseInt()` ```js assert(/parseInt/g.test(code)); ``` -`convertToInteger("56")` має повернути число +`convertToInteger("56")` повинна повертати число ```js assert(typeof convertToInteger('56') === 'number'); ``` -`convertToInteger("56")` має повернути 56 +`convertToInteger("56")` повинна повертати 56 ```js assert(convertToInteger('56') === 56); ``` -`convertToInteger("77")` має повернути 77 +`convertToInteger("77")` повинна повертати 77 ```js assert(convertToInteger('77') === 77); ``` -`convertToInteger("JamesBond")` має повернути `NaN` +`convertToInteger("JamesBond")` повинна повертати `NaN` ```js assert.isNaN(convertToInteger('JamesBond')); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/using-objects-for-lookups.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/using-objects-for-lookups.md index eb3e9f9652f..ddccc78c5d1 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/using-objects-for-lookups.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/using-objects-for-lookups.md @@ -9,9 +9,9 @@ dashedName: using-objects-for-lookups # --description-- -Об'єкти можна вважати сховищем ключів та значень, як словники. Якщо ви маєте табличні дані, ви краще можете використати об'єкт для пошуку значень, ніж `switch` твердження або `if/else` ланцюжок. Це найбільш корисно, коли ви знаєте, що ваші вхідні дані обмежені до певного діапазону. +Об'єкти можна вважати сховищем ключів/значень, як словники. Якщо ви маєте табличні дані, для пошуку значень краще використати об'єкт, а не інструкцію `switch` чи ланцюжок `if/else`. В такому випадку найкраще, якщо ви знаєте, що ваші вхідні дані обмежені до певного діапазону. -Here is an example of an article object: +Ось приклад об’єкта-публікації: ```js const article = { @@ -30,11 +30,11 @@ const value = "title"; const valueLookup = article[value]; ``` -`articleAuthor` is the string `Kaashan Hussain`, `articleLink` is the string `https://www.freecodecamp.org/news/a-complete-guide-to-creating-objects-in-javascript-b0e2450655e8/`, and `valueLookup` is the string `How to create objects in JavaScript`. +`articleAuthor` є рядком `Kaashan Hussain`, `articleLink` є рядком `https://www.freecodecamp.org/news/a-complete-guide-to-creating-objects-in-javascript-b0e2450655e8/`, а `valueLookup` є рядком `How to create objects in JavaScript`. # --instructions-- -Переробіть ключове твердження на об'єкт, що називається `lookup`. Використовуйте його, щоб шукати `val` і призначати пов'язаний рядок до `result` змінної. +Перетворіть інструкцію switch на об’єкт під назвою `lookup`. Використайте його, щоб знайти `val` та призначати пов'язаний рядок до змінної `result`. # --hints-- @@ -80,13 +80,13 @@ assert(phoneticLookup('foxtrot') === 'Frank'); assert(typeof phoneticLookup('') === 'undefined'); ``` -Вам не слід змінювати `return` твердження +Ви не повинні змінювати інструкцію `return` ```js assert(code.match(/return\sresult;/)); ``` -Вам не слід використовувати `case`, `switch` або `if` твердження +Ви не повинні використовувати інструкції `case`, `switch` або `if` ```js assert( diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/word-blanks.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/word-blanks.md index b8e66955219..193c37d964d 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/word-blanks.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/word-blanks.md @@ -9,9 +9,9 @@ dashedName: word-blanks # --description-- -You are provided sentences with some missing words, like nouns, verbs, adjectives and adverbs. You then fill in the missing pieces with words of your choice in a way that the completed sentence makes sense. +Вам надано речення з пропущеними словами: іменниками, дієсловами, прикметниками та прислівниками. Потім ви заповнюєте пропуски словами так, щоб завершене речення мало сенс. -Consider this sentence - It was really **\_\_\_\_**, and we **\_\_\_\_** ourselves **\_\_\_\_**. This sentence has three missing pieces- an adjective, a verb and an adverb, and we can add words of our choice to complete it. We can then assign the completed sentence to a variable as follows: +Розгляньте речення «It was really **\_\_\_\_**, and we **\_\_\_\_** ourselves **\_\_\_\_**». У цьому реченні відсутні три слова: прикметник, дієслово та прислівник; ми можемо додати вибрані слова, щоб завершити речення. Потім ми можемо присвоїти завершене речення змінній наступним чином: ```js const sentence = "It was really " + "hot" + ", and we " + "laughed" + " ourselves " + "silly" + "."; @@ -19,21 +19,21 @@ const sentence = "It was really " + "hot" + ", and we " + "laughed" + " ourselve # --instructions-- -In this challenge, we provide you with a noun, a verb, an adjective and an adverb. You need to form a complete sentence using words of your choice, along with the words we provide. +У цьому завданні вам надано іменник, дієслово, прикметник та прислівник. Ви повинні завершити речення, використовуючи слова на власний вибір, а також надані нами. -You will need to use the string concatenation operator `+` to build a new string, using the provided variables: `myNoun`, `myAdjective`, `myVerb`, and `myAdverb`. You will then assign the formed string to the `wordBlanks` variable. You should not change the words assigned to the variables. +Ви повинні використати оператор конкатенації `+`, щоб побудувати новий рядок, використовуючи надані змінні: `myNoun`, `myAdjective`, `myVerb` та `myAdverb`. Потім ви присвоїте сформований рядок до змінної `wordBlanks`. Ви не повинні змінювати слова, присвоєні зміннім. -You will also need to account for spaces in your string, so that the final sentence has spaces between all the words. The result should be a complete sentence. +Вам також потрібно врахувати пропуски у рядку, щоб завершене речення містило пробіли між усіма словами. Результатом повинне бути завершене речення. # --hints-- -`wordBlanks` має бути рядком. +`wordBlanks` повинен бути рядком. ```js assert(typeof wordBlanks === 'string'); ``` -You should not change the values assigned to `myNoun`, `myVerb`, `myAdjective` or `myAdverb`. +Ви не повинні змінювати значення, присвоєні до `myNoun`, `myVerb`, `myAdjective` або `myAdverb`. ```js assert( @@ -44,7 +44,7 @@ assert( ); ``` -You should not directly use the values `dog`, `ran`, `big`, or `quickly` to create `wordBlanks`. +Ви не повинні напряму використовувати значення `dog`, `ran`, `big` або `quickly`, щоб створити `wordBlanks`. ```js const newCode = removeAssignments(code); @@ -56,7 +56,7 @@ assert( ); ``` -`wordBlanks` should contain all of the words assigned to the variables `myNoun`, `myVerb`, `myAdjective` and `myAdverb` separated by non-word characters (and any additional words of your choice). +`wordBlanks` повинен містити всі слова, присвоєні до змінних `myNoun`, `myVerb`, `myAdjective` та `myAdverb`, розділені розділовим знаком (та додаткові слова на ваш вибір). ```js assert( diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/write-reusable-javascript-with-functions.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/write-reusable-javascript-with-functions.md index 655a53c4698..7841896ddf1 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/write-reusable-javascript-with-functions.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/write-reusable-javascript-with-functions.md @@ -1,6 +1,6 @@ --- id: 56bbb991ad1ed5201cd392cf -title: Створення багаторазового коду JavaScript за допомогою функцій +title: Написання багаторазового JavaScript із функціями challengeType: 1 videoUrl: 'https://scrimba.com/c/cL6dqfy' forumTopicId: 18378 @@ -9,7 +9,7 @@ dashedName: write-reusable-javascript-with-functions # --description-- -У JavaScript можна розділити код на повторно використовувані частини, які називаються функціями. +У JavaScript можна розділити код на багаторазові частини, які називаються функціями. Приклад функції: @@ -19,13 +19,13 @@ function functionName() { } ``` -Ви можете викликати або активувати цю функцію, використавши дужки для написання її назви, ось так: `functionName();`. При кожному виклику функції на консоль буде виводитись повідомлення `Hello World`. Щоразу як буде викликана функція, увесь код між фігурними дужками буде виконуватись. +Ви можете викликати або активувати цю функцію, використавши дужки для написання її назви, ось так: `functionName();`. При кожному виклику функції на консоль буде виводитись повідомлення `Hello World`. При кожному виклику функції буде виконуватись код у фігурних дужках. # --instructions--
                                                                                                                                                                                                                                                                                                  1. - Створіть функцію, яка називається reusableFunction, що друкує рядок Hi World на консоль розробників. + Створіть функцію під назвою reusableFunction, яка друкує рядок Hi World на консоль.
                                                                                                                                                                                                                                                                                                  2. Викличте функцію. @@ -34,19 +34,19 @@ function functionName() { # --hints-- -`reusableFunction` повинен бути функцією. +`reusableFunction` повинна бути функцією. ```js assert(typeof reusableFunction === 'function'); ``` -Якщо `reusableFunction` буде викликано, то він має виводити рядок `Hi World` на консоль. +Якщо `reusableFunction` буде викликано, то вона повинна виводити рядок `Hi World` на консоль. ```js assert(testConsole()); ``` -Викличте функцію `reusableFunction` після її визначення. +Ви повинні викликати `reusableFunction` після її визначення. ```js const functionStr = reusableFunction && __helpers.removeWhiteSpace(reusableFunction.toString()); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/es6/compare-scopes-of-the-var-and-let-keywords.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/es6/compare-scopes-of-the-var-and-let-keywords.md index 2074773d3c7..ad0b747f17d 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/es6/compare-scopes-of-the-var-and-let-keywords.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/es6/compare-scopes-of-the-var-and-let-keywords.md @@ -1,6 +1,6 @@ --- id: 587d7b87367417b2b2512b40 -title: Порівняйте можливості ключових слів var та let +title: Порівняння областей видимості ключових слів var та let challengeType: 1 forumTopicId: 301195 dashedName: compare-scopes-of-the-var-and-let-keywords @@ -8,11 +8,11 @@ dashedName: compare-scopes-of-the-var-and-let-keywords # --description-- -Якщо ви ще не знаєте про `let`, див. це завдання про різницю між let та var. +Якщо ви ще не знайомі з `let`, див. це завдання про різницю між let та var. -Коли ви задаєте змінну з ключовим словом `var`, вона стане глобальною або локальною, якщо буде оголошена у рамках функції. +Коли ви оголошуєте змінну з ключовим словом `var`, вона оголошена глобально, або локально, якщо оголошена всередині функції. -Ключове слово `let` функціонує схожим чином, але з додатковими можливостями. Коли ви задаєте змінну з ключовим словом `let` у блоці, команді чи виразі, її можливості обмежуються цим блоком, виразом чи виразом. +Ключове слово `let` поводиться схожим чином, але з додатковими можливостями. Коли ви оголошуєте змінну з ключовим словом `let` всередині блоку, інструкції чи виразу, її можливості обмежуються цим блоком, інструкцією чи виразом. Наприклад: @@ -27,7 +27,7 @@ console.log(i); У такому разі консоль показуватиме значення `[0, 1, 2]` та `3`. -Якщо ключове слово — `var`, значення `i` оголошується глобальним. Отже, коли виконується `i++`, глобальна змінна теж оновлюється. Цей код виглядає наступним чином: +Якщо ключовим словом є `var`, то `i` оголошується глобально. Тому коли виконується `i++`, глобальна змінна теж оновлюється. Цей код схожий до наступного: ```js var numArray = []; @@ -57,7 +57,7 @@ console.log(printNumTwo()); У такому разі консоль показуватиме значення `3`. -Як бачите, `printNumTwo()` показує 3, а не 2. Це пояснюється тим, що значення для `i` оновилося, а `printNumTwo()` повертає глобальне значення `i`, а не те значення, яке `i` мало при створенні функції для циклу. Ключове слово `let` діє інакше: +Як бачите, `printNumTwo()` друкує 3, а не 2. Це пояснюється тим, що значення для `i` оновилося, а `printNumTwo()` повертає глобальну `i`, а не те значення, яке `i` мало при створенні функції у циклі for. Ключове слово `let` діє інакше: ```js let printNumTwo; @@ -72,31 +72,31 @@ console.log(printNumTwo()); console.log(i); ``` -У такому разі консоль показуватиме значення `2`, і помилку: `i is not defined`. +У такому разі консоль показуватиме значення `2` та помилку `i is not defined`. -`i` не визначено (not defined), оскільки змінну не було оголошено в глобальному масштабі. Вона стає оголошеною лише у команді циклу `for`. `printNumTwo()` повернув правильне значення, оскільки було створено три різних змінних `i` з унікальними значеннями (0, 1, та 2) завдяки ключовому слову `let` в рамках команди циклу. +`i` не визначена, оскільки її не було оголошено в глобальній області. Вона оголошена лише в інструкції циклу `for`. `printNumTwo()` повернула правильне значення, оскільки за допомогою ключового слова `let` в межах інструкції циклу було створено три різні змінні `i` з унікальними значеннями (0, 1 та 2). # --instructions-- -Виправте код так, щоб `i`, оголошена в команді `if`, була окремою змінною, на відміну від `i`, оголошеної у першому рядку функції. Не використовуйте у вашому коді ключове слово `var`. +Виправте код так, щоб `i`, оголошена в інструкції `if`, була окремою змінною від `i`, оголошеною у першому рядку функції. Не використовуйте у вашому коді ключове слово `var`. -Ця вправа створена для того, щоб показати відмінність між тим, як ключові слова `var` і `let` задають можливості оголошеної змінної. При програмуванні схожої функції на ту, що використовувалася у цій вправі, нерідко слід використовувати різні назви для змінних, щоб уникнути плутанини. +Ця вправа створена для того, щоб показати відмінність між тим, як ключові слова `var` і `let` присвоюють область видимості оголошеній змінній. При програмуванні схожої функції краще використовувати різні назви для змінних, щоб уникнути плутанини. # --hints-- -`var` має бути відсутнім у коді. +`var` повинне бути відсутнім у коді. ```js assert(!code.match(/var/g)); ``` -Змінна `i`, оголошена в операторі `if`, має дорівнювати рядку `block scope`. +Змінна `i`, оголошена в інструкції `if`, повинна дорівнювати рядку `block scope`. ```js assert(code.match(/(i\s*=\s*).*\s*.*\s*.*\1('|")block\s*scope\2/g)); ``` -`checkScope()` має повернути рядок `function scope` +`checkScope()` повинна повертати рядок `function scope` ```js assert(checkScope() === 'function scope'); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/es6/mutate-an-array-declared-with-const.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/es6/mutate-an-array-declared-with-const.md index 2594e86a699..811316d02e8 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/es6/mutate-an-array-declared-with-const.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/es6/mutate-an-array-declared-with-const.md @@ -1,6 +1,6 @@ --- id: 587d7b87367417b2b2512b42 -title: Видозмінюйте наданий масив за допомогою змінної +title: Мутація масиву, оголошеного з const challengeType: 1 forumTopicId: 301206 dashedName: mutate-an-array-declared-with-const @@ -8,13 +8,13 @@ dashedName: mutate-an-array-declared-with-const # --description-- -Якщо ви ще не знаєте про `const`, див. це завдання про ключове слово const. +Якщо ви ще не знайомі з `const`, див. це завдання про ключове слово const. -Є багато значень змінної `const` у сучасній JavaScript. +У сучасному JavaScript існує багато випадків оголошень з `const`. -Деякі розробники надають перевагу привласненню усіх змінних за допомогою `const`, доки вони не дізнаються про можливу необхідність перепризначення змінної. Тоді вони використовують `let`. +Деякі розробники надають перевагу присвоєнню усіх змінних за допомогою `const`, якщо їм не потрібно повторно присвоїти значення. Тоді вони використовують `let`. -Проте варто розуміти, що об'єкти (включаючи масиви та функції), призначенні змінній за допомогою `const`, все ще можна змінювати. Правильне використання `const` запобігає зміненню ідентифікатора змінної. +Однак варто розуміти, що об'єкти (включно з масивами та функціями), присвоєні змінній за допомогою `const`, всеодно можна змінити. Оголошення `const` всього лиш запобігає повторному присвоєнню ідентифікатора змінної. ```js const s = [5, 6, 7]; @@ -23,29 +23,29 @@ s[2] = 45; console.log(s); ``` -`s = [1, 2, 3]` призведе до помилки. After commenting out that line, the `console.log` will display the value `[5, 6, 45]`. +`s = [1, 2, 3]` призведе до помилки. Після коментування цього рядка, `console.log` показуватиме значення `[5, 6, 45]`. -Як ви помітили, можна змінювати об'єкт `[5, 6, 7]`. Змінна `s` все ще вказуватиме на змінений масив `[5, 6, 45]`. Як і усі масиви, елементи масиву в `s` є незмінними, бо було використано `const`. Ви не можете використовувати ідентифікатор змінної `s`, щоб вказувати на інший масив оператору призначення. +Як ви помітили, об’єкт `[5, 6, 7]` можна змінювати, але змінна `s` всеодно вказуватиме на змінений масив `[5, 6, 45]`. Як і усі масиви, елементи масиву в `s` є змінними, але оскільки було використано `const`, ви не можете використати ідентифікатор змінної `s`, щоб вказати на інший масив за допомогою оператора присвоєння. # --instructions-- -Масив оголошується як `const s = [5, 7, 2]`. Змініть масив на `[2, 5, 7]` використовуючи різні призначення елементів. +Масив оголошується як `const s = [5, 7, 2]`. Змініть масив на `[2, 5, 7]`, використовуючи різні присвоєння елементів. # --hints-- -Вам не слід замінювати ключове слово `const`. +Ви не повинні замінювати ключове слово `const`. ```js (getUserInput) => assert(getUserInput('index').match(/const/g)); ``` -`s` має бути постійно змінною (використовуйте `const`). +`s` повинна бути константною змінною (використовуйте `const`). ```js (getUserInput) => assert(getUserInput('index').match(/const\s+s/g)); ``` -Не слід змінювати початковий масив. +Ви не повинні змінювати оголошення масиву. ```js (getUserInput) => @@ -56,7 +56,7 @@ console.log(s); ); ``` -`s` повинен дорівнювати `[2, 5, 7]`. +`s` повинна дорівнювати `[2, 5, 7]`. ```js assert.deepEqual(s, [2, 5, 7]); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/add-elements-to-the-end-of-an-array-using-concat-instead-of-push.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/add-elements-to-the-end-of-an-array-using-concat-instead-of-push.md index 840e2c9cda0..e73b6a16c25 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/add-elements-to-the-end-of-an-array-using-concat-instead-of-push.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/add-elements-to-the-end-of-an-array-using-concat-instead-of-push.md @@ -1,6 +1,6 @@ --- id: 587d7da9367417b2b2512b67 -title: Додати елементи в кінець масиву за допомогою контикату замість натискання +title: Додавання елементів в кінець масиву за допомогою concat замість push challengeType: 1 forumTopicId: 301226 dashedName: add-elements-to-the-end-of-an-array-using-concat-instead-of-push @@ -8,32 +8,32 @@ dashedName: add-elements-to-the-end-of-an-array-using-concat-instead-of-push # --description-- -Функціональне програмування - це створення та використання функцій, що не змінюються. +Найважливішим у функційному програмуванні є створення та використання незмінних функцій. -The last challenge introduced the `concat` method as a way to merge arrays into a new array without mutating the original arrays. Порівняйте метод `concat` з методом `push`. `push` adds items to the end of the same array it is called on, which mutates that array. Ось один із прикладів: +У попередньому завданні ви дізнались про метод `concat`, за допомогою якого можна злити масиви в один, не змінюючи початкові масиви. Порівняйте метод `concat` з методом `push`. `push` додає елементи в кінець того масиву, в якому викликаний, тим самим змінюючи його. Ось приклад: ```js const arr = [1, 2, 3]; arr.push(4, 5, 6); ``` -`arr` would have a modified value of `[1, 2, 3, 4, 5, 6]`, which is not the functional programming way. +`arr` матиме змінене значення `[1, 2, 3, 4, 5, 6]`, що не відповідає функційному програмуванню. -`concat` offers a way to merge new items to the end of an array without any mutating side effects. +`concat` надає можливість додавати нові елементи в кінець масиву без побічних ефектів. # --instructions-- -Change the `nonMutatingPush` function so it uses `concat` to merge `newItem` to the end of `original` without mutating `original` or `newItem` arrays. Функція повинна повертати масив. +Змініть функцію `nonMutatingPush` так, щоб вона використовувала `concat`, аби додати `newItem` в кінець `original`, не змінюючи масиви `original` чи `newItem`. Функція повинна повертати масив. # --hints-- -Ваш код повинен застосовувати метод `concat`. +Ваш код повинен використовувати метод `concat`. ```js assert(code.match(/\.concat/g)); ``` -Не застосовуйте метод `push` у вашому коді. +Ваш код не повинен використовувати метод `push`. ```js assert(!code.match(/\.?[\s\S]*?push/g)); @@ -51,7 +51,7 @@ assert(JSON.stringify(first) === JSON.stringify([1, 2, 3])); assert(JSON.stringify(second) === JSON.stringify([4, 5])); ``` -`nonMutatingConcat([1, 2, 3], [4, 5])` повинен змінюватися на `[1, 2, 3, 4, 5]`. +`nonMutatingPush([1, 2, 3], [4, 5])` повинна повертати `[1, 2, 3, 4, 5]`. ```js assert( diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/apply-functional-programming-to-convert-strings-to-url-slugs.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/apply-functional-programming-to-convert-strings-to-url-slugs.md index 843b3728d0b..62f73f55c62 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/apply-functional-programming-to-convert-strings-to-url-slugs.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/apply-functional-programming-to-convert-strings-to-url-slugs.md @@ -1,6 +1,6 @@ --- id: 587d7dab367417b2b2512b6d -title: Застосуйте функціональне програмування для перетворення рядків в URL потоки +title: Застосування функційного програмування для перетворення рядків на URL-слаги challengeType: 1 forumTopicId: 301227 dashedName: apply-functional-programming-to-convert-strings-to-url-slugs @@ -8,45 +8,45 @@ dashedName: apply-functional-programming-to-convert-strings-to-url-slugs # --description-- -Останні кілька викликів охопили ряд корисних масивів та рядкових методів, що дотримуються принципів функціонального програмування. Ми також дізналися про `reduce`, який є потужним методом, що використовується для зменшення проблем для більш простої форми. Від середнього рівня обчислення до сортування, будь-яку масивну операцію можна досягти шляхом її застосування. Згадайте, що `map` і `filter` є особливими випадками `reduce`. +Декілька попередніх завдань охоплювали ряд корисних методів масивів та рядків, які дотримуються принципів функційного програмування. Ми також дізналися про потужний метод `reduce`, який використовується для скорочення задач. За його допомогою можна виконати будь-яку операцію над масивом: від обчислення до сортування. Пригадайте, що `map` та `filter` є особливими випадками `reduce`. -Об'єднаймо те, що ми навчилися вирішувати практичні проблеми. +Об’єднаємо вивчене, щоб розв’язати практичне завдання. -Багато сайтів управління контентом (CMS) мають заголовки матеріалу, доданих до частини URL для простих закладок. Наприклад, якщо ви напишете середній пост під назвою `Stop Using Reduce`, ймовірно, що URL буде мати певний формат рядка з заголовком (`.../stop-using-reduce`). Можливо, ви вже помітили це на сайті freeCodeCamp. +Багато сайтів керування вмістом (CMS) додають заголовки дописів до частини URL в цілях соціальних закладок. Наприклад, якщо ви напишете середній допис під назвою `Stop Using Reduce`, ймовірно, URL міститиме заголовок (`.../stop-using-reduce`). Можливо, ви вже помітили це на сайті freeCodeCamp. # --instructions-- -Заповніть функцію `urlSlug`, щоб вона конвертувала рядок `title` і повертала версію з дефісом для URL. Ви можете використати будь-який з методів, використаних у цьому розділі, і не використовуйте `replace`. Ось вимоги: +Заповніть функцію `urlSlug` так, щоб вона конвертувала рядок `title` та повертала URL, написану через дефіси. Ви можете використати будь-який з методів, описаних у цьому розділі, але не використовуйте `replace`. Ось вимоги: -Вхідний - це рядок з пробілами і текстовими словами +Вхідними даними є рядок зі словами з великої літери, розділеними пробілом -Вихідний рядок з пробілами між словами, заміненим на дефіс (`-`) +Вихідними даними є рядок зі словами, де пробіли замінено на дефіс (`-`) -Вихідний рядок повинен бути весь малими літерами +Вихідні дані повинні бути у нижньому регістрі Вихідний рядок не повинен мати жодних пробілів # --hints-- -Не використовуйте метод `replace` у вашому коді для цього завдання. +Ваш код не повинен використовувати метод `replace` у цьому завданні. ```js assert(!code.match(/\.?[\s\S]*?replace/g)); ``` -`urlSlug("Winter Is Coming")` повинен повернути рядок `winter-is-coming`. +`urlSlug("Winter Is Coming")` повинна повертати рядок `winter-is-coming`. ```js assert(urlSlug('Winter Is Coming') === 'winter-is-coming'); ``` -`urlSlug("Winter Is Coming")` повернути рядок `winter-is-coming`. +`urlSlug(" Winter Is Coming")` повинна повертати рядок `winter-is-coming`. ```js assert(urlSlug(' Winter Is Coming') === 'winter-is-coming'); ``` -`urlSlug("A Mind Needs Books Like A Sword Needs A Whetstone")` потрібно повернути рядок `a-mind-needs-books-like-a-sword-needs-needs-a-whetstone`. +`urlSlug("A Mind Needs Books Like A Sword Needs A Whetstone")` повинна повертати рядок `a-mind-needs-books-like-a-sword-needs-a-whetstone`. ```js assert( @@ -55,7 +55,7 @@ assert( ); ``` -`urlSlug(" Hold The Door")`слід повернути рядок `hold-door`. +`urlSlug("Hold The Door")` повинна повертати рядок `hold-the-door`. ```js assert(urlSlug('Hold The Door') === 'hold-the-door'); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/avoid-mutations-and-side-effects-using-functional-programming.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/avoid-mutations-and-side-effects-using-functional-programming.md index b3a56ca83e4..f0175127c03 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/avoid-mutations-and-side-effects-using-functional-programming.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/avoid-mutations-and-side-effects-using-functional-programming.md @@ -1,6 +1,6 @@ --- id: 587d7b8e367417b2b2512b5e -title: Уникайте будь-яких змін та побічних ефектів, використовуючи функціональне програмування +title: Уникнення мутацій та побічних ефектів завдяки функційному програмуванню challengeType: 1 forumTopicId: 301228 dashedName: avoid-mutations-and-side-effects-using-functional-programming @@ -8,39 +8,39 @@ dashedName: avoid-mutations-and-side-effects-using-functional-programming # --description-- -Якщо ви ще цього не зрозуміли, проблема в попередньому завданні була з `splice` у функції `Close()`. На жаль, `splice` змінює вихідний масив, в якому він викликається, тому другий дзвінок використовував модифікований масив і дав несподівані результати. +Якщо ви ще цього не зрозуміли, проблема в попередньому завданні полягала у виклику `splice` у функції `tabClose()`. На жаль, `splice` змінює вихідний масив, в якому він викликається, тому другий виклик використав модифікований масив і надав неочікувані результати. -Це невеликий приклад набагато більшого шаблону - викликається функція змінної, масиву або об'єкта, а функція змінює саме змінну чи щось інше в об’єкті. +Це малий приклад набагато більшого шаблону: ви викликаєте функцію на змінній, масиві чи об’єкті, а функція змінює змінну чи щось в об’єкті. -Одним з основних принципів функціонального програмування - не змінювати речі. Зміни призводять до помилок. Легше уникнути помилок, знаючи, що ваші функції нічого не змінюють, включаючи аргументи функцій чи будь-яку іншу глобальну змінну. +Один з основних принципів функційного програмування – нічого не змінювати. Зміни призводять до помилок. Легше уникнути помилок, знаючи, що ваші функції нічого не змінюють, включно з аргументами функцій чи будь-якою глобальною змінною. -Попередній приклад не мав жодних складних операцій, але метод `splice` змінив оригінальний масив і видав помилку. +У попередньому прикладі не було складних операцій, але метод `splice` змінив вихідний масив і видав помилку. -Нагадаємо, що у функціональному програмуванні зміни або зміна речей називається мутацією, і наслідок називається побічним ефектом. В ідеалі функція, повинна бути pure function, це означає, що вона не спричиняє жодних побічних ефектів. +Пригадаємо, що у функційному програмуванні зміну називають мутацією, а наслідок називають побічним ефектом. В ідеалі функція повинна бути чистою, тобто не спричиняти жодних побічних ефектів. -Давайте спробуємо освоїти цю дисципліну і не будемо змінювати будь-які змінні або об'єкти в нашому коді. +Спробуємо опанувати цю дисципліну і не будемо змінювати будь-які змінні чи об'єкти в нашому коді. # --instructions-- -Ввести код для функції`incrementer` таким чином, значення глобальної змінної `fixedValue` зросло в один раз. +Заповніть код функції `incrementer` так, щоб вона повертала значення глобальної змінної `fixedValue`, збільшене на один. # --hints-- -Ваша функція `incrementer` не повинна змінювати значення `fixedValue` (яка є `4`). +Ваша функція `incrementer` не повинна змінювати значення `fixedValue` (дорівнює `4`). ```js incrementer(); assert(fixedValue === 4); ``` -Ваша функція `incrementer` повертає значення, яке на одиницю більше значення `fixedValue`. +Ваша функція `incrementer` повинна повертати значення, яке більше на одиницю за `fixedValue`. ```js const __newValue = incrementer(); assert(__newValue === 5); ``` -Ваша функція `incrementer` повинна повертати значення на основі глобального змінного значення `fixedValue`. +Ваша функція `incrementer` повинна повертати значення на основі значення глобальної змінної `fixedValue`. ```js (function () { diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/combine-an-array-into-a-string-using-the-join-method.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/combine-an-array-into-a-string-using-the-join-method.md index 0bdeba26341..1b4fdd4e2b9 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/combine-an-array-into-a-string-using-the-join-method.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/combine-an-array-into-a-string-using-the-join-method.md @@ -1,6 +1,6 @@ --- id: 587d7daa367417b2b2512b6c -title: Об'єднання масиву у рядок з використанням методу Join +title: Об’єднання масиву в рядок за допомогою методу join challengeType: 1 forumTopicId: 18221 dashedName: combine-an-array-into-a-string-using-the-join-method @@ -8,9 +8,9 @@ dashedName: combine-an-array-into-a-string-using-the-join-method # --description-- -Метод `join` використовується для об'єднання елементів масиву для створення стрічки. Потрібний аргумент для розділювача, який використовується для відокремлення елементів масиву у рядку. +Метод `join` використовують, щоб об'єднати елементи масиву та створити з них рядок. Він приймає потрібний аргумент для розділювача, який використовується для відокремлення елементів масиву у рядку. -Наприклад: +Ось приклад: ```js const arr = ["Hello", "World"]; @@ -20,35 +20,35 @@ const str = arr.join(" "); `str` матиме значення рядка `Hello World`. # --instructions-- -Використовуйте метод `join` (з-поміж інших) у функції `sentensify` для створення речення зі слів у рядку `str`. Ваша функція повинна повертати рядок. Наприклад, `I-like-Star-Wars` буде перетворений в `I like Star Wars`. Для цього завдання не використовуйте метод `replace`. +Використайте метод `join` (з-поміж інших) всередині функції `sentensify`, щоб створити речення зі слів у рядку `str`. Ваша функція повинна повертати рядок. Наприклад, `I-like-Star-Wars` буде перетворено в `I like Star Wars`. Не використовуйте метод `replace` у цьому завданні. # --hints-- -Використовуйте метод `join` у вашому коді. +Ваш код повинен використовувати метод `join`. ```js assert(code.match(/\.join/g)); ``` -Не використовуйте метод `replace` у вашому коді. +Ваш код не повинен використовувати метод `replace`. ```js assert(!code.match(/\.?[\s\S]*?replace/g)); ``` -`sentensify("May-the-force-be-with-you")` повинен повертати рядок. +`sentensify("May-the-force-be-with-you")` повинна повертати рядок. ```js assert(typeof sentensify('May-the-force-be-with-you') === 'string'); ``` -`sentensify("May-the-force-be-with-you")` повинен повертати рядок `May the force be with you`. +`sentensify("May-the-force-be-with-you")` повинна повертати рядок `May the force be with you`. ```js assert(sentensify('May-the-force-be-with-you') === 'May the force be with you'); ``` -`sentensify("The.force.is.strong.with.this.one")` повинен повертати рядок `The force is strong with this one`. +`sentensify("The.force.is.strong.with.this.one")` повинна повертати рядок `The force is strong with this one`. ```js assert( @@ -57,7 +57,7 @@ assert( ); ``` -`sentensify("There,has,been,an,awakening")` повинен повертати рядок `There has been an awakening`. +`sentensify("There,has,been,an,awakening")` повинна повертати рядок `There has been an awakening`. ```js assert( diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/combine-two-arrays-using-the-concat-method.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/combine-two-arrays-using-the-concat-method.md index 4c0f2043c31..220aa50c94c 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/combine-two-arrays-using-the-concat-method.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/combine-two-arrays-using-the-concat-method.md @@ -1,6 +1,6 @@ --- id: 587d7da9367417b2b2512b66 -title: Об'єднуйте два масиви за допомогою методу concat +title: Об’єднання двох масивів за допомогою методу concat challengeType: 1 forumTopicId: 301229 dashedName: combine-two-arrays-using-the-concat-method @@ -8,17 +8,17 @@ dashedName: combine-two-arrays-using-the-concat-method # --description-- -Concatenation означає з'єднання елементів від одного кінця до іншого. JavaScript пропонує метод `concat` як для змінних рядкового типу, так і для масивів, що працюють таким же чином. Для масивів, метод викликається на один, потім інший масив надається як аргумент `concat`, який додається до кінця першого масиву. Він повертає новий масив та не змінює жодного з оригінальних масивів. Ось приклад: +Конкатенація – це склеювання елементів. JavaScript пропонує метод `concat` для рядків та масивів, який працює однаково для обох. Щодо масивів: метод викликається на масиві, потім інший масив надається як аргумент до `concat` та додається до кінця першого масиву. Він повертає новий масив та не змінює жодного з вихідних масивів. Ось приклад: ```js [1, 2, 3].concat([4, 5, 6]); ``` -Масив, що повертається, буде `[1, 2, 3, 4, 5, 6]`. +Поверненим масивом буде `[1, 2, 3, 4, 5, 6]`. # --instructions-- -Використовуйте метод `concat` в функції `nonMutatingConcat` для конкатенації `attach` до кінця `original`. Функція повинна повернути конкатенований масив. +Використайте метод `concat` у функції `nonMutatingConcat`, щоб конкатенувати `attach` до кінця `original`. Функція повинна повернути конкатенований масив. # --hints-- @@ -40,7 +40,7 @@ assert(JSON.stringify(first) === JSON.stringify([1, 2, 3])); assert(JSON.stringify(second) === JSON.stringify([4, 5])); ``` -`nonMutatingConcat([1, 2, 3], [4, 5])` повинен повертати `[1, 2, 3, 4, 5]`. +`nonMutatingConcat([1, 2, 3], [4, 5])` повинна повертати `[1, 2, 3, 4, 5]`. ```js assert( diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.md index b6e7652b82f..8dbc58467eb 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.md @@ -1,6 +1,6 @@ --- id: 587d7b8f367417b2b2512b62 -title: Карта реалізації на прототипі +title: Імплементація map на прототипі challengeType: 1 forumTopicId: 301230 dashedName: implement-map-on-a-prototype @@ -8,19 +8,19 @@ dashedName: implement-map-on-a-prototype # --description-- -Як ви бачили з використання `Array.prototype.map()`, або просто `map()` раніше, метод `map` повертає масив тієї ж довжини, що і той, на який був викликаний. Він також не змінює оригінальний масив, поки його функція зворотного виклику не змінюється. +Як ви бачили з використання `Array.prototype.map()`, або просто `map()`, метод `map` повертає масив тієї ж довжини, що і той, на якому був викликаний. Він також не змінює вихідний масив, оскільки функція зворотного виклику цього не робить. -Іншими словами, `map` - це чиста функція, і її вихід залежить виключно від вхідних даних. Крім того, в якості аргумента використовується інша функція. +Іншими словами, `map` – це чиста функція, де вихідні дані залежать від вхідних. Крім того, вона приймає іншу функцію як аргумент. -Ви можете багато дізнатись про метод `map`, якщо ви реалізуєте вашу власну версію. Рекомендується використовувати код циклу `for` або `Array.prototype.forEach()`. +Ви можете багато дізнатись про метод `map`, якщо реалізуєте власну версію. Рекомендовано використовувати цикл `for` або `Array.prototype.forEach()`. # --instructions-- -Напишіть ваш власний `Array.prototype.myMap()`, що повинен поводити себе точно так як `Array.prototype.map()`. Не варто використовувати вбудований метод `map`. Екземпляр `Array` може бути доступним за допомогою методу `myMap` з використанням `this`. +Напишіть свій `Array.prototype.myMap()`, який поводиться як `Array.prototype.map()`. Ви не повинні використовувати вбудований метод `map`. Доступ до екземпляра `Array` можна отримати у методі `myMap` за допомогою `this`. # --hints-- -`[23, 65, 98, 5, 13].myMap(item => item * 2)` should equal `[46, 130, 196, 10, 26]`. +`[23, 65, 98, 5, 13].myMap(item => item * 2)` повинна дорівнювати `[46, 130, 196, 10, 26]`. ```js const _test_s = [23, 65, 98, 5, 13]; @@ -28,7 +28,7 @@ const _callback = item => item * 2; assert(JSON.stringify(_test_s.map(_callback)) === JSON.stringify(_test_s.myMap(_callback))); ``` -`["naomi", "quincy", "camperbot"].myMap(element => element.toUpperCase())` should return `["NAOMI", "QUINCY", "CAMPERBOT"]`. +`["naomi", "quincy", "camperbot"].myMap(element => element.toUpperCase())` повинна повертати `["NAOMI", "QUINCY", "CAMPERBOT"]`. ```js const _test_s = ["naomi", "quincy", "camperbot"]; @@ -36,7 +36,7 @@ const _callback = element => element.toUpperCase(); assert(JSON.stringify(_test_s.map(_callback)) === JSON.stringify(_test_s.myMap(_callback))); ``` -`[1, 1, 2, 5, 2].myMap((element, index, array) => array[index + 1] || array[0])` should return `[1, 2, 5, 2, 1]`. +`[1, 1, 2, 5, 2].myMap((element, index, array) => array[index + 1] || array[0])` повинна повертати `[1, 2, 5, 2, 1]`. ```js const _test_s = [1, 1, 2, 5, 2]; @@ -44,7 +44,7 @@ const _callback = (element, index, array) => array[index + 1] || array[0]; assert(JSON.stringify(_test_s.map(_callback)) === JSON.stringify(_test_s.myMap(_callback))); ``` -Your code should not use the `map` method. +Ваш код не повинен використовувати метод `map`. ```js assert(!code.match(/\.?[\s\S]*?map/g)); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.md index 28daae2eefd..901b1752fee 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.md @@ -1,6 +1,6 @@ --- id: 587d7b8f367417b2b2512b64 -title: Реалізація методу фільтра для прототипу +title: Імплементація методу filter на прототипі challengeType: 1 forumTopicId: 301231 dashedName: implement-the-filter-method-on-a-prototype @@ -8,15 +8,15 @@ dashedName: implement-the-filter-method-on-a-prototype # --description-- -Ви можете багато дізнатись про метод `filter`, якщо ви реалізуєте вашу власну версію. Рекомендується використовувати код циклу `for` або `Array.prototype.forEach()`. +Ви можете багато дізнатись про метод `filter`, якщо реалізуєте власну версію. Рекомендовано використовувати цикл `for` або `Array.prototype.forEach()`. # --instructions-- -Напишіть ваш власний `Array.prototype.myFilter()`, який буде поводити себе точно так як `Array.prototype.filter()`. Не варто використовувати вбудований метод `filter`. Приклад `Array` може бути доступним за допомогою методу `myFilter` з використанням `this`. +Напишіть свій `Array.prototype.myFilter()`, який поводиться як `Array.prototype.filter()`. Ви не повинні використовувати вбудований метод `filter`. Доступ до екземпляра `Array` можна отримати у методі `myFilter` за допомогою `this`. # --hints-- -`[23, 65, 98, 5, 13].myFilter(item => item % 2)` should equal `[23, 65, 5, 13]`. +`[23, 65, 98, 5, 13].myFilter(item => item % 2)` повинна дорівнювати `[23, 65, 5, 13]`. ```js const _test_s = [23, 65, 98, 5, 13]; @@ -24,7 +24,7 @@ const _callback = item => item % 2; assert(JSON.stringify(_test_s.filter(_callback)) === JSON.stringify(_test_s.myFilter(_callback))); ``` -`["naomi", "quincy", "camperbot"].myFilter(element => element === "naomi")` should return `["naomi"]`. +`["naomi", "quincy", "camperbot"].myFilter(element => element === "naomi")` повинна повертати `["naomi"]`. ```js const _test_s = ["naomi", "quincy", "camperbot"]; @@ -32,7 +32,7 @@ const _callback = element => element === "naomi"; assert(JSON.stringify(_test_s.filter(_callback)) === JSON.stringify(_test_s.myFilter(_callback))); ``` -`[1, 1, 2, 5, 2].myFilter((element, index, array) => array.indexOf(element) === index)` should return `[1, 2, 5]`. +`[1, 1, 2, 5, 2].myFilter((element, index, array) => array.indexOf(element) === index)` повинна повертати `[1, 2, 5]`. ```js const _test_s = [1, 1, 2, 5, 2]; @@ -40,7 +40,7 @@ const _callback = (element, index, array) => array.indexOf(element) === index; assert(JSON.stringify(_test_s.filter(_callback)) === JSON.stringify(_test_s.myFilter(_callback))); ``` -Your code should not use the `filter` method. +Ваш код не повинен використовувати метод `filter`. ```js assert(!code.match(/\.?[\s\S]*?filter/g)); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/introduction-to-currying-and-partial-application.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/introduction-to-currying-and-partial-application.md index 21c588f21e0..54327d236e3 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/introduction-to-currying-and-partial-application.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/introduction-to-currying-and-partial-application.md @@ -1,6 +1,6 @@ --- id: 587d7dab367417b2b2512b70 -title: Вступ до каррування та часткового застосування функції +title: Вступ до каррінгу та часткового застосування challengeType: 1 forumTopicId: 301232 dashedName: introduction-to-currying-and-partial-application @@ -8,11 +8,11 @@ dashedName: introduction-to-currying-and-partial-application # --description-- -Арність функції – це кількість необхідних їй аргументів. Каррування функції означає перетворення функції з арністю N на функції N з арністю 1. +Арність функції – це кількість необхідних аргументів. Каррування функції означає перетворення функції з арністю N на функції N з арністю 1. Інакше кажучи, каррування реструктурує функцію так, що вона бере один аргумент, потім повертає іншу функцію, яка бере наступний аргумент, і так далі. -Наприклад: +Ось приклад: ```js function unCurried(x, y) { @@ -30,7 +30,7 @@ const curried = x => y => x + y curried(1)(2) ``` -`curried(1)(2)` перетвориться на `3`. +`curried(1)(2)` поверне `3`. Це знадобиться у вашій програмі, якщо ви не можете надати всі аргументи до функції одночасно. Ви можете зберегти кожен виклик функції в змінну, яка матиме посилання на повернуту функцію, що візьме наступний аргумент, коли він буде доступним. Ось приклад використання згаданої вище функції каррування: @@ -39,7 +39,7 @@ const funcForY = curried(1); console.log(funcForY(2)); // 3 ``` -Аналогічно часткове застосування можна описати як застосування декількох аргументів до функції одночасно і повернення іншої функції, яка застосовується до більшої кількості аргументів. Наприклад: +Аналогічно часткове застосування можна описати як застосування декількох аргументів до функції одночасно і повернення іншої функції, яка застосовується до більшої кількості аргументів. Ось приклад: ```js function impartial(x, y, z) { diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/learn-about-functional-programming.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/learn-about-functional-programming.md index 345145d9c79..b88ffe0ef5c 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/learn-about-functional-programming.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/learn-about-functional-programming.md @@ -1,6 +1,6 @@ --- id: 587d7b8d367417b2b2512b5b -title: Дізнайтеся про функціональне програмування +title: Дізнайтесь про функційне програмування challengeType: 1 forumTopicId: 301233 dashedName: learn-about-functional-programming @@ -8,21 +8,21 @@ dashedName: learn-about-functional-programming # --description-- -Функціональне програмування - це стиль програмування, в якому рішення - це прості, ізольовані функції, без будь-яких побічних ефектів, що виходять за межі області дії функції: `INPUT -> PROCESS -> OUTPUT` +Функційне програмування – це стиль програмування, у якому рішення є простими ізольованими функціями без будь-яких побічних ефектів, які виходять за межі області дії функції: `INPUT -> PROCESS -> OUTPUT` -Функціональне програмування передбачає: +Функційне програмування передбачає: -1) Ізольовані функції: без будь-якої залежності від стану програми, що містить глобальні змінні, які можуть бути змінені +1) Ізольовані функції: немає залежності від стану програми, включно з глобальними змінними, які можуть бути змінені -2) Чиста функція: один і той же вхід завжди дає однаковий вихід +2) Чисті функції: однакові вхідні дані завжди надають однакові вихідні дані 3) Функції з обмеженими побічними ефектами: будь-які зміни чи мутації стану програми за межами функції ретельно контролюються # --instructions-- -Учасники FreeCodeCamp полюблять чай. +Так сталось, що команда freeCodeCamp любить чай. -У редакторі коді `prepareTea` і `getTea` для вас вже визначено функції. Викличте функцію `getTea`, щоб отримати 40 чашок чаю для команди, і збережіть їх у змінній `tea4TeamFCC`. +Функції `prepareTea` та `getTea` вже визначені у редакторі коду. Викличте функцію `getTea`, щоб отримати 40 чашок чаю для команди, і збережіть їх у змінній `tea4TeamFCC`. # --hints-- diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/pass-arguments-to-avoid-external-dependence-in-a-function.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/pass-arguments-to-avoid-external-dependence-in-a-function.md index e0770f58c77..ff493f5392c 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/pass-arguments-to-avoid-external-dependence-in-a-function.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/pass-arguments-to-avoid-external-dependence-in-a-function.md @@ -28,19 +28,19 @@ dashedName: pass-arguments-to-avoid-external-dependence-in-a-function # --hints-- -Ваша функція `incrementer` не повинна змінювати значення `fixedValue` (яка є `4`). +Ваша функція `incrementer` не повинна змінювати значення `fixedValue` (дорівнює `4`). ```js assert(fixedValue === 4); ``` -Ваша функція `incrementer` повинна прийняти аргумент. +Ваша функція `incrementer` повинна приймати аргумент. ```js assert(incrementer.length === 1); ``` -Ваша функція `incrementer` повинна повернути значення, що на одиницю більше значення `fixedValue` value. +Ваша функція `incrementer` повинна повертати значення, яке більше на одиницю за `fixedValue`. ```js const __newValue = incrementer(fixedValue); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/refactor-global-variables-out-of-functions.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/refactor-global-variables-out-of-functions.md index f64abc18a88..b14cc9087a9 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/refactor-global-variables-out-of-functions.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/refactor-global-variables-out-of-functions.md @@ -40,7 +40,7 @@ assert( ); ``` -`add(bookList, "A Brief History of Time")` повинен повернути `["The Hound of the Baskervilles", "On The Electrodynamics of Moving Bodies", "Philosophiæ Naturalis Principia Mathematica", "Disquisitiones Arithmeticae", "A Brief History of Time"]`. +`add(bookList, "A Brief History of Time")` повинна повертати `["The Hound of the Baskervilles", "On The Electrodynamics of Moving Bodies", "Philosophiæ Naturalis Principia Mathematica", "Disquisitiones Arithmeticae", "A Brief History of Time"]`. ```js assert( @@ -55,7 +55,7 @@ assert( ); ``` -`remove(bookList, "On The Electrodynamics of Moving Bodies")` повинен повернути `["The Hound of the Baskervilles", "Philosophiæ Naturalis Principia Mathematica", "Disquisitiones Arithmeticae"]`. +`remove(bookList, "On The Electrodynamics of Moving Bodies")` повинна повертати `["The Hound of the Baskervilles", "Philosophiæ Naturalis Principia Mathematica", "Disquisitiones Arithmeticae"]`. ```js assert( diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md index db1e80f1430..0d4cba96b59 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md @@ -27,13 +27,13 @@ cities.splice(3, 1); # --hints-- -Використовуйте метод «`slice`» у своєму коді. +Ваш код повинен використовувати метод `slice`. ```js assert(code.match(/\.slice/g)); ``` -Не використовуйте метод «`splice`» у своєму коді. +Ваш код не повинен використовувати метод `splice`. ```js assert(!code.match(/\.?[\s\S]*?splice/g)); @@ -48,7 +48,7 @@ assert( ); ``` -`nonMutatingSplice(["Chicago", "Delhi", "Islamabad", "London", "Berlin"])` повинен повертатися як `["Chicago", "Delhi", "Islamabad"]`. +`nonMutatingSplice(["Chicago", "Delhi", "Islamabad", "London", "Berlin"])` повинна повертати `["Chicago", "Delhi", "Islamabad"]`. ```js assert( diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/return-a-sorted-array-without-changing-the-original-array.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/return-a-sorted-array-without-changing-the-original-array.md index 73e78373fdc..cf3e2a85c22 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/return-a-sorted-array-without-changing-the-original-array.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/return-a-sorted-array-without-changing-the-original-array.md @@ -16,13 +16,13 @@ dashedName: return-a-sorted-array-without-changing-the-original-array # --hints-- -Використовуйте метод «`sort`» у вашому коді. +Ваш код повинен використовувати метод `sort`. ```js assert(nonMutatingSort.toString().match(/\.sort/g)); ``` -Змінна `globalArray` не повинна змінитися. +Змінна `globalArray` не повинна змінюватись. ```js assert(JSON.stringify(globalArray) === JSON.stringify([5, 6, 3, 2, 9])); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/return-part-of-an-array-using-the-slice-method.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/return-part-of-an-array-using-the-slice-method.md index beb4da92598..cbf0bdaca55 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/return-part-of-an-array-using-the-slice-method.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/return-part-of-an-array-using-the-slice-method.md @@ -25,7 +25,7 @@ const newArray = arr.slice(1, 3); # --hints-- -Використовуйте метод «`slice`» у своєму коді. +Ваш код повинен використовувати метод `slice`. ```js assert(code.match(/\.slice/g)); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/sort-an-array-alphabetically-using-the-sort-method.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/sort-an-array-alphabetically-using-the-sort-method.md index 2501ace0140..616af83afce 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/sort-an-array-alphabetically-using-the-sort-method.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/sort-an-array-alphabetically-using-the-sort-method.md @@ -44,7 +44,7 @@ reverseAlpha(['l', 'h', 'z', 'b', 's']); # --hints-- -Використовуйте метод `sort` у вашому коді. +Ваш код повинен використовувати метод `sort`. ```js assert(code.match(/\.sort/g)); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/use-higher-order-functions-map-filter-or-reduce-to-solve-a-complex-problem.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/use-higher-order-functions-map-filter-or-reduce-to-solve-a-complex-problem.md index 70d82216b7e..0278afabc98 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/use-higher-order-functions-map-filter-or-reduce-to-solve-a-complex-problem.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/use-higher-order-functions-map-filter-or-reduce-to-solve-a-complex-problem.md @@ -41,13 +41,13 @@ assert( ); ``` -Функція має повертати `array`. +Функція повинна повертати `array`. ```js assert(Array.isArray(squareList([4, 5.6, -9.8, 3.14, 42, 6, 8.34, -2]))); ``` -`squareList([4, 5.6, -9.8, 3.14, 42, 6, 8.34, -2])` має повертати `[16, 1764, 36]`. +`squareList([4, 5.6, -9.8, 3.14, 42, 6, 8.34, -2])` повинна повертати `[16, 1764, 36]`. ```js assert.deepStrictEqual(squareList([4, 5.6, -9.8, 3.14, 42, 6, 8.34, -2]), [ @@ -57,7 +57,7 @@ assert.deepStrictEqual(squareList([4, 5.6, -9.8, 3.14, 42, 6, 8.34, -2]), [ ]); ``` -`squareList([-3.7, -5, 3, 10, 12.5, 7, -4.5, -17, 0.3])` має повертати `[9, 100, 49]`. +`squareList([-3.7, -5, 3, 10, 12.5, 7, -4.5, -17, 0.3])` повинна повертати `[9, 100, 49]`. ```js assert.deepStrictEqual(squareList([-3.7, -5, 3, 10, 12.5, 7, -4.5, -17, 0.3]), [ diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/use-the-every-method-to-check-that-every-element-in-an-array-meets-a-criteria.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/use-the-every-method-to-check-that-every-element-in-an-array-meets-a-criteria.md index 5001e6ff0ba..8c5f7ca3f77 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/use-the-every-method-to-check-that-every-element-in-an-array-meets-a-criteria.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/use-the-every-method-to-check-that-every-element-in-an-array-meets-a-criteria.md @@ -28,7 +28,7 @@ numbers.every(function(currentValue) { # --hints-- -Використовуйте у коді метод `every`. +Ваш код повинен використовувати метод `every`. ```js assert(code.match(/\.every/g)); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/use-the-map-method-to-extract-data-from-an-array.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/use-the-map-method-to-extract-data-from-an-array.md index d0281943bd3..410920fdcac 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/use-the-map-method-to-extract-data-from-an-array.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/use-the-map-method-to-extract-data-from-an-array.md @@ -49,7 +49,7 @@ assert( ); ``` -Ваш код не повинен використовувати цикл `for`цикл. +Ваш код не повинен використовувати цикл `for`. ```js assert(!code.match(/for\s*?\([\s\S]*?\)/)); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/use-the-some-method-to-check-that-any-elements-in-an-array-meet-a-criteria.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/use-the-some-method-to-check-that-any-elements-in-an-array-meet-a-criteria.md index d77b63a330a..bdc3129a92c 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/use-the-some-method-to-check-that-any-elements-in-an-array-meet-a-criteria.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/use-the-some-method-to-check-that-any-elements-in-an-array-meet-a-criteria.md @@ -24,29 +24,29 @@ numbers.some(function(currentValue) { # --instructions-- -Використовуйте метод `some` всередині функції `checkPositive`, щоб перевірити, чи будь-який елемент у `arr` додатній. Функція має повернути булеве значення. +Використовуйте метод `some` всередині функції `checkPositive`, щоб перевірити, чи будь-який елемент у `arr` додатній. Функція повинна повертати булеве значення. # --hints-- -Використовуйте у коді метод `some`. +Ваш код повинен використовувати метод `some`. ```js assert(code.match(/\.some/g)); ``` -`checkPositive([1, 2, 3, -4, 5])` має повернути `true`. +`checkPositive([1, 2, 3, -4, 5])` повинна повертати `true`. ```js assert(checkPositive([1, 2, 3, -4, 5])); ``` -`checkPositive([1, 2, 3, 4, 5])` має повернути `true`. +`checkPositive([1, 2, 3, 4, 5])` повинна повертати `true`. ```js assert(checkPositive([1, 2, 3, 4, 5])); ``` -`checkPositive([-1, -2, -3, -4, -5])` має повернути `false`. +`checkPositive([-1, -2, -3, -4, -5])` повинна повертати `false`. ```js assert(!checkPositive([-1, -2, -3, -4, -5])); diff --git a/curriculum/challenges/ukrainian/05-back-end-development-and-apis/back-end-development-and-apis-projects/exercise-tracker.md b/curriculum/challenges/ukrainian/05-back-end-development-and-apis/back-end-development-and-apis-projects/exercise-tracker.md index 676db01010b..c637392f5a5 100644 --- a/curriculum/challenges/ukrainian/05-back-end-development-and-apis/back-end-development-and-apis-projects/exercise-tracker.md +++ b/curriculum/challenges/ukrainian/05-back-end-development-and-apis/back-end-development-and-apis-projects/exercise-tracker.md @@ -20,7 +20,7 @@ dashedName: exercise-tracker - Потім ви побачите вікно `.replit`. - Оберіть `Use run command` та натисніть кнопку `Done`. -Після завершення переконайтеся, що демоверсія проєкту розміщена у відкритому доступі. Потім введіть URL-адресу проєкту у поле `Solution Link`. За бажанням введіть посилання на початковий код проєкту в полі `GitHub Link`. +Після завершення переконайтеся, що демоверсія проєкту розміщена у відкритому доступі. Потім введіть URL-адресу проєкту в полі «Посилання на рішення». За бажанням введіть посилання на початковий код проєкту в полі «Посилання на GitHub». # --instructions-- @@ -411,7 +411,7 @@ async(getUserInput) => { ```js async(getUserInput) => { const url = getUserInput('url'); - const res = await fetch(url + '/api/users/', { + const res = await fetch(url + '/api/users', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', @@ -458,7 +458,7 @@ async(getUserInput) => { ```js async(getUserInput) => { const url = getUserInput('url'); - const res = await fetch(url + '/api/users/', { + const res = await fetch(url + '/api/users', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', @@ -505,7 +505,7 @@ async(getUserInput) => { ```js async(getUserInput) => { const url = getUserInput('url'); - const res = await fetch(url + '/api/users/', { + const res = await fetch(url + '/api/users', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', diff --git a/curriculum/challenges/ukrainian/05-back-end-development-and-apis/back-end-development-and-apis-projects/file-metadata-microservice.md b/curriculum/challenges/ukrainian/05-back-end-development-and-apis/back-end-development-and-apis-projects/file-metadata-microservice.md index 7ba80c61edb..3f2fb7178f5 100644 --- a/curriculum/challenges/ukrainian/05-back-end-development-and-apis/back-end-development-and-apis-projects/file-metadata-microservice.md +++ b/curriculum/challenges/ukrainian/05-back-end-development-and-apis/back-end-development-and-apis-projects/file-metadata-microservice.md @@ -20,7 +20,7 @@ dashedName: file-metadata-microservice - Потім ви побачите вікно `.replit`. - Оберіть `Use run command` та натисніть кнопку `Done`. -Після завершення переконайтеся, що демоверсія проєкту розміщена у відкритому доступі. Потім введіть URL-адресу проєкту у поле `Solution Link`. За бажанням введіть посилання на початковий код проєкту в полі `GitHub Link`. +Після завершення переконайтеся, що демоверсія проєкту розміщена у відкритому доступі. Потім введіть URL-адресу проєкту в полі «Посилання на рішення». За бажанням введіть посилання на початковий код проєкту в полі «Посилання на GitHub». # --instructions-- diff --git a/curriculum/challenges/ukrainian/05-back-end-development-and-apis/back-end-development-and-apis-projects/request-header-parser-microservice.md b/curriculum/challenges/ukrainian/05-back-end-development-and-apis/back-end-development-and-apis-projects/request-header-parser-microservice.md index 27272e5237a..f1bd7ed8b18 100644 --- a/curriculum/challenges/ukrainian/05-back-end-development-and-apis/back-end-development-and-apis-projects/request-header-parser-microservice.md +++ b/curriculum/challenges/ukrainian/05-back-end-development-and-apis/back-end-development-and-apis-projects/request-header-parser-microservice.md @@ -20,7 +20,7 @@ dashedName: request-header-parser-microservice - Потім ви побачите вікно `.replit`. - Оберіть `Use run command` та натисніть кнопку `Done`. -Після завершення переконайтеся, що демоверсія проєкту розміщена у відкритому доступі. Потім введіть URL-адресу проєкту у поле `Solution Link`. За бажанням введіть посилання на початковий код проєкту в полі `GitHub Link`. +Після завершення переконайтеся, що демоверсія проєкту розміщена у відкритому доступі. Потім введіть URL-адресу проєкту в полі «Посилання на рішення». За бажанням введіть посилання на початковий код проєкту в полі «Посилання на GitHub». # --hints-- diff --git a/curriculum/challenges/ukrainian/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md b/curriculum/challenges/ukrainian/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md index c770911b8e0..2029d4f44fc 100644 --- a/curriculum/challenges/ukrainian/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md +++ b/curriculum/challenges/ukrainian/05-back-end-development-and-apis/back-end-development-and-apis-projects/timestamp-microservice.md @@ -20,7 +20,7 @@ dashedName: timestamp-microservice - Потім ви побачите вікно `.replit`. - Оберіть `Use run command` та натисніть кнопку `Done`. -Після завершення переконайтеся, що демоверсія проєкту розміщена у відкритому доступі. Потім введіть URL-адресу проєкту у поле `Solution Link`. За бажанням введіть посилання на початковий код проєкту в полі `GitHub Link`. +Після завершення переконайтеся, що демоверсія проєкту розміщена у відкритому доступі. Потім введіть URL-адресу проєкту в полі «Посилання на рішення». За бажанням введіть посилання на початковий код проєкту в полі «Посилання на GitHub». **Примітка:** конвертація часових зон не є головною метою проєкту, тому вважайте, що всі надіслані дійсні дати будуть проаналізовані за допомогою `new Date()` як дати GMT. @@ -106,7 +106,7 @@ dashedName: timestamp-microservice ); ``` -Якщо введений рядок дати недійсний, api повертає об'єкт зі структурою `{ error : "Invalid Date" }` +Якщо введений рядок дати недійсний, API повертає об'єкт зі структурою `{ error : "Invalid Date" }` ```js (getUserInput) => diff --git a/curriculum/challenges/ukrainian/05-back-end-development-and-apis/back-end-development-and-apis-projects/url-shortener-microservice.md b/curriculum/challenges/ukrainian/05-back-end-development-and-apis/back-end-development-and-apis-projects/url-shortener-microservice.md index 8671fc7bee4..b9eb498fad0 100644 --- a/curriculum/challenges/ukrainian/05-back-end-development-and-apis/back-end-development-and-apis-projects/url-shortener-microservice.md +++ b/curriculum/challenges/ukrainian/05-back-end-development-and-apis/back-end-development-and-apis-projects/url-shortener-microservice.md @@ -20,7 +20,7 @@ dashedName: url-shortener-microservice - Потім ви побачите вікно `.replit`. - Оберіть `Use run command` та натисніть кнопку `Done`. -Після завершення переконайтеся, що демоверсія проєкту розміщена у відкритому доступі. Потім введіть URL-адресу проєкту у поле `Solution Link`. За бажанням введіть посилання на початковий код проєкту в полі `GitHub Link`. +Після завершення переконайтеся, що демоверсія проєкту розміщена у відкритому доступі. Потім введіть URL-адресу проєкту в полі «Посилання на рішення». За бажанням введіть посилання на початковий код проєкту в полі «Посилання на GitHub». # --instructions-- diff --git a/curriculum/challenges/ukrainian/05-back-end-development-and-apis/basic-node-and-express/meet-the-node-console.md b/curriculum/challenges/ukrainian/05-back-end-development-and-apis/basic-node-and-express/meet-the-node-console.md index 8e80c730e5c..c896c3f49be 100644 --- a/curriculum/challenges/ukrainian/05-back-end-development-and-apis/basic-node-and-express/meet-the-node-console.md +++ b/curriculum/challenges/ukrainian/05-back-end-development-and-apis/basic-node-and-express/meet-the-node-console.md @@ -20,7 +20,7 @@ dashedName: meet-the-node-console - Потім ви побачите вікно `.replit`. - Оберіть `Use run command` та натисніть кнопку `Done`. -Після завершення переконайтеся, що демоверсія проєкту розміщена у відкритому доступі. Потім введіть URL-адресу проєкту у поле `Solution Link`. +Після завершення переконайтеся, що демоверсія проєкту розміщена у відкритому доступі. Потім введіть URL-адресу проєкту в полі «Посилання на рішення». Під час процесу розробки важливо перевіряти, що відбувається у коді. diff --git a/curriculum/challenges/ukrainian/05-back-end-development-and-apis/basic-node-and-express/serve-json-on-a-specific-route.md b/curriculum/challenges/ukrainian/05-back-end-development-and-apis/basic-node-and-express/serve-json-on-a-specific-route.md index 5e10881aa24..2791be713e3 100644 --- a/curriculum/challenges/ukrainian/05-back-end-development-and-apis/basic-node-and-express/serve-json-on-a-specific-route.md +++ b/curriculum/challenges/ukrainian/05-back-end-development-and-apis/basic-node-and-express/serve-json-on-a-specific-route.md @@ -18,7 +18,7 @@ dashedName: serve-json-on-a-specific-route # --hints-- -Кінцева точка `/json` повинна обслуговувати об'єкт json `{"message": "Hello json"}` +Кінцева точка `/json` повинна обслуговувати об'єкт JSON `{"message": "Hello json"}` ```js (getUserInput) => diff --git a/curriculum/challenges/ukrainian/05-back-end-development-and-apis/managing-packages-with-npm/how-to-use-package.json-the-core-of-any-node.js-project-or-npm-package.md b/curriculum/challenges/ukrainian/05-back-end-development-and-apis/managing-packages-with-npm/how-to-use-package.json-the-core-of-any-node.js-project-or-npm-package.md index 3322659af35..e79a05806f7 100644 --- a/curriculum/challenges/ukrainian/05-back-end-development-and-apis/managing-packages-with-npm/how-to-use-package.json-the-core-of-any-node.js-project-or-npm-package.md +++ b/curriculum/challenges/ukrainian/05-back-end-development-and-apis/managing-packages-with-npm/how-to-use-package.json-the-core-of-any-node.js-project-or-npm-package.md @@ -20,7 +20,7 @@ dashedName: how-to-use-package-json-the-core-of-any-node-js-project-or-npm-packa - Потім ви побачите вікно `.replit`. - Оберіть `Use run command` та натисніть кнопку `Done`. -Після завершення переконайтеся, що демоверсія проєкту розміщена у відкритому доступі. Потім введіть URL-адресу проєкту у поле `Solution Link`. +Після завершення переконайтеся, що демоверсія проєкту розміщена у відкритому доступі. Потім введіть URL-адресу проєкту в полі «Посилання на рішення». Файл `package.json` є центром будь-якого проєкту Node.js або пакету npm. У ньому зберігається інформація про ваш проєкт, схоже до того, як розділ <head> HTML-документу описує вміст вебсторінки. Він складається з одного об'єкту JSON, де зберігається інформація у парах ключ-значення. Існує лише два обов'язкові поля: «name» та «version», але краще надавати додаткову інформацію про свій проєкт, яка може бути корисною для майбутніх користувачів або спеціалістів. diff --git a/curriculum/challenges/ukrainian/05-back-end-development-and-apis/mongodb-and-mongoose/install-and-set-up-mongoose.md b/curriculum/challenges/ukrainian/05-back-end-development-and-apis/mongodb-and-mongoose/install-and-set-up-mongoose.md index d122ba2ad20..ca4ca6f5b84 100644 --- a/curriculum/challenges/ukrainian/05-back-end-development-and-apis/mongodb-and-mongoose/install-and-set-up-mongoose.md +++ b/curriculum/challenges/ukrainian/05-back-end-development-and-apis/mongodb-and-mongoose/install-and-set-up-mongoose.md @@ -20,7 +20,7 @@ dashedName: install-and-set-up-mongoose - Потім ви побачите вікно `.replit`. - Оберіть `Use run command` та натисніть кнопку `Done`. -Після завершення переконайтеся, що демоверсія проєкту розміщена у відкритому доступі. Потім введіть URL-адресу проєкту у поле `Solution Link`. +Після завершення переконайтеся, що демоверсія проєкту розміщена у відкритому доступі. Потім введіть URL-адресу проєкту в полі «Посилання на рішення». У цьому завданні створіть базу даних MongoDB Atlas та імпортуйте необхідні пакети для підключення до неї. diff --git a/curriculum/challenges/ukrainian/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md b/curriculum/challenges/ukrainian/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md index 0584cf44de5..c7875b83a51 100644 --- a/curriculum/challenges/ukrainian/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md +++ b/curriculum/challenges/ukrainian/06-quality-assurance/advanced-node-and-express/set-up-a-template-engine.md @@ -20,7 +20,7 @@ dashedName: set-up-a-template-engine - Потім ви побачите вікно `.replit`. - Оберіть `Use run command` та натисніть кнопку `Done`. -Після завершення переконайтеся, що демоверсія проєкту розміщена у відкритому доступі. Потім введіть URL-адресу проєкту у поле `Solution Link`. +Після завершення переконайтеся, що демоверсія проєкту розміщена у відкритому доступі. Потім введіть URL-адресу проєкту в полі «Посилання на рішення». Шаблонізатор дозволяє використовувати статистичні шаблони (наприклад ті, що написані в *Pug*) у вашому додатку. Під час виконання коду шаблонізатор замінює змінні у шаблоні на фактичні значення, які може надати сервер. Потім шаблон перетворюється на статистичний файл HTML, який надсилається клієнту. Цей підхід спрощує дизайн сторінки HTML та дозволяє відображати змінні на сторінці без потреби викликати API з клієнта. diff --git a/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-and-testing-with-chai/learn-how-javascript-assertions-work.md b/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-and-testing-with-chai/learn-how-javascript-assertions-work.md index 3bf92f78588..82ae80ed8e3 100644 --- a/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-and-testing-with-chai/learn-how-javascript-assertions-work.md +++ b/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-and-testing-with-chai/learn-how-javascript-assertions-work.md @@ -20,7 +20,7 @@ dashedName: learn-how-javascript-assertions-work - Потім ви побачите вікно `.replit`. - Оберіть `Use run command` та натисніть кнопку `Done`. -Після завершення переконайтеся, що демоверсія проєкту розміщена у відкритому доступі. Потім введіть URL-адресу проєкту у поле `Solution Link`. +Після завершення переконайтеся, що демоверсія проєкту розміщена у відкритому доступі. Потім введіть URL-адресу проєкту в полі «Посилання на рішення». # --instructions-- diff --git a/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-projects/american-british-translator.md b/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-projects/american-british-translator.md index eabfec77dc8..9e51b56840f 100644 --- a/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-projects/american-british-translator.md +++ b/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-projects/american-british-translator.md @@ -20,7 +20,7 @@ dashedName: american-british-translator - Потім ви побачите вікно `.replit`. - Оберіть `Use run command` та натисніть кнопку `Done`. -Після завершення переконайтеся, що демоверсія проєкту розміщена у відкритому доступі. Потім введіть URL-адресу проєкту у поле `Solution Link`. За бажанням введіть посилання на початковий код проєкту в полі `GitHub Link`. +Після завершення переконайтеся, що демоверсія проєкту розміщена у відкритому доступі. Потім введіть URL-адресу проєкту в полі «Посилання на рішення». За бажанням введіть посилання на початковий код проєкту в полі «Посилання на GitHub». # --instructions-- diff --git a/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-projects/issue-tracker.md b/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-projects/issue-tracker.md index a9196ba0d0c..6c8ef250d69 100644 --- a/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-projects/issue-tracker.md +++ b/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-projects/issue-tracker.md @@ -20,7 +20,7 @@ dashedName: issue-tracker - Потім ви побачите вікно `.replit`. - Оберіть `Use run command` та натисніть кнопку `Done`. -Після завершення переконайтеся, що демоверсія проєкту розміщена у відкритому доступі. Потім введіть URL-адресу проєкту у поле `Solution Link`. За бажанням введіть посилання на початковий код проєкту в полі `GitHub Link`. +Після завершення переконайтеся, що демоверсія проєкту розміщена у відкритому доступі. Потім введіть URL-адресу проєкту в полі «Посилання на рішення». За бажанням введіть посилання на початковий код проєкту в полі «Посилання на GitHub». # --instructions-- diff --git a/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md b/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md index 8f21e289cc2..c111e54a40a 100644 --- a/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md +++ b/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md @@ -20,7 +20,7 @@ dashedName: metric-imperial-converter - Потім ви побачите вікно `.replit`. - Оберіть `Use run command` та натисніть кнопку `Done`. -Після завершення переконайтеся, що демоверсія проєкту розміщена у відкритому доступі. Потім введіть URL-адресу проєкту у поле `Solution Link`. За бажанням введіть посилання на початковий код проєкту в полі `GitHub Link`. +Після завершення переконайтеся, що демоверсія проєкту розміщена у відкритому доступі. Потім введіть URL-адресу проєкту в полі «Посилання на рішення». За бажанням введіть посилання на початковий код проєкту в полі «Посилання на GitHub». # --instructions-- diff --git a/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-projects/personal-library.md b/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-projects/personal-library.md index a6c5af723b6..49fe5b2d760 100644 --- a/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-projects/personal-library.md +++ b/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-projects/personal-library.md @@ -20,7 +20,7 @@ dashedName: personal-library - Потім ви побачите вікно `.replit`. - Оберіть `Use run command` та натисніть кнопку `Done`. -Після завершення переконайтеся, що демоверсія проєкту розміщена у відкритому доступі. Потім введіть URL-адресу проєкту у поле `Solution Link`. За бажанням введіть посилання на початковий код проєкту в полі `GitHub Link`. +Після завершення переконайтеся, що демоверсія проєкту розміщена у відкритому доступі. Потім введіть URL-адресу проєкту в полі «Посилання на рішення». За бажанням введіть посилання на початковий код проєкту в полі «Посилання на GitHub». # --instructions-- diff --git a/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-projects/sudoku-solver.md b/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-projects/sudoku-solver.md index e4926c663f3..ad3efdcfcee 100644 --- a/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-projects/sudoku-solver.md +++ b/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-projects/sudoku-solver.md @@ -20,7 +20,7 @@ dashedName: sudoku-solver - Потім ви побачите вікно `.replit`. - Оберіть `Use run command` та натисніть кнопку `Done`. -Після завершення переконайтеся, що демоверсія проєкту розміщена у відкритому доступі. Потім введіть URL-адресу проєкту у поле `Solution Link`. За бажанням введіть посилання на початковий код проєкту в полі `GitHub Link`. +Після завершення переконайтеся, що демоверсія проєкту розміщена у відкритому доступі. Потім введіть URL-адресу проєкту в полі «Посилання на рішення». За бажанням введіть посилання на початковий код проєкту в полі «Посилання на GitHub». # --instructions-- diff --git a/curriculum/challenges/ukrainian/09-information-security/information-security-projects/anonymous-message-board.md b/curriculum/challenges/ukrainian/09-information-security/information-security-projects/anonymous-message-board.md index 777354f1661..8423dffb947 100644 --- a/curriculum/challenges/ukrainian/09-information-security/information-security-projects/anonymous-message-board.md +++ b/curriculum/challenges/ukrainian/09-information-security/information-security-projects/anonymous-message-board.md @@ -22,7 +22,7 @@ dashedName: anonymous-message-board - Потім ви побачите вікно `.replit`. - Оберіть `Use run command` та натисніть кнопку `Done`. -Після завершення переконайтеся, що демоверсія проєкту розміщена у відкритому доступі. Потім введіть URL-адресу проєкту у поле `Solution Link`. За бажанням введіть посилання на початковий код проєкту в полі `GitHub Link`. +Після завершення переконайтеся, що демоверсія проєкту розміщена у відкритому доступі. Потім введіть URL-адресу проєкту в полі «Посилання на рішення». За бажанням введіть посилання на початковий код проєкту в полі «Посилання на GitHub». # --instructions-- diff --git a/curriculum/challenges/ukrainian/09-information-security/information-security-projects/secure-real-time-multiplayer-game.md b/curriculum/challenges/ukrainian/09-information-security/information-security-projects/secure-real-time-multiplayer-game.md index 0ce4a060de4..e780cf9de68 100644 --- a/curriculum/challenges/ukrainian/09-information-security/information-security-projects/secure-real-time-multiplayer-game.md +++ b/curriculum/challenges/ukrainian/09-information-security/information-security-projects/secure-real-time-multiplayer-game.md @@ -20,7 +20,7 @@ dashedName: secure-real-time-multiplayer-game - Потім ви побачите вікно `.replit`. - Оберіть `Use run command` та натисніть кнопку `Done`. -Після завершення переконайтеся, що демоверсія проєкту розміщена у відкритому доступі. Потім введіть URL-адресу проєкту у поле `Solution Link`. За бажанням введіть посилання на початковий код проєкту в полі `GitHub Link`. +Після завершення переконайтеся, що демоверсія проєкту розміщена у відкритому доступі. Потім введіть URL-адресу проєкту в полі «Посилання на рішення». За бажанням введіть посилання на початковий код проєкту в полі «Посилання на GitHub». # --instructions-- diff --git a/curriculum/challenges/ukrainian/09-information-security/information-security-projects/stock-price-checker.md b/curriculum/challenges/ukrainian/09-information-security/information-security-projects/stock-price-checker.md index 5f63d378b12..d37b4d6af46 100644 --- a/curriculum/challenges/ukrainian/09-information-security/information-security-projects/stock-price-checker.md +++ b/curriculum/challenges/ukrainian/09-information-security/information-security-projects/stock-price-checker.md @@ -24,7 +24,7 @@ dashedName: stock-price-checker - Потім ви побачите вікно `.replit`. - Оберіть `Use run command` та натисніть кнопку `Done`. -Після завершення переконайтеся, що демоверсія проєкту розміщена у відкритому доступі. Потім введіть URL-адресу проєкту у поле `Solution Link`. За бажанням введіть посилання на початковий код проєкту в полі `GitHub Link`. +Після завершення переконайтеся, що демоверсія проєкту розміщена у відкритому доступі. Потім введіть URL-адресу проєкту в полі «Посилання на рішення». За бажанням введіть посилання на початковий код проєкту в полі «Посилання на GitHub». # --instructions-- diff --git a/curriculum/challenges/ukrainian/09-information-security/information-security-with-helmetjs/install-and-require-helmet.md b/curriculum/challenges/ukrainian/09-information-security/information-security-with-helmetjs/install-and-require-helmet.md index 2427db45a6e..4685f2a5d34 100644 --- a/curriculum/challenges/ukrainian/09-information-security/information-security-with-helmetjs/install-and-require-helmet.md +++ b/curriculum/challenges/ukrainian/09-information-security/information-security-with-helmetjs/install-and-require-helmet.md @@ -20,7 +20,7 @@ dashedName: install-and-require-helmet - Потім ви побачите вікно `.replit`. - Оберіть `Use run command` та натисніть кнопку `Done`. -Після завершення переконайтеся, що демоверсія проєкту розміщена у відкритому доступі. Потім введіть URL-адресу проєкту у поле `Solution Link`. +Після завершення переконайтеся, що демоверсія проєкту розміщена у відкритому доступі. Потім введіть URL-адресу проєкту в полі «Посилання на рішення». Helmet дозволяє захистити додатки Express, встановлюючи різноманітні заголовки HTTP. diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/algorithms/implement-binary-search.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/algorithms/implement-binary-search.md index 66080225901..d54e939ca81 100644 --- a/curriculum/challenges/ukrainian/10-coding-interview-prep/algorithms/implement-binary-search.md +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/algorithms/implement-binary-search.md @@ -10,9 +10,10 @@ dashedName: implement-binary-search Binary search is an **O(log(n))** efficiency algorithm for searching a sorted array to find an element. It operates using the following steps: -1. Find the middle `value` of a sorted array. If `value == target` return (found it!). +1. Find the middle `value` of a sorted array. If `value == target` return `true` (The value has been found and the search is complete). 1. If middle `value < target`, search right half of array in next compare. 1. If middle `value > target`, search left half of array in next compare. +1. If after searching the whole array the value is not present, return `false` (The array has been searched and the value is not in the array). As you can see, you are successively halving an array, which gives you the log(n) efficiency. For this challenge, we want you to show your work - how you got to the target value... the path you took! @@ -20,7 +21,7 @@ As you can see, you are successively halving an array, which gives you the log(n Write a function `binarySearch` that implements the binary search algorithm on an array, returning the path you took (each middle value comparison) to find the target in an array. -The function takes a sorted array of integers and a target value as input. It returns an array containing (in-order) the middle value you found at each halving of the original array until you found the target value. The target value should be the last element of the returned array. If value not is found, return the string `Value Not Found`. +The function takes a sorted array of integers and a target value as input. It returns an array containing (in-order) the middle value you found at each halving of the original array until you found the target value. The target value should be the last element of the returned array. If the value is not found, return the string `Value Not Found`. For example, `binarySearch([1,2,3,4,5,6,7], 5)` would return `[4,6,5]`. diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-a-nightlife-coordination-app.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-a-nightlife-coordination-app.md index b5dd01b33c6..a228f8ad56a 100644 --- a/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-a-nightlife-coordination-app.md +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-a-nightlife-coordination-app.md @@ -22,7 +22,7 @@ dashedName: build-a-nightlife-coordination-app **Hint:** Try using the Yelp API to find venues in the cities your users search for. Якщо ви використовуєте Yelp API, не забудьте вказати це у вашому додатку. -Після завершення переконайтеся, що демоверсія проєкту розміщена у відкритому доступі. Потім введіть URL-адресу проєкту у поле `Solution Link`. За бажанням введіть посилання на початковий код проєкту в полі `GitHub Link`. +Після завершення переконайтеся, що демоверсія проєкту розміщена у відкритому доступі. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --solutions-- diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-a-voting-app.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-a-voting-app.md index 35819b54fad..1023d4b4080 100644 --- a/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-a-voting-app.md +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-a-voting-app.md @@ -28,7 +28,7 @@ dashedName: build-a-voting-app **Історія користувача: **Як авторизований користувач, ви можете створити нову опцію в опитуванні, якщо вам не подобаються наявні. -Після завершення переконайтеся, що демоверсія проєкту розміщена у відкритому доступі. Потім введіть URL-адресу проєкту у поле `Solution Link`. За бажанням введіть посилання на початковий код проєкту в полі `GitHub Link`. +Після завершення переконайтеся, що демоверсія проєкту розміщена у відкритому доступі. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --solutions-- diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-an-image-search-abstraction-layer.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-an-image-search-abstraction-layer.md index 5e33a4f4127..f893f91520c 100644 --- a/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-an-image-search-abstraction-layer.md +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/build-an-image-search-abstraction-layer.md @@ -18,7 +18,7 @@ Build a full stack JavaScript app that allows you to search for images like this **Історія користувача:** Ви можете отримати список останніх пошукових рядків. -Після завершення переконайтеся, що демоверсія проєкту розміщена у відкритому доступі. Потім введіть URL-адресу проєкту у поле `Solution Link`. За бажанням введіть посилання на початковий код проєкту в полі `GitHub Link`. +Після завершення переконайтеся, що демоверсія проєкту розміщена у відкритому доступі. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --solutions-- diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/chart-the-stock-market.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/chart-the-stock-market.md index b011d89c2ba..77a8617a290 100644 --- a/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/chart-the-stock-market.md +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/take-home-projects/chart-the-stock-market.md @@ -20,7 +20,7 @@ dashedName: chart-the-stock-market **Історія користувача:** Ви можете бачити зміни в режимі реального часу, коли будь-який інший користувач додає або видаляє акції. Для цього вам потрібно буде використовувати Web Sockets. -Після завершення переконайтеся, що демоверсія проєкту розміщена у відкритому доступі. Потім введіть URL-адресу проєкту у поле `Solution Link`. За бажанням введіть посилання на початковий код проєкту в полі `GitHub Link`. +Після завершення переконайтеся, що демоверсія проєкту розміщена у відкритому доступі. Then submit the URL to it in the Solution Link field. Optionally, also submit a link to your project's source code in the GitHub Link field. # --solutions-- diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/elements-and-tags-question-a.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/elements-and-tags-question-a.md new file mode 100644 index 00000000000..f4b05b12871 --- /dev/null +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/elements-and-tags-question-a.md @@ -0,0 +1,54 @@ +--- +id: 637f4e0e72c65bc8e73dfe1e +videoId: LGQuIIv2RVA +title: Elements and Tags Question A +challengeType: 15 +dashedName: elements-and-tags-question-a +--- + +# --description-- + +Almost all elements on an HTML page are just pieces of content wrapped in opening and closing HTML tags. + +Opening tags tell the browser this is the start of an HTML element. They are comprised of a keyword enclosed in angle brackets `<>`. For example, an opening paragraph tag looks like this: `

                                                                                                                                                                                                                                                                                                    `. + +Closing tags tell the browser where an element ends. They are almost the same as opening tags; the only difference is that they have a forward slash before the keyword. For example, a closing paragraph tag looks like this: `

                                                                                                                                                                                                                                                                                                    `. + +A full paragraph element looks like this: + +element diagram + +You can think of elements as containers for content. The opening and closing tags tell the browser what content the element contains. The browser can then use that information to determine how it should interpret and format the content. + +There are some HTML elements that do not have a closing tag. These elements often look like this: `
                                                                                                                                                                                                                                                                                                    ` or ``, but some can also be used without the closing forward slash such as `
                                                                                                                                                                                                                                                                                                    ` or ``. These are known as self-closing tags or empty elements because they don’t wrap any content. You will encounter a few of these in later lessons, but for the most part, elements will have both opening and closing tags. + +HTML has a vast list of predefined tags that you can use to create all kinds of different elements. It is important to use the correct tags for content. Using the correct tags can have a big impact on two aspects of your sites: how they are ranked in search engines; and how accessible they are to users who rely on assistive technologies, like screen readers, to use the internet. + +Using the correct elements for content is called semantic HTML. You will explore this in much more depth later on in the curriculum. + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s [Introduction to HTML video](https://www.youtube.com/watch?v=LGQuIIv2RVA&list=PL4-IK0AVhVjM0xE0K2uZRvsM7LkIhsPT-) + +## --text-- + +What are HTML tags? + +## --answers-- + +HTML tags tell the browser what content an element contains. + +--- + +HTML tags tell the browser when to load its content. + +--- + +HTML tags tell the browser what content the next element contains. + + +## --video-solution-- + +1 diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/elements-and-tags-question-b.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/elements-and-tags-question-b.md new file mode 100644 index 00000000000..9e8720616fb --- /dev/null +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/elements-and-tags-question-b.md @@ -0,0 +1,50 @@ +--- +id: 637f4e1672c65bc8e73dfe1f +videoId: LGQuIIv2RVA +title: Elements and Tags Question B +challengeType: 15 +dashedName: elements-and-tags-question-b +--- + +# --description-- + +Almost all elements on an HTML page are just pieces of content wrapped in opening and closing HTML tags. + +Opening tags tell the browser this is the start of an HTML element. They are comprised of a keyword enclosed in angle brackets <>. For example, an opening paragraph tag looks like this: `

                                                                                                                                                                                                                                                                                                    `. + +Closing tags tell the browser where an element ends. They are almost the same as opening tags; the only difference is that they have a forward slash before the keyword. For example, a closing paragraph tag looks like this: `

                                                                                                                                                                                                                                                                                                    `. + +A full paragraph element looks like this: + +element diagram + +You can think of elements as containers for content. The opening and closing tags tell the browser what content the element contains. The browser can then use that information to determine how it should interpret and format the content. + +There are some HTML elements that do not have a closing tag. These elements often look like this: `
                                                                                                                                                                                                                                                                                                    ` or ``, but some can also be used without the closing forward slash such as `
                                                                                                                                                                                                                                                                                                    ` or ``. These are known as self-closing tags or empty elements because they don’t wrap any content. You will encounter a few of these in later lessons, but for the most part, elements will have both opening and closing tags. + +HTML has a vast list of predefined tags that you can use to create all kinds of different elements. It is important to use the correct tags for content. Using the correct tags can have a big impact on two aspects of your sites: how they are ranked in search engines; and how accessible they are to users who rely on assistive technologies, like screen readers, to use the internet. + +Using the correct elements for content is called semantic HTML. You will explore this in much more depth later on in the curriculum. + +# --question-- + +## --text-- + +What are the three parts of most HTML elements? + +## --answers-- + +An opening tag, self closing tag, and content. + +--- + +An opening tag, closing tag, and content. + +--- + +An opening tag, closing tag, and attribute. + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/html-boilerplate-question-a.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/html-boilerplate-question-a.md new file mode 100644 index 00000000000..d563ebf0ac3 --- /dev/null +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/html-boilerplate-question-a.md @@ -0,0 +1,55 @@ +--- +id: 637f4e1c72c65bc8e73dfe20 +videoId: V8UAEoOvqFg +title: HTML Boilerplate Question A +challengeType: 15 +dashedName: html-boilerplate-question-a +--- + +# --description-- + +To demonstrate an HTML boilerplate, you first need an HTML file to work with. + +Create a new folder on your computer and name it `html-boilerplate`. Within that folder create a new file and name it `index.html`. + +You’re probably already familiar with a lot of different types of files, for example doc, pdf, and image files. + +To let the computer know you want to create an HTML file, you need to append the filename with the `.html` extension as you have done when creating the `index.html` file. + +It is worth noting that you named your HTML file index. You should always name the HTML file that will contain the homepage of your websites `index.html`. This is because web servers will by default look for an index.html page when users land on your websites - and not having one will cause big problems. + +## The DOCTYPE + +Every HTML page starts with a doctype declaration. The doctype’s purpose is to tell the browser what version of HTML it should use to render the document. The latest version of HTML is HTML5, and the doctype for that version is simply ``. + +The doctypes for older versions of HTML were a bit more complicated. For example, this is the doctype declaration for HTML4: + +```html + +``` + +However, you probably won’t ever want to be using an older version of HTML, and so you’ll always use ``. + +Open the `index.html` file created earlier in your text editor and add `` to the very first line. + +# --question-- +## --text-- + +What is the purpose of the `DOCTYPE` declaration? + +## --answers-- + +It tells the browser which version of HTML to use to render the document. + +--- + +It tells the browser that this document uses JavaScript. + +--- + +It tells the browser the title of the document. + + +## --video-solution-- + +1 diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/html-boilerplate-question-b.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/html-boilerplate-question-b.md new file mode 100644 index 00000000000..7a528432239 --- /dev/null +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/html-boilerplate-question-b.md @@ -0,0 +1,47 @@ +--- +id: 637f4e2872c65bc8e73dfe21 +videoId: V8UAEoOvqFg +title: HTML Boilerplate Question B +challengeType: 15 +dashedName: html-boilerplate-question-b +--- + +# --description-- + +After you declare the doctype, you need to provide an `` element. This is what’s known as the root element of the document, meaning that every other element in the document will be a descendant of it. + +This becomes more important later on when you learn about manipulating HTML with JavaScript. For now, just know that the `html` element should be included on every HTML document. + +Back in the `index.html` file, let’s add the `` element by typing out its opening and closing tags, like so: + +```html + + + +``` + +## What is the lang attribute? +`lang` specifies the language of the text content in that element. This attribute is primarily used for improving accessibility of the webpage. It allows assistive technologies, for example screen readers, to adapt according to the language and invoke correct pronunciation. + +# --question-- + +## --text-- + +What is the `html` element? + +## --answers-- + +It is the root element in the document and tells the browser which version of HTML it should use. + +--- + +It is the root element in the document and all other elements should descend from it. + +--- + +It is the root element in the document and all other elements should come after it. + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/html-boilerplate-question-c.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/html-boilerplate-question-c.md new file mode 100644 index 00000000000..76ceb2841e5 --- /dev/null +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/html-boilerplate-question-c.md @@ -0,0 +1,66 @@ +--- +id: 637f4e2f72c65bc8e73dfe22 +videoId: LGQuIIv2RVA +title: HTML Boilerplate Question C +challengeType: 15 +dashedName: html-boilerplate-question-c +--- + +# --description-- + +The `` element is where you put important meta-information about your webpages, and stuff required for your webpages to render correctly in the browser. Inside the ``, you should not use any element that displays content on the webpage. + +## The Charset Meta Element +You should always have the `meta` tag for the charset encoding of the webpage in the head element: ``. + +Setting the encoding is very important because it ensures that the webpage will display special symbols and characters from different languages correctly in the browser. + +## Title Element +Another element you should always include in the head of an HTML document is the `title` element: + +```html +My First Webpage +``` + +The `title` element is used to give webpages a human-readable title which is displayed in your webpage’s browser tab. + +If you didn’t include a `title` element, the webpage’s title would default to its file name. In your case that would be `index.html`, which isn’t very meaningful for users; this would make it very difficult to find your webpage if the user has many browser tabs open. + +There are many more elements that can go within the `head` of an HTML document. However, for now it’s only crucial to know about the two elements you have covered here. You will introduce more elements that go into the `head` throughout the rest of the curriculum. + +Back in `index.html` file, let’s add a `head` element with a `charset` `meta` element and a `title` within it. The head element goes within the HTML element and should always be the first element under the opening `` tag: + + +```html + + + + + + My First Webpage + + +``` + +# --question-- + +## --text-- + +What is the purpose of the `head` element? + +## --answers-- + +The `head` element is used to display all elements that are displayed on the webpage. + +--- + +The `head` element is used to display important information about your webpage and is used to render web pages correctly with `meta` elements. + +--- + +The `head` element is used to display the header content on top of the webpage. + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/html-boilerplate-question-d.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/html-boilerplate-question-d.md new file mode 100644 index 00000000000..302b6a95d44 --- /dev/null +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/html-boilerplate-question-d.md @@ -0,0 +1,48 @@ +--- +id: 637f4e3672c65bc8e73dfe23 +videoId: V8UAEoOvqFg +title: HTML Boilerplate Question D +challengeType: 15 +dashedName: html-boilerplate-question-d +--- + +# --description-- + +The final element needed to complete the HTML boilerplate is the `` element. This is where all the content that will be displayed to users will go - the text, images, lists, links, and so on. + +To complete the boilerplate, add a `body` element to the `index.html` file. The `body` element also goes within the `html` element and is always below the `head` element, like so: + +# --question-- + +## --assignment-- + +Watch and follow along to Kevin Powell’s brilliant Building your first web page video above. + +--- + +Build some muscle memory by deleting the contents of the `index.html` file and trying to write out all the boilerplate again from memory. Don’t worry if you have to peek at the lesson content the first few times if you get stuck. Just keep going until you can do it a couple of times from memory. + +--- + +Run your boilerplate through this [HTML validator](https://www.freeformatter.com/html-validator.html). Validators ensure your markup is correct and are an excellent learning tool, as they provide feedback on syntax errors you may be making often and aren’t aware of, such as missing closing tags and extra spaces in your HTML. + +## --text-- + +What is the purpose of the `body` element? + +## --answers-- + +This is where all important information about the webpage is displayed such as the `title` and `meta` tags. + +--- + +This is where you tell the browser how to render the webpage correctly. + +--- + +This is where all content will be displayed on the page such images, text, and links. + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-a.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-a.md new file mode 100644 index 00000000000..aa20f137e89 --- /dev/null +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-a.md @@ -0,0 +1,42 @@ +--- +id: 6374f208de18c50e48ba767b +videoId: LGQuIIv2RVA +title: Introduction To HTML and CSS Question A +challengeType: 15 +dashedName: introduction-to-html-and-css-question-a +--- + +# --description-- + +HTML and CSS are two languages that work together to create everything that you see when you look at something on the internet. HTML is the raw data that a webpage is built out of. All the text, links, cards, lists, and buttons are created in HTML. CSS is what adds style to those plain elements. HTML puts information on a webpage, and CSS positions that information, gives it color, changes the font, and makes it look great! + +Many helpful resources out there keep referring to HTML and CSS as programming languages, but if you want to get technical, labeling them as such is not quite accurate. This is because they are only concerned with presenting information. They are not used to program logic. JavaScript, which you will learn in the next section, is a programming language because it’s used to make webpages do things. Yet, there is quite a lot you can do with just HTML and CSS, and you will definitely need them both. Throughout our curriculum, the following lessons focus on giving you the tools you need to succeed once you reach JavaScript content. + +# --question-- + +## --assignment-- + +Read the HTML vs CSS vs JavaScript article. It is a quick overview of the relationships between HTML, CSS, and JavaScript. + +## --text-- + +Which of the following statements is true? + +## --answers-- + +CSS is used to create the basic structure of a webpage, and HTML is used to add style. + +--- + +HTML is used to create the basic structure of a webpage, and CSS is used to add style. + +--- + +HTML and CSS are used to add style to a webpage, and JavaScript is used to create the basic structure. + + +## --video-solution-- + +2 + + diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-b.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-b.md new file mode 100644 index 00000000000..cd9cf900330 --- /dev/null +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-b.md @@ -0,0 +1,37 @@ +--- +id: 6376327e2724a688c04636e3 +videoId: LGQuIIv2RVA +title: Introduction To HTML and CSS Question B +challengeType: 15 +dashedName: introduction-to-html-and-css-question-b +--- + +# --description-- + + +HTML and CSS are two languages that work together to create everything that you see when you look at something on the internet. HTML is the raw data that a webpage is built out of. All the text, links, cards, lists, and buttons are created in HTML. CSS is what adds style to those plain elements. HTML puts information on a webpage, and CSS positions that information, gives it color, changes the font, and makes it look great! + +Many helpful resources out there keep referring to HTML and CSS as programming languages, but if you want to get technical, labeling them as such is not quite accurate. This is because they are only concerned with presenting information. They are not used to program logic. JavaScript, which you will learn in the next section, is a programming language because it’s used to make webpages do things. Yet, there is quite a lot you can do with just HTML and CSS, and you will definitely need them both. Throughout our curriculum, the following lessons focus on giving you the tools you need to succeed once you reach JavaScript content. + +# --question-- + +## --text-- + +Between HTML and CSS, which should you use to add paragraphs of text on a webpage? + +## --answers-- + +CSS + +--- + +JavaScript + +--- + +HTML + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-c.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-c.md new file mode 100644 index 00000000000..eb759394680 --- /dev/null +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-c.md @@ -0,0 +1,34 @@ +--- +id: 637633162724a688c04636e4 +videoId: LGQuIIv2RVA +title: Introduction To HTML and CSS Question C +challengeType: 15 +dashedName: introduction-to-html-and-css-question-c +--- + +# --description-- + +HTML and CSS are two languages that work together to create everything that you see when you look at something on the internet. HTML is the raw data that a webpage is built out of. All the text, links, cards, lists, and buttons are created in HTML. CSS is what adds style to those plain elements. HTML puts information on a webpage, and CSS positions that information, gives it color, changes the font, and makes it look great! + +Many helpful resources out there keep referring to HTML and CSS as programming languages, but if you want to get technical, labeling them as such is not quite accurate. This is because they are only concerned with presenting information. They are not used to program logic. JavaScript, which you will learn in the next section, is a programming language because it’s used to make webpages do things. Yet, there is quite a lot you can do with just HTML and CSS, and you will definitely need them both. Throughout our curriculum, the following lessons focus on giving you the tools you need to succeed once you reach JavaScript content. +# --question-- + +## --text-- + +Between HTML and CSS, which should you use to change the font and background color of a button? + +## --answers-- + +You should use CSS to change the background color and font of a button. + +--- + +You should use JavaScript to change the background color and font of a button. + +--- + +You should use HTML to change the background color and font of a button. + +## --video-solution-- + +1 diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-d.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-d.md new file mode 100644 index 00000000000..9e9ee049b75 --- /dev/null +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/introduction-to-html-css-question-d.md @@ -0,0 +1,35 @@ +--- +id: 637633672724a688c04636e5 +videoId: LGQuIIv2RVA +title: Introduction To HTML and CSS Question D +challengeType: 15 +dashedName: introduction-to-html-and-css-question-d +--- + +# --description-- + +HTML and CSS are two languages that work together to create everything that you see when you look at something on the internet. HTML is the raw data that a webpage is built out of. All the text, links, cards, lists, and buttons are created in HTML. CSS is what adds style to those plain elements. HTML puts information on a webpage, and CSS positions that information, gives it color, changes the font, and makes it look great! + +Many helpful resources out there keep referring to HTML and CSS as programming languages, but if you want to get technical, labeling them as such is not quite accurate. This is because they are only concerned with presenting information. They are not used to program logic. JavaScript, which you will learn in the next section, is a programming language because it’s used to make webpages do things. Yet, there is quite a lot you can do with just HTML and CSS, and you will definitely need them both. Throughout our curriculum, the following lessons focus on giving you the tools you need to succeed once you reach JavaScript content. + +# --question-- + +## --text-- + +What is the difference between HTML, CSS, and JavaScript? + +## --answers-- + +HTML is for creating interactive elements, CSS is for the look and feel, and JavaScript is for creating the structure of a webpage. + +--- + +CSS is for the look and feel, JavaScript is for creating interactive elements, and HTML is for creating the structure of a webpage. + +--- + +JavaScript is for the look and feel, CSS is for creating the structure, and HTML is for creating interactive elements of a webpage. + +## --video-solution-- + +2 diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/links-and-images-question-a.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/links-and-images-question-a.md new file mode 100644 index 00000000000..b4d237448f3 --- /dev/null +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/links-and-images-question-a.md @@ -0,0 +1,66 @@ +--- +id: 637f704072c65bc8e73dfe36 +videoId: tsEQgGjSmkM +title: Links and Images Question A +challengeType: 15 +dashedName: links-and-images-question-a +--- + +# --description-- + +To get some practice using links and images throughout this lesson you need an HTML project to work with. + +- Create a new directory named `odin-links-and-images`. + +- Within that directory, create a new file named `index.html`. + +- Fill in the usual HTML boilerplate. + +- Finally, add the following `h1` to the `body`: `

                                                                                                                                                                                                                                                                                                    Homepage

                                                                                                                                                                                                                                                                                                    ` + +## Anchor Elements +To create a link in HTML, you use the anchor element. An anchor element is defined by wrapping the text or another HTML element you want to be a link with an `` tag. Add the following to the `body` of the `index.html` page you created and open it in the browser: + +```html +click me +``` + +You may have noticed that clicking this link doesn’t do anything. This is because an anchor tag on its own won’t know where you want to link to. You have to tell it a destination to go to. You do this by using an HTML attribute. + +An HTML attribute gives additional information to an HTML element and always goes in the element’s opening tag. An attribute is usually made up of two parts: a name, and a value; however, not all attributes require a value. In your case, you need to add a `href` (hyperlink reference) attribute to the opening anchor tag. The value of the `href` attribute is the destination you want your link to go to. + +Add the following `href` attribute to the anchor element you created previously and try clicking it again, don’t forget to refresh the browser so the new changes can be applied. + +```html +click me +``` + +By default, any text wrapped with an anchor tag without a `href` attribute will look like plain text. If the `href` attribute is present, the browser will give the text a blue color and underline it to signify it is a link. + +It’s worth noting you can use anchor tags to link to any kind of resource on the internet, not just other HTML documents. You can link to videos, pdf files, images, and so on, but for the most part, you will be linking to other HTML documents. + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s HTML Links video above. + +## --text-- + +What HTML tag is used to create a link? + +## --answers-- + +`` + +--- + +`

                                                                                                                                                                                                                                                                                                    ` + +--- + +`

                                                                                                                                                                                                                                                                                                      ` + +## --video-solution-- + +1 diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/links-and-images-question-b.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/links-and-images-question-b.md new file mode 100644 index 00000000000..164fb01214f --- /dev/null +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/links-and-images-question-b.md @@ -0,0 +1,55 @@ +--- +id: 637f703572c65bc8e73dfe35 +videoId: tsEQgGjSmkM +title: Links and Images Question B +challengeType: 15 +dashedName: links-and-images-question-b +--- + +# --description-- + +To get some practice using links and images throughout this lesson you need an HTML project to work with. + +- Create a new directory named odin-links-and-images. + +- Within that directory, create a new file named index.html. + +- Fill in the usual HTML boilerplate. + +- finally, add the following h1 to the body: `

                                                                                                                                                                                                                                                                                                      Homepage

                                                                                                                                                                                                                                                                                                      ` + +## Anchor Elements +To create a link in HTML, you use the anchor element. An anchor element is defined by wrapping the text or another HTML element you want to be a link with an `
                                                                                                                                                                                                                                                                                                      ` tag. Add the following to the body of the index.html page you created and open it in the browser: + +```html +click me +``` + +You may have noticed that clicking this link doesn’t do anything. This is because an anchor tag on its own won’t know where you want to link to. You have to tell it a destination to go to. You do this by using an HTML attribute. An HTML attribute gives additional information to an HTML element and always goes in the element’s opening tag. An attribute is usually made up of two parts: a name, and a value; however, not all attributes require a value. In your case, you need to add a href (hyperlink reference) attribute to the opening anchor tag. The value of the href attribute is the destination you want your link to go to. Add the following href attribute to the anchor element you created previously and try clicking it again, don’t forget to refresh the browser so the new changes can be applied. + +```html +click me +``` + +By default, any text wrapped with an anchor tag without a `href` attribute will look like plain text. If the `href` attribute is present, the browser will give the text a blue color and underline it to signify it is a link. It’s worth noting you can use anchor tags to link to any kind of resource on the internet, not just other HTML documents. You can link to videos, pdf files, images, and so on, but for the most part, you will be linking to other HTML documents. + +# --question-- +## --text-- + +What is an attribute? +## --answers-- + +An HTML attribute gives additional information to an HTML element and always goes in the element’s closing tag. + +--- + +An HTML attribute is used to tell the browser what the element contains. + +--- + +An HTML attribute gives additional information to an HTML element and always goes in the element’s opening tag. + + +## --video-solution-- + +3 diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/links-and-images-question-c.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/links-and-images-question-c.md new file mode 100644 index 00000000000..c8a3913d77e --- /dev/null +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/links-and-images-question-c.md @@ -0,0 +1,56 @@ +--- +id: 637f703072c65bc8e73dfe34 +videoId: tsEQgGjSmkM +title: Links and Images Question C +challengeType: 15 +dashedName: links-and-images-question-c +--- + +# --description-- + +To get some practice using links and images throughout this lesson you need an HTML project to work with. + +- Create a new directory named odin-links-and-images. + +- Within that directory, create a new file named index.html. + +- Fill in the usual HTML boilerplate. + +- finally, add the following h1 to the body: `

                                                                                                                                                                                                                                                                                                      Homepage

                                                                                                                                                                                                                                                                                                      ` + +## Anchor Elements +To create a link in HTML, you use the anchor element. An anchor element is defined by wrapping the text or another HTML element you want to be a link with an `` tag. Add the following to the body of the index.html page you created and open it in the browser: + +```html +click me +``` + +You may have noticed that clicking this link doesn’t do anything. This is because an anchor tag on its own won’t know where you want to link to. You have to tell it a destination to go to. You do this by using an HTML attribute. An HTML attribute gives additional information to an HTML element and always goes in the element’s opening tag. An attribute is usually made up of two parts: a name, and a value; however, not all attributes require a value. In your case, you need to add a href (hyperlink reference) attribute to the opening anchor tag. The value of the href attribute is the destination you want your link to go to. Add the following href attribute to the anchor element you created previously and try clicking it again, don’t forget to refresh the browser so the new changes can be applied. + +```html +click me +``` + +By default, any text wrapped with an anchor tag without a `href` attribute will look like plain text. If the `href` attribute is present, the browser will give the text a blue color and underline it to signify it is a link. It’s worth noting you can use anchor tags to link to any kind of resource on the internet, not just other HTML documents. You can link to videos, pdf files, images, and so on, but for the most part, you will be linking to other HTML documents. + +# --question-- + +## --text-- + +What attribute tells links where to go to? + +## --answers-- + +`src` + +--- + +`href` + +--- + +`link` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/links-and-images-question-d.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/links-and-images-question-d.md new file mode 100644 index 00000000000..2b6a665eb87 --- /dev/null +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/links-and-images-question-d.md @@ -0,0 +1,112 @@ +--- +id: 637f702872c65bc8e73dfe33 +videoId: ta3Oxx7Yqbo +title: Links and Images Question D +challengeType: 15 +dashedName: links-and-images-question-d +--- + +# --description-- + + +Generally, there are two kinds of links you will create: + +- Links to pages on other websites on the internet + +- Links to pages located on your own websites + + +## Absolute Links +Links to pages on other websites on the internet are called absolute links. A typical absolute link will be made up of the following parts: `protocol://domain/path`. An absolute link will always contain the protocol and domain of the destination. + +You’ve already seen an absolute link in action. The link you created to The Odin Project’s About page earlier was an absolute link as it contains the protocol and domain. + +`https://www.theodinproject.com/about` + +## Relative Links +Links to other pages within your own website are called relative links. Relative links do not include the domain name, since it is another page on the same site, it assumes the domain name will be the same as the page you created the link on. + +Relative links only include the file path to the other page, relative to the page you are creating the link on. This is quite abstract, let’s see this in action using an example. + +Within the `odin-links-and-images` directory, create another HTML file named `about.html` and paste the following code into it: + +```html + + + + + Odin Links and Images + + + +

                                                                                                                                                                                                                                                                                                      About Page

                                                                                                                                                                                                                                                                                                      + + +``` + +Back in the index page, add the following anchor element to create a link to the about page: + +```html + +

                                                                                                                                                                                                                                                                                                      Homepage

                                                                                                                                                                                                                                                                                                      + click me + + About + +``` + +Open the index file in a browser and click on the about link to make sure it is all wired together correctly. Clicking the link should go to the about page you just created. + +This works because the index and about page are in the same directory. That means you can simply use its name (`about.html`) as the link’s href value. + +But you will usually want to organize your website directories a little better. Normally you would only have the `index.html` at the root directory and all other HTML files in their own directory. + +Create a directory named `pages` within the `odin-links-and-images` directory and move the `about.html` file into this new directory. + +Refresh the index page in the browser and then click on the about link. It will now be broken. This is because the location of the about page file has changed. + +To fix this, you just need to update the about link `href` value to include the `pages/` directory since that is the new location of the about file relative to the index file. + +```html + +

                                                                                                                                                                                                                                                                                                      Homepage

                                                                                                                                                                                                                                                                                                      + About + +``` + +Refresh the index page in the browser and try clicking the about link again, it should now be back in working order. + +In many cases, this will work just fine; however, you can still run into unexpected issues with this approach. Prepending `./` before the link will in most cases prevent such issues. By adding `./` you are specifying to your code that it should start looking for the file/directory relative to the **current** directory. + +```html + +

                                                                                                                                                                                                                                                                                                      Homepage

                                                                                                                                                                                                                                                                                                      + About + +``` + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s HTML File Structure video above. + +## --text-- + +What is the difference between an absolute and a relative link? + +## --answers-- + +An absolute link is a link to another page on the current website. A relative link is a link to another website. + +--- + +An absolute link is a link to another website. A relative link is a link another page on the current website. + +--- + +There is no difference between absolute and relative links. + +## --video-solution-- + +2 diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/links-and-images-question-e.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/links-and-images-question-e.md new file mode 100644 index 00000000000..a935ae3262a --- /dev/null +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/links-and-images-question-e.md @@ -0,0 +1,98 @@ +--- +id: 637f702372c65bc8e73dfe32 +videoId: 0xoztJCHpbQ +title: Links and Images Question E +challengeType: 15 +dashedName: links-and-images-question-e +--- + +# --description-- + +Websites would be fairly boring if they could only display text. Luckily HTML provides a wide variety of elements for displaying all sorts of different media. The most widely used of these is the image element. + +To display an image in HTML you use the `` element. Unlike the other elements you have encountered, the `` element is self-closing. Empty, self-closing HTML elements do not need a closing tag. + +Instead of wrapping content with an opening and closing tag, it embeds an image into the page using a `src` attribute which tells the browser where the image file is located. The `src` attribute works much like the `href` attribute for anchor tags. It can embed an image using both absolute and relative paths. + +For example, using an absolute path you can display an image located on The Odin Project site: + + + +To use images that you have on your own websites, you can use a relative path. + +- Create a new directory named `images` within the `odin-links-and-images` project. + +- Next, download [this image](https://unsplash.com/photos/Mv9hjnEUHR4/download?force=true&w=640) and move it into the `images` directory you just created. + +- Rename the image to `dog.jpg`. + +Finally add the image to the `index.html` file: + +```html + +

                                                                                                                                                                                                                                                                                                      Homepage

                                                                                                                                                                                                                                                                                                      + click me + + About + + + +``` + +Save the `index.html` file and open it in a browser to view Charles in all his glory. + + +## Parent Directories + +What if you want to use the dog image in the about page? You would first have to go up one level out of the pages directory into its parent directory so you could then access the images directory. + +To go to the parent directory you need to use two dots in the relative filepath like this: `../.` Let’s see this in action, within the body of the `about.html` file, add the following image below the heading you added earlier: + +```html + +``` + +To break this down: + +- First, you are going to the parent directory of the pages directory which is `odin-links-and-images`. + +- Then, from the parent directory, you can go into the `images` directory. + +- Finally, you can access the `dog.jpg` file. + +Using the metaphor we used earlier, using `../` in a filepath is kind of like stepping out from the room you are currently in to the main hallway so you can go to another room. + +## `Alt` attribute + +Besides the `src` attribute, every image element should also have an `alt` (alternative text) attribute. + +The `alt` attribute is used to describe an image. It will be used in place of the image if it cannot be loaded. It is also used with screen readers to describe what the image is to visually impaired users. + +This is how the The Odin Project logo example you used earlier looks with an `alt` attribute included: + + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s HTML Images Video above. + +## --text-- + +Which tag is used to display an image? + +## --answers-- + +`` + +--- + +`` + +--- + +`` + +## --video-solution-- + +3 diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/links-and-images-question-f.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/links-and-images-question-f.md new file mode 100644 index 00000000000..ba4eb809e5d --- /dev/null +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/links-and-images-question-f.md @@ -0,0 +1,94 @@ +--- +id: 637f701c72c65bc8e73dfe31 +videoId: 0xoztJCHpbQ +title: Links and Images Question F +challengeType: 15 +dashedName: links-and-images-question-f +--- + +# --description-- + +Websites would be fairly boring if they could only display text. Luckily HTML provides a wide variety of elements for displaying all sorts of different media. The most widely used of these is the image element. + +To display an image in HTML you use the `` element. Unlike the other elements you have encountered, the `` element is self-closing. Empty, self-closing HTML elements do not need a closing tag. + +Instead of wrapping content with an opening and closing tag, it embeds an image into the page using a src attribute which tells the browser where the image file is located. The src attribute works much like the href attribute for anchor tags. It can embed an image using both absolute and relative paths. + +For example, using an absolute path you can display an image located on The Odin Project site: + + + +To use images that you have on your own websites, you can use a relative path. + +- Create a new directory named `images` within the `odin-links-and-images` project. + +- Next, download [this image](https://unsplash.com/photos/Mv9hjnEUHR4/download?force=true&w=640) and move it into the images directory you just created. + +- Rename the image to `dog.jpg`. + +Finally add the image to the `index.html` file: + +```html + +

                                                                                                                                                                                                                                                                                                      Homepage

                                                                                                                                                                                                                                                                                                      +
                                                                                                                                                                                                                                                                                                      click me + + About + + + +``` + +Save the `index.html` file and open it in a browser to view Charles in all his glory. + + +## Parent Directories + +What if you want to use the dog image in the about page? You would first have to go up one level out of the pages directory into its parent directory so you could then access the images directory. + +To go to the parent directory you need to use two dots in the relative filepath like this: `../.` Let’s see this in action, within the body of the `about.html` file, add the following image below the heading you added earlier: + +```html + +``` + +To break this down: + +- First, you are going to the parent directory of the pages directory which is `odin-links-and-images`. + +- Then, from the parent directory, you can go into the `images` directory. + +- Finally, you can access the `dog.jpg` file. + +Using the metaphor we used earlier, using `../` in a filepath is kind of like stepping out from the room you are currently in to the main hallway so you can go to another room. + +## Alt attribute + +Besides the src attribute, every image element should also have an alt (alternative text) attribute. + +The alt attribute is used to describe an image. It will be used in place of the image if it cannot be loaded. It is also used with screen readers to describe what the image is to visually impaired users. + +This is how the The Odin Project logo example you used earlier looks with an alt attribute included: + + +# --question-- + +## --text-- + +What two attributes do images always need to have? + +## --answers-- + +`href` and `alt` + +--- + +`name` and `href` + +--- + +`alt` and `src` + +## --video-solution-- + +3 diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/links-and-images-question-g.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/links-and-images-question-g.md new file mode 100644 index 00000000000..d1a6fcd4406 --- /dev/null +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/links-and-images-question-g.md @@ -0,0 +1,94 @@ +--- +id: 637f701572c65bc8e73dfe30 +videoId: 0xoztJCHpbQ +title: Links and Images Question G +challengeType: 15 +dashedName: links-and-images-question-g +--- + +# --description-- + +Websites would be fairly boring if they could only display text. Luckily HTML provides a wide variety of elements for displaying all sorts of different media. The most widely used of these is the image element. + +To display an image in HTML you use the `` element. Unlike the other elements you have encountered, the `` element is self-closing. Empty, self-closing HTML elements do not need a closing tag. + +Instead of wrapping content with an opening and closing tag, it embeds an image into the page using a src attribute which tells the browser where the image file is located. The src attribute works much like the href attribute for anchor tags. It can embed an image using both absolute and relative paths. + +For example, using an absolute path you can display an image located on The Odin Project site: + + + +To use images that you have on your own websites, you can use a relative path. + +- Create a new directory named `images` within the `odin-links-and-images` project. + +- Next, download [this image](https://unsplash.com/photos/Mv9hjnEUHR4/download?force=true&w=640) and move it into the images directory you just created. + +- Rename the image to `dog.jpg`. + +Finally add the image to the `index.html` file: + +```html + +

                                                                                                                                                                                                                                                                                                      Homepage

                                                                                                                                                                                                                                                                                                      + click me + + About + + + +``` + +Save the `index.html` file and open it in a browser to view Charles in all his glory. + + +## Parent Directories + +What if you want to use the dog image in the about page? You would first have to go up one level out of the pages directory into its parent directory so you could then access the images directory. + +To go to the parent directory you need to use two dots in the relative filepath like this: `../.` Let’s see this in action, within the body of the `about.html` file, add the following image below the heading you added earlier: + +```html + +``` + +To break this down: + +- First, you are going to the parent directory of the pages directory which is `odin-links-and-images`. + +- Then, from the parent directory, you can go into the `images` directory. + +- Finally, you can access the `dog.jpg` file. + +Using the metaphor we used earlier, using `../` in a filepath is kind of like stepping out from the room you are currently in to the main hallway so you can go to another room. + +## Alt attribute + +Besides the src attribute, every image element should also have an alt (alternative text) attribute. + +The alt attribute is used to describe an image. It will be used in place of the image if it cannot be loaded. It is also used with screen readers to describe what the image is to visually impaired users. + +This is how the The Odin Project logo example you used earlier looks with an alt attribute included: + + +# --question-- + +## --text-- + +How do you access a parent directory in a filepath? + +## --answers-- + +`../` + +--- + +`./` + +--- + +`.../` + +## --video-solution-- + +1 diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/links-and-images-question-h.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/links-and-images-question-h.md new file mode 100644 index 00000000000..cfd73fcfbc1 --- /dev/null +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/links-and-images-question-h.md @@ -0,0 +1,98 @@ +--- +id: 637f700b72c65bc8e73dfe2f +videoId: 0xoztJCHpbQ +title: Links and Images Question H +challengeType: 15 +dashedName: links-and-images-question-h +--- + +# --description-- + +Websites would be fairly boring if they could only display text. Luckily HTML provides a wide variety of elements for displaying all sorts of different media. The most widely used of these is the image element. + +To display an image in HTML you use the `` element. Unlike the other elements you have encountered, the `` element is self-closing. Empty, self-closing HTML elements do not need a closing tag. + +Instead of wrapping content with an opening and closing tag, it embeds an image into the page using a src attribute which tells the browser where the image file is located. The src attribute works much like the href attribute for anchor tags. It can embed an image using both absolute and relative paths. + +For example, using an absolute path you can display an image located on The Odin Project site: + + + +To use images that you have on your own websites, you can use a relative path. + +- Create a new directory named `images` within the `odin-links-and-images` project. + +- Next, download [this image](https://unsplash.com/photos/Mv9hjnEUHR4/download?force=true&w=640) and move it into the images directory you just created. + +- Rename the image to `dog.jpg`. + +Finally add the image to the `index.html` file: + +```html + +

                                                                                                                                                                                                                                                                                                      Homepage

                                                                                                                                                                                                                                                                                                      + click me + + About + + + +``` + +Save the `index.html` file and open it in a browser to view Charles in all his glory. + + +## Parent Directories + +What if you want to use the dog image in the about page? You would first have to go up one level out of the pages directory into its parent directory so you could then access the images directory. + +To go to the parent directory you need to use two dots in the relative filepath like this: `../.` Let’s see this in action, within the body of the `about.html` file, add the following image below the heading you added earlier: + +```html + +``` + +To break this down: + +- First, you are going to the parent directory of the pages directory which is `odin-links-and-images`. + +- Then, from the parent directory, you can go into the `images` directory. + +- Finally, you can access the `dog.jpg` file. + +Using the metaphor we used earlier, using `../` in a filepath is kind of like stepping out from the room you are currently in to the main hallway so you can go to another room. + +## Alt attribute + +Besides the src attribute, every image element should also have an alt (alternative text) attribute. + +The alt attribute is used to describe an image. It will be used in place of the image if it cannot be loaded. It is also used with screen readers to describe what the image is to visually impaired users. + +This is how the The Odin Project logo example you used earlier looks with an alt attribute included: + + +# --question-- + +## --assignment-- + +Read about the four main image formats that can be used on the web. + +## --text-- + +What are the four main image formats that you can use for images on the web? + +## --answers-- + +TIFF, GIF, PNG, and SVG. + +--- + +JPG, PNG, GIF, and SVG. + +--- + +JPG, PDF, SVG, and GIF. + +## --video-solution-- + +2 diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/project-create-a-recipe-page.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/project-create-a-recipe-page.md new file mode 100644 index 00000000000..657a3f6e32d --- /dev/null +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/project-create-a-recipe-page.md @@ -0,0 +1,204 @@ +--- +id: 6391d1a4f7ac71efd0621380 +title: Build a Recipe Page Project +challengeType: 14 +dashedName: project-create-a-recipe-page +--- + +# --description-- + +The website will consist of a main index page which will have links to a few recipes. The website won’t look very pretty by the time you’ve finished. + +**User Stories:** + +1. Your recipe page should contain a `DOCTYPE` tag. +1. Your recipe page should include an `html` element with a `head` and `body` element as children. +1. You should have a `title` element within the `head` element with the text `The Odin Recipes`. +1. You should see an `h1` element that has the text `Creamy Chocolate Fudge`. +1. You should see an image with the url `*placeholder-fcc-cdn*` with a fitting `alt` text. +1. There should be an `h2` element with the text `Description` under the image. +1. You should see a couple of paragraphs under `Description` that describe the recipe. +1. There should be an `h2` element with the text `Ingredients` +1. Under the `Ingredients` heading there should be an unordered list with the ingredients needed for the recipe. +1. Under the list of ingredients add another heading called `Steps`. +1. You should see an ordered list with a couple of steps needed to complete the recipe. +1. Under the steps there should be an `h2` element with the text `More Recipes` +1. You should see a couple of links to other recipes inside an unordered list which has a couple of list items with anchor elements within. +1. These anchor elements should have `href` attribute with the value set to `#` + +# --hints-- + +You should have a `DOCTYPE` tag. + +```js +assert(code.match(//gi)); +``` + +You should have a `html` element with `head` and `body` element. + +```js +const html = document.querySelectorAll('html')[0]; +const head = document.querySelectorAll('html > head')[0]; +const body = document.querySelectorAll('html > body')[0]; + +assert(html && head && body); +``` + +You should have a `title` element within the `head` element that contains the text `The Odin Recipes`. + +```js +assert(document.querySelectorAll('HEAD > TITLE')[0].innerText == 'The Odin Recipes'); +``` + +You should have a `h1` element within your `body` element that contains the text `Creamy Chocolate Fudge`. + +```js +assert(document.querySelectorAll('BODY > H1')[0].innerText == 'Creamy Chocolate Fudge'); +``` + +You should have an image with the url `*placeholder-fcc-cdn*` with an `alt` attribute that has a fitting text. + +```js +const img = document.querySelectorAll('IMG')[0]; + +assert(img && img.alt !='' && img.src === 'https://i.imgur.com/p0J5baJ.jpg') +``` + +You should have an `h2` element with the text `Description`. + +```js +const h2 = document.querySelectorAll('H2')[0]; + +assert(h2.innerText == 'Description'); +``` + +You should have at least two `p` elements describing the recipe. + +```js +const paragraphs = document.querySelectorAll('P'); + +assert(paragraphs.length > 1); +``` + +You should have an `h2` element with the text `Ingredients`. + +```js +const h2 = document.querySelectorAll('H2')[1]; + +assert(h2.innerText == 'Ingredients'); +``` + +You should have an unordered list `
                                                                                                                                                                                                                                                                                                        ` with some ingredients as the list items `
                                                                                                                                                                                                                                                                                                      • `. + +```js +const unorderedList = document.querySelectorAll('UL')[0]; +const listItems = document.querySelectorAll('UL > LI'); + +assert(unorderedList && listItems && listItems.length > 1); +``` + +You should have an `h2` element with the text `Steps`. + +```js +const h2 = document.querySelectorAll('H2')[2]; + +assert(h2.innerText == 'Steps'); +``` + +You should have a `
                                                                                                                                                                                                                                                                                                          ` with the the steps as the list items `
                                                                                                                                                                                                                                                                                                        1. `. + +```js +const orderedList = document.querySelectorAll('OL')[0]; +const listItems = document.querySelectorAll('OL > LI'); + +assert(orderedList && listItems && listItems.length > 1); +``` + +You should have an `h2` element with the text `More Recipes`. + +```js +const h2 = document.querySelectorAll('H2')[3]; + +assert(h2.innerText == 'More Recipes'); +``` + +You should have an unordered list `
                                                                                                                                                                                                                                                                                                            ` element with list items `
                                                                                                                                                                                                                                                                                                          • ` that contain `` tags which lead to other recipes. + +```js +const unorderedList = document.querySelectorAll('UL')[1]; +const listItems = unorderedList.querySelectorAll('LI'); + +const allAreListItems = unorderedList.children.length == listItems.length; + +const containsAnchors = [...listItems].every(function(listItem) { + return listItem.querySelector("a") !== null; +}); + +assert(unorderedList && allAreListItems && containsAnchors && listItems.length > 1); +``` + +Your anchor tags linking to the recipes should have a `href` attribute with the value set to `#` + +```js +const anchorTags = document.querySelectorAll("a"); + +const allAnchorsHaveHrefHash = [...anchorTags].every(function(anchorTag) { + return anchorTag.hasAttribute("href") && anchorTag.getAttribute("href") === "#"; +}); + +assert(allAnchorsHaveHrefHash && anchorTags.length > 0); +``` + +# --seed-- + +## --seed-contents-- + +```html + +``` + +```css + +``` + +## --solutions-- + +```html + + + + The Odin Recipes + + +

                                                                                                                                                                                                                                                                                                            Creamy Chocolate Fudge

                                                                                                                                                                                                                                                                                                            + A delicious chocolate fudge dessert +

                                                                                                                                                                                                                                                                                                            Description

                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                            This recipe is for a rich and creamy chocolate fudge that is sure to satisfy your sweet tooth. It's perfect for a special occasion or as a tasty treat for any time of the year.

                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                            This recipe is easy to follow and only requires a few simple ingredients. With just a few steps, you'll be able to create a delicious dessert that everyone will love.

                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                            Ingredients

                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                            • 1 cup sugar
                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                            • 1/2 cup unsalted butter
                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                            • 1/4 cup milk
                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                            • 1/4 cup cocoa powder
                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                            • 1/4 cup chocolate chips
                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                            • 1/4 tsp salt
                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                            • 1 tsp vanilla extract
                                                                                                                                                                                                                                                                                                            • +
                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                            Steps

                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                              +
                                                                                                                                                                                                                                                                                                            1. In a medium saucepan, melt the butter over medium heat.
                                                                                                                                                                                                                                                                                                            2. +
                                                                                                                                                                                                                                                                                                            3. Add the sugar, milk, cocoa powder, and salt to the saucepan and stir until well combined.
                                                                                                                                                                                                                                                                                                            4. +
                                                                                                                                                                                                                                                                                                            5. Bring the mixture to a boil, stirring constantly, and then reduce the heat to low and simmer for 5 minutes.
                                                                                                                                                                                                                                                                                                            6. +
                                                                                                                                                                                                                                                                                                            7. Remove the saucepan from the heat and stir in the chocolate chips and vanilla extract until the chocolate is melted and the mixture is smooth.
                                                                                                                                                                                                                                                                                                            8. +
                                                                                                                                                                                                                                                                                                            9. Pour the fudge into a greased 8-inch square pan and let it cool completely before cutting into squares.
                                                                                                                                                                                                                                                                                                            10. +
                                                                                                                                                                                                                                                                                                            +

                                                                                                                                                                                                                                                                                                            More Recipes

                                                                                                                                                                                                                                                                                                            +
                                                                                                                                                                                                                                                                                                            + + +``` diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-a.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-a.md new file mode 100644 index 00000000000..f4625eb7e31 --- /dev/null +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-a.md @@ -0,0 +1,65 @@ +--- +id: 637f4e3e72c65bc8e73dfe24 +videoId: kcHKFZBVtf4 +title: Understand Ordered and Unordered List Question A +challengeType: 15 +dashedName: understand-ordered-and-unordered-list-question-a +--- + +# --description-- + +If you want to have a list of items where the order doesn’t matter, like a shopping list of items that can be bought in any order, then you can use an unordered list. + +Unordered lists are created using the `
                                                                                                                                                                                                                                                                                                              ` element, and each item within the list is created using the list item element `
                                                                                                                                                                                                                                                                                                            • `. + +Each list item in an unordered list begins with a bullet point: + + + +If you instead want to create a list of items where the order does matter, like step-by-step instructions for a recipe, or your top 10 favorite TV shows, then you can use an ordered list. + +Ordered lists are created using the `
                                                                                                                                                                                                                                                                                                                ` element. Each individual item in them is again created using the list item element `
                                                                                                                                                                                                                                                                                                              1. `. However, each list item in an ordered list begins with a number instead: + + + +# --question-- + +## --assignment-- + +Watch the first three minutes of Kevin Powell's video on Ordered and Unordered lists above. + +--- + +Make an unordered shopping list of your favorite foods. + +--- + +Make an ordered list of todo’s you need to get done today. + +--- + +Make an unordered list of places you’d like to visit someday. + +--- + +Make an ordered list of your all time top 5 favorite video games or movies. + +## --text-- + +What HTML tag is used to create an unordered list? + +## --answers-- + +`
                                                                                                                                                                                                                                                                                                              2. ` + +--- + +`
                                                                                                                                                                                                                                                                                                                  ` + +--- + +`
                                                                                                                                                                                                                                                                                                                    ` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-b.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-b.md new file mode 100644 index 00000000000..4c6822fc504 --- /dev/null +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-b.md @@ -0,0 +1,45 @@ +--- +id: 637f4e4672c65bc8e73dfe25 +videoId: LGQuIIv2RVA +title: Understand Ordered and Unordered List Question B +challengeType: 15 +dashedName: understand-ordered-and-unordered-list-question-b +--- + +# --description-- + +If you want to have a list of items where the order doesn’t matter, like a shopping list of items that can be bought in any order, then you can use an unordered list. + +Unordered lists are created using the `
                                                                                                                                                                                                                                                                                                                      ` element, and each item within the list is created using the list item element `
                                                                                                                                                                                                                                                                                                                    • `. + +Each list item in an unordered list begins with a bullet point: + + + +If you instead want to create a list of items where the order does matter, like step-by-step instructions for a recipe, or your top 10 favorite TV shows, then you can use an ordered list. + +Ordered lists are created using the `
                                                                                                                                                                                                                                                                                                                        ` element. Each individual item in them is again created using the list item element `
                                                                                                                                                                                                                                                                                                                      1. `. However, each list item in an ordered list begins with a number instead: + + + +# --question-- + +## --text-- + +What HTML tag is used to create an ordered list? + +## --answers-- + +`
                                                                                                                                                                                                                                                                                                                          ` + +--- + +`
                                                                                                                                                                                                                                                                                                                        1. ` + +--- + +`
                                                                                                                                                                                                                                                                                                                            ` + +## --video-solution-- + +1 diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-c.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-c.md new file mode 100644 index 00000000000..c766990ca22 --- /dev/null +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/understand-ordered-and-unordered-list-question-c.md @@ -0,0 +1,45 @@ +--- +id: 637f4e5172c65bc8e73dfe26 +videoId: LGQuIIv2RVA +title: Understand Ordered and Unordered List Question C +challengeType: 15 +dashedName: understand-ordered-and-unordered-list-question-c +--- + +# --description-- + +If you want to have a list of items where the order doesn’t matter, like a shopping list of items that can be bought in any order, then you can use an unordered list. + +Unordered lists are created using the `
                                                                                                                                                                                                                                                                                                                              ` element, and each item within the list is created using the list item element `
                                                                                                                                                                                                                                                                                                                            • `. + +Each list item in an unordered list begins with a bullet point: + + + +If you instead want to create a list of items where the order does matter, like step-by-step instructions for a recipe, or your top 10 favorite TV shows, then you can use an ordered list. + +Ordered lists are created using the `
                                                                                                                                                                                                                                                                                                                                ` element. Each individual item in them is again created using the list item element `
                                                                                                                                                                                                                                                                                                                              1. `. However, each list item in an ordered list begins with a number instead: + + + +# --question-- + +## --text-- + +What HTML tag is used to create list items within both unordered and ordered lists? + +## --answers-- + +`
                                                                                                                                                                                                                                                                                                                                  ` + +--- + +`
                                                                                                                                                                                                                                                                                                                                1. ` + +--- + +`
                                                                                                                                                                                                                                                                                                                                    ` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/working-with-text-question-a.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/working-with-text-question-a.md new file mode 100644 index 00000000000..8698b62aca8 --- /dev/null +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/working-with-text-question-a.md @@ -0,0 +1,60 @@ +--- +id: 637f4e5872c65bc8e73dfe27 +videoId: yqcd-XkxZNM +title: Working With Text Question A +challengeType: 15 +dashedName: working-with-text-question-a +--- + +# --description-- + +What would you expect the following text to output on an HTML page? + +```html + + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor + incididunt ut labore et dolore magna aliqua. + + Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris + nisi ut aliquip ex ea commodo consequat. + +``` + +It looks like two paragraphs of text, and so you might expect it to display in that way. However that is not the case, as you can see in the output below: + + + +When the browser encounters new lines like this in your HTML, it will compress them down into one single space. The result of this compression is that all of the text is clumped together into one long line. + +If you want to create paragraphs in HTML, you need to use the paragraph element, which will add a newline after each of your paragraphs. A paragraph element is defined by wrapping text content with a `

                                                                                                                                                                                                                                                                                                                                    ` tag. + +Changing our example from before to use paragraph elements fixes the issue: + + + +# --question-- + +## --assignment-- + +Watch and follow along to Kevin Powell’s HTML Paragraph and Headings Video above. + +## --text-- + +How do you create a paragraph in HTML? + +## --answers-- + +`

                                                                                                                                                                                                                                                                                                                                    This is a paragraph

                                                                                                                                                                                                                                                                                                                                    ` + +--- + +`

                                                                                                                                                                                                                                                                                                                                    This is a paragraph

                                                                                                                                                                                                                                                                                                                                    ` + +--- + +`This is a paragraph` + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/working-with-text-question-b.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/working-with-text-question-b.md new file mode 100644 index 00000000000..a74d8d11452 --- /dev/null +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/working-with-text-question-b.md @@ -0,0 +1,40 @@ +--- +id: 637f4e5f72c65bc8e73dfe28 +videoId: yqcd-XkxZNM +title: Working With Text Question B +challengeType: 15 +dashedName: working-with-text-question-b +--- + +# --description-- + +Headings are different from other HTML text elements: they are displayed larger and bolder than other text to signify that they are headings. + +There are 6 different levels of headings starting from `

                                                                                                                                                                                                                                                                                                                                    ` to `

                                                                                                                                                                                                                                                                                                                                    `. The number within a heading tag represents that heading’s level. The largest and most important heading is `h1`, while `h6` is the tiniest heading at the lowest level. + +Headings are defined much like paragraphs. For example, to create an `h1` heading, we wrap our heading text in a `

                                                                                                                                                                                                                                                                                                                                    ` tag. + + + +Using the correct level of heading is important as levels provide a hierarchy to the content. An `h1` heading should always be used for the heading of the overall page, and the lower level headings should be used as the headings for content in smaller sections of the page. + +# --question-- +## --text-- + +How many different levels of headings are there and what is the difference between them? + +## --answers-- + +There are 5 different levels of headings. `h5` is the smallest and least important heading, and `h1` is the largest and most important heading. + +--- + +There are 6 different levels of headings. `h6` is the largest and most important heading, and `h1` is the smallest and least important heading. + +--- + +There are 6 different levels of headings. `h1` is the largest and most important heading, and `h6` is the smallest and least important heading. + +## --video-solution-- + +3 diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/working-with-text-question-c.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/working-with-text-question-c.md new file mode 100644 index 00000000000..6ccf0e06658 --- /dev/null +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/working-with-text-question-c.md @@ -0,0 +1,47 @@ +--- +id: 637f4e6672c65bc8e73dfe29 +videoId: gW6cBZLUk6M +title: Working With Text Question C +challengeType: 15 +dashedName: working-with-text-question-c +--- + +# --description-- + +The `` element makes text bold. It also semantically marks text as important; this affects tools, like screen readers, that users with visual impairments will rely on to use your website. The tone of voice on some screen readers will change to communicate the importance of the text within a `strong` element. To define a `strong` element you wrap text content in a `` tag. + +You can use `strong` on its own: + + + +But you will probably find yourself using the `strong` element much more in combination with other text elements, like this: + + + +Sometimes you will want to make text bold without giving it an important meaning. You’ll learn how to do that in the CSS lessons later in the curriculum. + +# --question-- + +## --assignment-- + +Watch Kevin Powell’s HTML Bold and Italic Text Video above. + +## --text-- + +What element should you use to make text bold and important? + +## --answers-- + +`This is an important message` + +--- + +`

                                                                                                                                                                                                                                                                                                                                    This is an important message

                                                                                                                                                                                                                                                                                                                                    ` + +--- + +`This is an important message` + +## --video-solution-- + +3 diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/working-with-text-question-d.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/working-with-text-question-d.md new file mode 100644 index 00000000000..d6647f9a7ea --- /dev/null +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/working-with-text-question-d.md @@ -0,0 +1,39 @@ +--- +id: 637f4e6e72c65bc8e73dfe2a +videoId: gW6cBZLUk6M +title: Working With Text Question D +challengeType: 15 +dashedName: working-with-text-question-d +--- + +# --description-- + +The `em` element makes text italic. It also semantically places emphasis on the text, which again may affect things like screen readers. To define an emphasized element you wrap text content in a `` tag. + +To use `em` on its own: + + +Again, like the `strong` element, you will find yourself mostly using the `em` element with other text elements: + + + +# --question-- +## --text-- + +What element should you use to make text italicized to add emphasis? + +## --answers-- + +`This is an italic message` + +--- + +`This is an italic message` + +--- + +`This is an italic message` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/working-with-text-question-e.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/working-with-text-question-e.md new file mode 100644 index 00000000000..d022a6331e9 --- /dev/null +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/working-with-text-question-e.md @@ -0,0 +1,66 @@ +--- +id: 637f4e7972c65bc8e73dfe2b +videoId: gW6cBZLUk6M +title: Working With Text Question E +challengeType: 15 +dashedName: working-with-text-question-e +--- + +# --description-- + +You may have noticed that in all the examples in this lesson you indent any elements that are within other elements. This is known as nesting elements. + +When you nest elements within other elements, you create a parent and child relationship between them. The nested elements are the children and the element they are nested within is the parent. + +In the following example, the `body` element is the parent and the `p` is the child: + +```html + + + + +

                                                                                                                                                                                                                                                                                                                                    Lorem ipsum dolor sit amet.

                                                                                                                                                                                                                                                                                                                                    + + +``` + +Just as in human relationships, HTML parent elements can have many children. Elements at the same level of nesting are considered to be siblings. + +For example, the two `p` elements in the following code are siblings, since they are both children of the `body` tag and are at the same level of nesting as each other: + +```html + + + + +

                                                                                                                                                                                                                                                                                                                                    Lorem ipsum dolor sit amet.

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Ut enim ad minim veniam.

                                                                                                                                                                                                                                                                                                                                    + + +``` + +You use indentation to make the level of nesting clear and readable for yourselves and other developers who will work with your HTML in the future. It is recommended to indent any child elements by two spaces. + +The parent, child, and sibling relationships between elements will become much more important later when you start styling your HTML with CSS and adding behavior with JavaScript. For now, however, it is just important to know the distinction between how elements are related and the terminology used to describe their relationships. + +# --question-- + +## --text-- + +What relationship do two elements have if they are at the same level of nesting? + +## --answers-- + +The elements are each other's parents. + +--- + +The elements are each other's children. + +--- + +The elements are siblings. + +## --video-solution-- + +3 diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/working-with-text-question-f.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/working-with-text-question-f.md new file mode 100644 index 00000000000..2ace3f4e36d --- /dev/null +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/working-with-text-question-f.md @@ -0,0 +1,67 @@ +--- +id: 637f4e8072c65bc8e73dfe2c +videoId: gW6cBZLUk6M +title: Working With Text Question F +challengeType: 15 +dashedName: working-with-text-question-f +--- + +# --description-- + +You may have noticed that in all the examples in this lesson you indent any elements that are within other elements. This is known as nesting elements. + +When you nest elements within other elements, you create a parent and child relationship between them. The nested elements are the children and the element they are nested within is the parent. + +In the following example, the body element is the parent and the paragraph is the child: + +```html + + + + +

                                                                                                                                                                                                                                                                                                                                    Lorem ipsum dolor sit amet.

                                                                                                                                                                                                                                                                                                                                    + + +``` + +Just as in human relationships, HTML parent elements can have many children. Elements at the same level of nesting are considered to be siblings. + +For example, the two paragraphs in the following code are siblings, since they are both children of the body tag and are at the same level of nesting as each other: + +```html + + + + +

                                                                                                                                                                                                                                                                                                                                    Lorem ipsum dolor sit amet.

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Ut enim ad minim veniam.

                                                                                                                                                                                                                                                                                                                                    + + +``` + +You use indentation to make the level of nesting clear and readable for yourselves and other developers who will work with your HTML in the future. It is recommended to indent any child elements by two spaces. + +The parent, child, and sibling relationships between elements will become much more important later when you start styling your HTML with CSS and adding behavior with JavaScript. For now, however, it is just important to know the distinction between how elements are related and the terminology used to describe their relationships. + +# --question-- + +## --text-- + +What relationship does an element have with any nested element within it? + +## --answers-- + +The element within the other element is called the parent element. + +--- + +The element within the other element is called the child element. + +--- + +The element within the other element is called the sibling element. + + +## --video-solution-- + +2 diff --git a/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/working-with-text-question-g.md b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/working-with-text-question-g.md new file mode 100644 index 00000000000..fe83f0ef062 --- /dev/null +++ b/curriculum/challenges/ukrainian/10-coding-interview-prep/the-odin-project/working-with-text-question-g.md @@ -0,0 +1,49 @@ +--- +id: 637f4e8772c65bc8e73dfe2d +videoId: gW6cBZLUk6M +title: Working With Text Question G +challengeType: 15 +dashedName: working-with-text-question-g +--- + +# --description-- + +HTML comments are not visible to the browser; they allow us to comment on your code so that other developers or your future selves can read them and get some context about something that might not be clear in the code. + +Writing an HTML comment is simple: You just enclose the comment with ``tags. For example: + +```html +

                                                                                                                                                                                                                                                                                                                                    View the html to see the hidden comments

                                                                                                                                                                                                                                                                                                                                    + + + +

                                                                                                                                                                                                                                                                                                                                    Some paragraph text

                                                                                                                                                                                                                                                                                                                                    + + +``` + +# --question-- + +## --assignment-- + +To get some practice working with text in HTML, create a plain blog article page which uses different headings, uses paragraphs, and has some text in the paragraphs bolded and italicized. You can use [Lorem Ipsum](https://loremipsum.io) to generate dummy text, in place of real text as you build your sites. + +## --text-- + +How do you create HTML comments? + +## --answers-- + +`/* This is an HTML comment */` + +--- + +`` + +--- + +`<-- This is an HTML comment --!>` + +## --video-solution-- + +2 diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d1ac33c68d27dcda5796.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d1ac33c68d27dcda5796.md index ef4a1506307..ed580c447a2 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d1ac33c68d27dcda5796.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/6196d1ac33c68d27dcda5796.md @@ -14,13 +14,25 @@ dashedName: step-23 Ви повинні використати властивість `transform`, щоб повернути елемент. ```js -assert.notEmpty(new __helpers.CSSHelp(document).getStyle('.back-mountain')?.transform); +const backMountain = new __helpers.CSSHelp(document).getStyle('.back-mountain'); + +if (backMountain?.transform) { + assert.notEmpty(backMountain?.transform); +} else { + assert.notEmpty(backMountain?.rotate); +} ``` Ви повинні надати `.back-mountain` властивість `transform` зі значенням `--fcc-expected--`, але знайдено `--fcc-actual--`. ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.back-mountain')?.transform, 'rotate(45deg)'); +const backMountain = new __helpers.CSSHelp(document).getStyle('.back-mountain'); + +if (backMountain?.transform) { + assert.equal(backMountain?.transform, 'rotate(45deg)'); +} else { + assert.equal(backMountain?.rotate, '45deg'); +} ``` Ви повинні надати `.back-mountain` властивість `left`. diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d229b0e542520cd91c685.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d229b0e542520cd91c685.md index 88518b710d2..a881c380478 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d229b0e542520cd91c685.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d229b0e542520cd91c685.md @@ -14,13 +14,25 @@ dashedName: step-84 Ви повинні надати `.foot.left` властивість `transform` зі значенням `rotate(80deg)`. ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.foot.left').getPropVal('transform', true), 'rotate(80deg)'); +const leftFoot = new __helpers.CSSHelp(document).getStyle('.foot.left'); + +if (leftFoot?.transform) { + assert.equal(leftFoot.getPropVal('transform', true), 'rotate(80deg)'); +} else { + assert.equal(leftFoot.getPropVal('rotate', true), '80deg'); +} ``` Ви повинні надати `.foot.right` властивість `transform` зі значенням `rotate(-80deg)`. ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.foot.right').getPropVal('transform', true), 'rotate(-80deg)'); +const rightFoot = new __helpers.CSSHelp(document).getStyle('.foot.right'); + +if (rightFoot?.transform) { + assert.equal(rightFoot.getPropVal('transform', true), 'rotate(-80deg)'); +} else { + assert.equal(rightFoot.getPropVal('rotate', true), '-80deg'); +} ``` # --seed-- diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2d4e80400325ff89664a.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2d4e80400325ff89664a.md index 327049b509e..713a9185058 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2d4e80400325ff89664a.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2d4e80400325ff89664a.md @@ -14,7 +14,14 @@ dashedName: step-91 Ви повинні надати `.arm.left` властивість `transform` зі значенням `rotate(130deg) scaleX(-1)`. ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.arm.left').getPropVal('transform', true), 'rotate(130deg)scaleX(-1)'); +const leftArm = new __helpers.CSSHelp(document).getStyle('.arm.left'); + +if (leftArm?.rotate && leftArm?.transform) { + assert.equal(leftArm.getPropVal('rotate', true), '130deg'); + assert.equal(leftArm.getPropVal('transform', true), 'scaleX(-1)'); +} else { + assert.equal(leftArm.getPropVal('transform', true), 'rotate(130deg)scaleX(-1)'); +} ``` # --seed-- @@ -281,7 +288,6 @@ body { top: 35%; left: 5%; transform-origin: top left; - } --fcc-editable-region-- diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2ebc81ba81271460850d.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2ebc81ba81271460850d.md index 2a46a3eae2a..e62687fac23 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2ebc81ba81271460850d.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d2ebc81ba81271460850d.md @@ -14,7 +14,13 @@ dashedName: step-92 Ви повинні надати `.arm.right` властивість `transform` зі значенням `rotate(-45deg)`. ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.arm.right')?.getPropVal('transform', true), 'rotate(-45deg)'); +const rightArm = new __helpers.CSSHelp(document).getStyle('.arm.right'); + +if (rightArm?.transform) { + assert.equal(rightArm?.getPropVal('transform', true), 'rotate(-45deg)'); +} else { + assert.equal(rightArm?.getPropVal('rotate', true), '-45deg'); +} ``` # --seed-- @@ -287,7 +293,6 @@ body { .arm.right { top: 0%; right: -5%; - } --fcc-editable-region-- diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d32c7fa21f32aaa91d499.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d32c7fa21f32aaa91d499.md index 5ceefa37b7e..77f6c3c74f2 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d32c7fa21f32aaa91d499.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d32c7fa21f32aaa91d499.md @@ -14,7 +14,16 @@ dashedName: step-97 Ви повинні надати шляховій точці `10%` властивість `transform` зі значенням `rotate(110deg) scaleX(-1)`. ```js -assert([...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '10%')?.style?.transform?.replace(/\s+/g, '') === 'rotate(110deg)scaleX(-1)'); +const wave10Percent = [...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '10%'); +const rotateProp = wave10Percent?.style?.rotate?.replace(/\s+/g, ''); +const transformProp = wave10Percent?.style?.transform?.replace(/\s+/g, ''); + +if (rotateProp && transformProp) { + assert(rotateProp === '110deg'); + assert(transformProp === 'scaleX(-1)'); +} else { + assert(transformProp === 'rotate(110deg)scaleX(-1)'); +} ``` # --seed-- diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d333b738e3c2b5d58b095.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d333b738e3c2b5d58b095.md index 841adb16ee2..0d73f646901 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d333b738e3c2b5d58b095.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d333b738e3c2b5d58b095.md @@ -14,7 +14,16 @@ dashedName: step-98 Ви повинні надати шляховій точці `20%` властивість `transform` зі значенням `rotate(130deg) scaleX(-1)`. ```js -assert([...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '20%')?.style?.transform?.replace(/\s+/g, '') === 'rotate(130deg)scaleX(-1)'); +const wave20Percent = [...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '20%'); +const transformProp = wave20Percent?.style?.transform?.replace(/\s+/g, ''); +const rotateProp = wave20Percent?.style?.rotate?.replace(/\s+/g, ''); + +if (rotateProp && transformProp) { + assert(rotateProp === '130deg'); + assert(transformProp === 'scaleX(-1)'); +} else { + assert(transformProp === 'rotate(130deg)scaleX(-1)'); +} ``` # --seed-- diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d337765b9f02c10e93722.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d337765b9f02c10e93722.md index f8a8acf41f3..4d70ea9aa62 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d337765b9f02c10e93722.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-css-transforms-by-building-a-penguin/619d337765b9f02c10e93722.md @@ -14,13 +14,31 @@ dashedName: step-99 Ви повинні надати шляховій точці `30%` властивість `transform` зі значенням `rotate(110deg) scaleX(-1)`. ```js -assert([...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '30%')?.style?.transform?.replace(/\s+/g, '') === 'rotate(110deg)scaleX(-1)'); +const wave30Percent = [...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '30%'); +const transformProp = wave30Percent?.style?.transform?.replace(/\s+/g, ''); +const rotateProp = wave30Percent?.style?.rotate?.replace(/\s+/g, ''); + +if (rotateProp && transformProp) { + assert(rotateProp === '110deg'); + assert(transformProp === 'scaleX(-1)'); +} else { + assert(transformProp === 'rotate(110deg)scaleX(-1)'); +} ``` Ви повинні надати шляховій точці `40%` властивість `transform` зі значенням `rotate(130deg) scaleX(-1)`. ```js -assert([...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '40%')?.style?.transform?.replace(/\s+/g, '') === 'rotate(130deg)scaleX(-1)'); +const wave40Percent = [...[...new __helpers.CSSHelp(document).getCSSRules('keyframes')].find(rule => rule?.name === 'wave')?.cssRules].find(css => css?.keyText === '40%'); +const transformProp = wave40Percent?.style?.transform?.replace(/\s+/g, ''); +const rotateProp = wave40Percent?.style?.rotate?.replace(/\s+/g, ''); + +if (rotateProp && transformProp) { + assert(rotateProp === '130deg'); + assert(transformProp === 'scaleX(-1)'); +} else { + assert(transformProp === 'rotate(130deg)scaleX(-1)'); +} ``` # --seed-- diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98f0.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98f0.md index fef7738acee..abd5d391546 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98f0.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-css-variables-by-building-a-city-skyline/5d822fd413a79914d39e98f0.md @@ -16,11 +16,11 @@ gradient-type( ); ``` -В прикладі `color1` – суцільний вгорі, `color2` — суцільний внизу, а посередині рівномірно переходить від одного до іншого. В `.bb1a` додайте градієнт типу `linear-gradient` до властивості `background` з `--building-color1` як перший колір та `--window-color1` як другий. +В прикладі `color1` – суцільний вгорі, `color2` — суцільний внизу, а посередині рівномірно переходить від одного до іншого. Додайте властивість `background` під властивістю `background-color` у `.bb1a`. Встановіть її як градієнт типу `linear-gradient`, який використовує `--building-color1` як перший колір та `--window-color1` як другий. # --hints-- -Ви повинні застосувати `background` до `.bb1a`. +Ви повинні застосувати `background` до `.bb1a` одразу після `background-color`. ```js assert(new __helpers.CSSHelp(document).getStyle('.bb1a')?.background); diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa2407b521be39a3de7be1.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa2407b521be39a3de7be1.md index 07abe6eefdf..7ecf58c8d52 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa2407b521be39a3de7be1.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa2407b521be39a3de7be1.md @@ -45,7 +45,7 @@ assert(document.querySelector('a').getAttribute('target') === '_blank');

                                                                                                                                                                                                                                                                                                                                    Cat Photos

                                                                                                                                                                                                                                                                                                                                    --fcc-editable-region-- -

                                                                                                                                                                                                                                                                                                                                    See more cat photos in our gallery.

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    See more cat photos in our gallery.

                                                                                                                                                                                                                                                                                                                                    --fcc-editable-region-- A cute orange cat lying on its back. diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60fab9f17fa294054b74228c.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60fab9f17fa294054b74228c.md index f2f367239b7..6d338d971bb 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60fab9f17fa294054b74228c.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-html-forms-by-building-a-registration-form/60fab9f17fa294054b74228c.md @@ -9,7 +9,7 @@ dashedName: step-31 Переходимо до останнього `fieldset`. Ви б хотіли дозволити користувачеві завантажувати фотографію профілю? -Що ж, `file` з типом `input` дозволяє саме це. Add a `label` with the text `Upload a profile picture:`, and nest an `input` accepting a file upload. +Що ж, `file` з типом `input` дозволяє саме це. Додайте `label` з текстом `Upload a profile picture:` та вкладіть `input`, що приймає завантаження файлу. # --hints-- diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/620179bc0a6a2358c72b90ad.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/620179bc0a6a2358c72b90ad.md index 4355733d3c9..5e02df753a2 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/620179bc0a6a2358c72b90ad.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/620179bc0a6a2358c72b90ad.md @@ -7,7 +7,7 @@ dashedName: step-44 # --description-- -Ви загорнули свої таблиці в контейнер з допомогою класу `table-wrap`. Створіть селектор для цього класу та надайте йому `padding` зі значенням `0 0.75rem 1.5rem 0.75rem`. +Ви загорнули свої таблиці в контейнер з класом `table-wrap`. Створіть селектор для цього класу та надайте йому `padding` зі значенням `0 0.75rem 1.5rem 0.75rem`. # --hints-- diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2abbe7d18d49a1e0e1c8.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2abbe7d18d49a1e0e1c8.md index a00e6a1a544..f296a03d66c 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2abbe7d18d49a1e0e1c8.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2abbe7d18d49a1e0e1c8.md @@ -39,13 +39,15 @@ assert(document.querySelector('h1')?.innerText === 'Nutrition Facts'); --fcc-editable-region-- - - - Nutrition Label - - - + + + Nutrition Label + + + + + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2d4150fe0d4cbd0f2628.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2d4150fe0d4cbd0f2628.md index 3a44956ad48..b62a45fe71b 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2d4150fe0d4cbd0f2628.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f2d4150fe0d4cbd0f2628.md @@ -43,14 +43,16 @@ assert(document.querySelector('p')?.innerText === '8 servings per container'); --fcc-editable-region-- - - - Nutrition Label - - -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    - + + + Nutrition Label + + + +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    + + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34948891834dd77655a6.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34948891834dd77655a6.md index ac9a2ccb941..ee51a5bead0 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34948891834dd77655a6.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34948891834dd77655a6.md @@ -43,15 +43,17 @@ assert(document.querySelectorAll('p')?.[1]?.innerText === 'Serving size 2/3 cup --fcc-editable-region-- - - - Nutrition Label - - -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    - + + + Nutrition Label + + + +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    + + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34ecc1091b4fd5a8a484.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34ecc1091b4fd5a8a484.md index 1f09b857dbf..4eb49fe7269 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34ecc1091b4fd5a8a484.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f34ecc1091b4fd5a8a484.md @@ -49,16 +49,18 @@ assert(links.find(link => link?.getAttribute('href') === 'https://fonts.googleap --fcc-editable-region-- - - - Nutrition Label - - -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    - + + + Nutrition Label + + + + +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f357957e370510f21ea16.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f357957e370510f21ea16.md index be00fecf6f7..9cba940858d 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f357957e370510f21ea16.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f357957e370510f21ea16.md @@ -32,17 +32,19 @@ assert(new __helpers.CSSHelp(document).getStyle('body')?.fontFamily === '"Open S ```html - - - Nutrition Label - - - - -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    - + + + + Nutrition Label + + + + + +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    + ``` diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f378014c2da526a109c81.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f378014c2da526a109c81.md index 89c7929aeb4..6ba94539386 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f378014c2da526a109c81.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f378014c2da526a109c81.md @@ -30,17 +30,19 @@ assert(new __helpers.CSSHelp(document).getStyle('html')?.fontSize === '16px'); ```html - - - Nutrition Label - - - - -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    - + + + + Nutrition Label + + + + + +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    + ``` diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38279e5c3d53692ea441.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38279e5c3d53692ea441.md index faf3c1133b7..4ef24078d5d 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38279e5c3d53692ea441.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38279e5c3d53692ea441.md @@ -37,18 +37,20 @@ assert(children?.every(child => child?.parentElement?.classList?.contains('label ```html - - - Nutrition Label - - - + + + + Nutrition Label + + + + --fcc-editable-region-- - -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    - + +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    + --fcc-editable-region-- ``` diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38cabc64e3556f98cc1a.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38cabc64e3556f98cc1a.md index 1049ba63ef7..8653517365d 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38cabc64e3556f98cc1a.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f38cabc64e3556f98cc1a.md @@ -32,19 +32,21 @@ assert(new __helpers.CSSHelp(document).getStyle('.label')?.border === '2px solid ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + ``` diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3949f58e12577dcefb00.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3949f58e12577dcefb00.md index 92077233f54..5f54206f035 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3949f58e12577dcefb00.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3949f58e12577dcefb00.md @@ -26,19 +26,21 @@ assert(new __helpers.CSSHelp(document).getStyle('.label')?.width === '270px'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + ``` diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f39d7da41b15851fa3fb9.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f39d7da41b15851fa3fb9.md index b0e9059f068..a3f994a70c9 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f39d7da41b15851fa3fb9.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f39d7da41b15851fa3fb9.md @@ -30,19 +30,21 @@ assert(new __helpers.CSSHelp(document).getStyle('.label')?.padding === '0px 7px' ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + ``` diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3b091162165948e1cb33.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3b091162165948e1cb33.md index ecf42cba63d..d6e2a1ad2ac 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3b091162165948e1cb33.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3b091162165948e1cb33.md @@ -32,19 +32,21 @@ assert(new __helpers.CSSHelp(document).getStyle('*')?.boxSizing === 'border-box' ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + ``` diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3cafd794015aa9547a6d.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3cafd794015aa9547a6d.md index d6e22fd2e74..bc64c30a980 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3cafd794015aa9547a6d.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3cafd794015aa9547a6d.md @@ -32,19 +32,21 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')?.fontWeight === '800'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + ``` diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3d9e59db4b5b8e960762.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3d9e59db4b5b8e960762.md index 51014712d31..b7162f96232 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3d9e59db4b5b8e960762.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3d9e59db4b5b8e960762.md @@ -24,19 +24,21 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')?.textAlign === 'center'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + ``` diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e1b7233ee5c7595771f.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e1b7233ee5c7595771f.md index 7e9861eb05e..c3a51cfb4a5 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e1b7233ee5c7595771f.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e1b7233ee5c7595771f.md @@ -24,19 +24,21 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')?.margin === '-4px 0px'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + ``` diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e4af8008c5d494d3afe.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e4af8008c5d494d3afe.md index a50264f21fd..2566d8487b3 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e4af8008c5d494d3afe.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3e4af8008c5d494d3afe.md @@ -30,19 +30,21 @@ assert(new __helpers.CSSHelp(document).getStyle('p')?.margin === '0px'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + ``` diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3ed16592445e57941aec.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3ed16592445e57941aec.md index f558d36fb31..f3daad4db4e 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3ed16592445e57941aec.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f3ed16592445e57941aec.md @@ -44,21 +44,23 @@ assert(document.querySelector('.divider')?.previousElementSibling?.localName === ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    --fcc-editable-region-- - + ``` diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f405b89a7ec5f8e2d11f4.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f405b89a7ec5f8e2d11f4.md index 6bb4e7088f0..f5496c51f47 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f405b89a7ec5f8e2d11f4.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f405b89a7ec5f8e2d11f4.md @@ -36,20 +36,22 @@ assert(new __helpers.CSSHelp(document).getStyle('.divider')?.margin === '2px 0px ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + ``` diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f40b01f680e608d360ed4.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f40b01f680e608d360ed4.md index 2849d4ce05e..364e9c87782 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f40b01f680e608d360ed4.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f40b01f680e608d360ed4.md @@ -26,20 +26,22 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')?.letterSpacing === '0.15px ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + ``` diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4172e9eec061d6456221.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4172e9eec061d6456221.md index e041d423da2..12adc99aa7b 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4172e9eec061d6456221.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4172e9eec061d6456221.md @@ -32,22 +32,24 @@ assert(!document.querySelector('p')?.classList?.contains('bold')); ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    --fcc-editable-region-- - + ``` diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f41c979787462e76dab90.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f41c979787462e76dab90.md index c85751633aa..522477d2f2a 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f41c979787462e76dab90.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f41c979787462e76dab90.md @@ -44,20 +44,22 @@ assert(new __helpers.CSSHelp(document).getStyle('h1')); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + ``` diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f423cf65d5864132a0956.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f423cf65d5864132a0956.md index f472e26caac..0048f605c4e 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f423cf65d5864132a0956.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f423cf65d5864132a0956.md @@ -24,22 +24,24 @@ assert(document.querySelector('h1')?.classList?.contains('bold')); ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    --fcc-editable-region-- - + ``` diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f42a021625f656101ef93.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f42a021625f656101ef93.md index 76bad558834..7463502babf 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f42a021625f656101ef93.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f42a021625f656101ef93.md @@ -9,7 +9,7 @@ dashedName: step-22 Горизонтальний інтервал між однаково важливими елементами може підвищити читабельність вашого тексту. -Обгорніть текст `2/3 cup (55g)` в елемент `span` та надайте йому атрибут `class` зі значенням `right`. +Обгорніть текст `2/3 cup (55g)` в елемент `span`. # --hints-- @@ -19,12 +19,6 @@ dashedName: step-22 assert(document.querySelector('span')); ``` -Ваш новий елемент `span` повинен мати атрибут `class` зі значенням `right`. - -```js -assert(document.querySelector('span')?.classList?.contains('right')); -``` - Ваш елемент `span` повинен мати текст `2/3 cup (55g)`. ```js @@ -44,22 +38,24 @@ assert(document.querySelectorAll('p')?.[1]?.innerText === 'Serving size 2/3 cup ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    --fcc-editable-region-- - + ``` diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4bfb9de4a16703b56eb6.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4bfb9de4a16703b56eb6.md index a41f1c900a4..34209960d85 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4bfb9de4a16703b56eb6.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4bfb9de4a16703b56eb6.md @@ -7,22 +7,20 @@ dashedName: step-23 # --description-- -Властивість `float` використовують для розміщення елемента ліворуч або праворуч від його контейнера, дозволяючи іншому вмісту (наприклад, тексту) обгортати його. - -Створіть новий селектор `.right` та встановіть властивість `float` на `right`. +Тепер ми можемо додати горизонтальний інтервал, використовуючи `flex`. У селектор `p` додайте властивість `display` зі значенням `flex` та властивість `justify-content` зі значенням `space-between`. # --hints-- -Ви повинні створити новий селектор `.right`. +Ваш селектор `p` повинен мати властивість `display` зі значенням `flex`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.right')); +assert(new __helpers.CSSHelp(document).getStyle('p')?.display === 'flex'); ``` -Ваш селектор `.right` повинен мати властивість `float` зі значенням `right`. +Ваш селектор `p` повинен мати властивість `justify-content` зі значенням `space-between`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.right')?.float === 'right'); +assert(new __helpers.CSSHelp(document).getStyle('p')?.justifyContent === 'space-between'); ``` # --seed-- @@ -32,20 +30,22 @@ assert(new __helpers.CSSHelp(document).getStyle('.right')?.float === 'right'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + ``` @@ -75,9 +75,11 @@ h1 { letter-spacing: 0.15px } +--fcc-editable-region-- p { margin: 0; } +--fcc-editable-region-- .divider { border-bottom: 1px solid #888989; @@ -87,8 +89,4 @@ p { .bold { font-weight: 800; } - ---fcc-editable-region-- - ---fcc-editable-region-- ``` diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ce9d877b668417c0c42.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ce9d877b668417c0c42.md index bad5cd732ac..cb1a5fff295 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ce9d877b668417c0c42.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ce9d877b668417c0c42.md @@ -40,22 +40,24 @@ assert(children?.[3]?.localName === 'p'); ```html - - - Nutrition Label - - - - + + + + Nutrition Label + + + + + --fcc-editable-region-- -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    --fcc-editable-region-- - + ``` @@ -87,6 +89,8 @@ h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -97,8 +101,4 @@ p { .bold { font-weight: 800; } - -.right { - float: right; -} ``` diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4dde9d72e3694cb9ee3b.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4dde9d72e3694cb9ee3b.md index 96c9bac9f89..3e03384d5f6 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4dde9d72e3694cb9ee3b.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4dde9d72e3694cb9ee3b.md @@ -39,22 +39,24 @@ assert(style?.letterSpacing === '0.15px'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + ``` @@ -88,6 +90,8 @@ h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -98,8 +102,4 @@ p { .bold { font-weight: 800; } - -.right { - float: right; -} ``` diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ec58334106a4170c2a8.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ec58334106a4170c2a8.md index 26805e92571..8d40a716fd0 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ec58334106a4170c2a8.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4ec58334106a4170c2a8.md @@ -7,7 +7,7 @@ dashedName: step-26 # --description-- -Створіть новий елемент `div` під своїм елементом `header` та надайте йому атрибут `class` зі значенням `divider lg`. +Створіть новий елемент `div` знизу свого елемента `header` та надайте йому атрибут `class` зі значенням `divider large`. # --hints-- @@ -23,12 +23,12 @@ assert(document.querySelectorAll('div')?.length === 3); assert(document.querySelector('.label')?.lastElementChild?.localName === 'div'); ``` -Ваш новий елемент `div` повинен мати атрибут `class` зі значенням `divider lg`. +Ваш новий елемент `div` повинен мати атрибут `class` зі значенням `divider large`. ```js const div = document.querySelector('.label')?.lastElementChild; assert(div?.classList?.contains('divider')); -assert(div?.classList?.contains('lg')); +assert(div?.classList?.contains('large')); ``` # --seed-- @@ -38,25 +38,27 @@ assert(div?.classList?.contains('lg')); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    --fcc-editable-region-- --fcc-editable-region-- -
                                                                                                                                                                                                                                                                                                                                    - +
                                                                                                                                                                                                                                                                                                                                    + ``` @@ -88,6 +90,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -98,8 +102,4 @@ p { .bold { font-weight: 800; } - -.right { - float: right; -} ``` diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4f9e4a40566b776a8f38.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4f9e4a40566b776a8f38.md index 39d691937b6..b4cfc0f3f82 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4f9e4a40566b776a8f38.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f4f9e4a40566b776a8f38.md @@ -7,32 +7,32 @@ dashedName: step-27 # --description-- -Створіть новий селектор `.lg` та надайте йому властивість `height` зі значенням `10px`. Також створіть селектор `.lg, .md` та встановіть властивість `background-color` на `black`. +Створіть новий селектор `.large` та надайте йому властивість `height` зі значенням `10px`. Також створіть селектор `.large, .medium` та встановіть властивість `background-color` на `black`. # --hints-- -Ви повинні мати новий селектор `.lg`. +Ви повинні мати новий селектор `.large`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg')); +assert(new __helpers.CSSHelp(document).getStyle('.large')); ``` -Ваш селектор `.lg` повинен мати властивість `height` зі значенням `10px`. +Ваш селектор `.large` повинен мати властивість `height` зі значенням `10px`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg')?.height === '10px'); +assert(new __helpers.CSSHelp(document).getStyle('.large')?.height === '10px'); ``` -Ви повинні мати новий селектор `.lg, .md`. +Ви повинні мати новий селектор `.large, .medium`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')); +assert(new __helpers.CSSHelp(document).getStyle('.large, .medium')); ``` -Ваш селектор `.lg, .md` повинен мати властивість `background-color` зі значенням `black`. +Ваш селектор `.large, .medium` повинен мати властивість `background-color` зі значенням `black`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')?.backgroundColor === 'black'); +assert(new __helpers.CSSHelp(document).getStyle('.large, .medium')?.backgroundColor === 'black'); ``` # --seed-- @@ -42,23 +42,25 @@ assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')?.backgroundColor === ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + ``` @@ -90,6 +92,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -101,10 +105,6 @@ p { font-weight: 800; } -.right { - float: right; -} - --fcc-editable-region-- --fcc-editable-region-- diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f50473cc0196c6dd3892a.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f50473cc0196c6dd3892a.md index c0d6d55f911..6ab34a4918a 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f50473cc0196c6dd3892a.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f50473cc0196c6dd3892a.md @@ -7,16 +7,16 @@ dashedName: step-28 # --description-- -Ви можете помітити, що внизу елемента `.lg` досі є невеликий кордон. Щоб скинути його, надайте своєму селектору `.lg, .md` властивість `border` зі значенням `0`. +Ви можете помітити, що внизу елемента `.large` досі є невеликий кордон. Щоб скинути його, надайте своєму селектору `.large, .medium` властивість `border` зі значенням `0`. -Примітка: (середній) клас `md` буде утилізовано в кроці 37 для тонших смужок на етикетці. +Примітка: `medium` (середній) клас буде утилізовано в кроці 37 для тонших смужок на етикетці. # --hints-- -Ваш селектор `.lg, .md` повинен мати властивість `border` зі значенням `0`. +Ваш селектор `.large, .medium` повинен мати властивість `border` зі значенням `0`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')?.borderWidth === '0px'); +assert(new __helpers.CSSHelp(document).getStyle('.large, .medium')?.borderWidth === '0px'); ``` # --seed-- @@ -26,23 +26,25 @@ assert(new __helpers.CSSHelp(document).getStyle('.lg, .md')?.borderWidth === '0p ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    - + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + ``` @@ -74,6 +76,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -85,16 +89,12 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } --fcc-editable-region-- -.lg, .md { +.large, .medium { background-color: black; } --fcc-editable-region-- diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51257a8a516d80b6c743.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51257a8a516d80b6c743.md index 7a2768e79d3..2f94ab3f582 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51257a8a516d80b6c743.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51257a8a516d80b6c743.md @@ -7,7 +7,7 @@ dashedName: step-29 # --description-- -Створіть новий `div` під своїм елементом `.lg` та надайте йому атрибут `class` зі значенням `calories-info`. +Створіть новий `div` знизу свого елемента `.large` та надайте йому атрибут `class` зі значенням `calories-info`. # --hints-- @@ -23,10 +23,10 @@ assert(document.querySelectorAll('div')?.length === 4); assert(document.querySelector('.label')?.lastElementChild?.classList?.contains('calories-info')); ``` -Ваш новий `div` повинен йти після елемента `.lg`. +Ваш новий `div` повинен йти після елемента `.large`. ```js -assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('lg')); +assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('large')); ``` # --seed-- @@ -36,26 +36,28 @@ assert(document.querySelector('.label')?.lastElementChild?.previousElementSiblin ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    --fcc-editable-region-- --fcc-editable-region-- -
                                                                                                                                                                                                                                                                                                                                    - +
                                                                                                                                                                                                                                                                                                                                    + ``` @@ -87,6 +89,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -98,15 +102,11 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51e4e5b24a6e80eccce1.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51e4e5b24a6e80eccce1.md index 82831092f76..fe4675b8d6c 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51e4e5b24a6e80eccce1.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f51e4e5b24a6e80eccce1.md @@ -7,27 +7,39 @@ dashedName: step-30 # --description-- -В елементі `.calories-info` створіть елемент `p`. Надайте цьому елементу `p` атрибут `class` зі значенням `bold sm-text` та текст `Amount per serving`. +Створіть елемент `div` всередині свого елемента `.calories-info`. Надайте цьому елементу `div` атрибут `class` зі значенням `left-container`. В межах недавно створеного елемента `div` створіть елемент `h2` з текстом `Amount per serving`. Надайте елементу `h2` атрибут `class` зі значенням `bold small-text`. # --hints-- -Ви повинні створити новий елемент `p` в елементі `.calories-info`. +Ви повинні створити новий елемент `div` в елементі `.calories-info`. ```js -assert(document.querySelector('.calories-info')?.children?.[0]?.localName === 'p'); +assert(document.querySelector('.calories-info')?.children?.[0]?.localName === 'div'); ``` -Ваш новий елемент `p` повинен мати атрибут `class` зі значенням `bold sm-text`. +Ваш новий елемент `div` повинен мати атрибут `class` зі значенням `left-container`. ```js -assert(document.querySelector('.calories-info')?.children?.[0]?.classList.contains('bold')); -assert(document.querySelector('.calories-info')?.children?.[0]?.classList.contains('sm-text')); +assert(document.querySelector('.calories-info')?.children?.[0]?.classList.contains('left-container')); ``` -Ваш новий елемент `p` повинен мати текст `Amount per serving`. +Ви повинні створити новий елемент `h2` в елементі `.left-container`. ```js -assert(document.querySelector('.calories-info')?.children?.[0]?.innerText === 'Amount per serving'); +assert(document.querySelector('.left-container')?.children?.[0]?.localName === 'h2'); +``` + +Ваш новий елемент `h2` повинен мати атрибут `class` зі значенням `bold small-text`. + +```js +assert(document.querySelector('.left-container')?.children?.[0]?.classList.contains('bold')); +assert(document.querySelector('.left-container')?.children?.[0]?.classList.contains('small-text')); +``` + +Ваш новий елемент `h2` повинен мати текст `Amount per serving`. + +```js +assert(document.querySelector('.left-container')?.children?.[0]?.innerText === 'Amount per serving'); ``` # --seed-- @@ -37,28 +49,30 @@ assert(document.querySelector('.calories-info')?.children?.[0]?.innerText === 'A ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    ---fcc-editable-region-- -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    - +--fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                                                    + ``` @@ -90,6 +104,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -101,15 +117,11 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md index b96fe611cc8..8c7b7d9f681 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f522dea4f776f64dc3e91.md @@ -9,20 +9,20 @@ dashedName: step-31 Одиниця `rem` розшифровується як `root em` та залежить від розміру шрифту елемента `html`. -Створіть селектор `.sm-text` та встановіть `font-size` на `0.85rem`, що, за підрахунками, буде приблизно `13.6px` (пам’ятайте, що для свого `html` ви встановили `font-size` зі значенням `16px`). +Створіть селектор `.small-text` та встановіть `font-size` на `0.85rem`, що дорівнюватиме приблизно `13.6px` (пам’ятайте, що для свого `html` ви встановили `font-size` зі значенням `16px`). # --hints-- -Ви повинні мати селектор `.sm-text`. +Ви повинні мати селектор `.small-text`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.sm-text')); +assert(new __helpers.CSSHelp(document).getStyle('.small-text')); ``` -Ваш селектор `.sm-text` повинен мати властивість `font-size` зі значенням `0.85rem`. +Ваш селектор `.small-text` повинен мати властивість `font-size` зі значенням `0.85rem`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.sm-text')?.fontSize === '0.85rem'); +assert(new __helpers.CSSHelp(document).getStyle('.small-text')?.fontSize === '0.85rem'); ``` # --seed-- @@ -32,26 +32,30 @@ assert(new __helpers.CSSHelp(document).getStyle('.sm-text')?.fontSize === '0.85r ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    - +
                                                                                                                                                                                                                                                                                                                                    + ``` @@ -83,6 +87,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -94,15 +100,11 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5486b8fd4b71633f69b0.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5486b8fd4b71633f69b0.md index bf2d8fd0494..a38ffec60af 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5486b8fd4b71633f69b0.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5486b8fd4b71633f69b0.md @@ -1,51 +1,50 @@ --- id: 615f5486b8fd4b71633f69b0 -title: Крок 32 +title: Крок 33 challengeType: 0 -dashedName: step-32 +dashedName: step-33 --- # --description-- -Під елементом `.sm-text` створіть новий елемент `h1` з текстом `Calories 230`. Обгорніть частину тексту `230` в елемент `span` з `class`, встановленим на `right`. +Знизу свого елемента `.small-text` створіть новий елемент `p` з текстом `Calories`. Також знизу елемента `.left-container` створіть новий елемент `span` з текстом `230`. # --hints-- -Ви повинні мати новий елемент `h1` в межах елемента `.calories-info`. +Ви повинні мати новий елемент `p` в межах елемента `.calories-info`. ```js -assert(document.querySelector('.calories-info')?.querySelector('h1')) +assert(document.querySelector('.calories-info')?.querySelector('p')) ``` -Ваш елемент `h1` повинен йти після елемента `.sm-text`. +Ви повинні мати новий елемент `span` в межах елемента `.calories-info`. ```js -assert(document.querySelector('.sm-text')?.nextElementSibling?.localName === 'h1'); +assert(document.querySelector('.calories-info')?.querySelector('span')) ``` -Ваш елемент `h1` повинен мати текст `Calories 230`. +Ваш новий елемент `p` повинен йти після елемента `.small-text`. ```js -// the float: right property does weird things to the inner text. -assert(document.querySelector('.calories-info')?.lastElementChild?.innerText.match(/Calories[\s|\n]*230/)); +assert(document.querySelector('.small-text')?.nextElementSibling?.localName === 'p'); ``` -Ви повинні створити елемент `span` в новому елементі `h1`. +Ваш елемент `p` повинен мати текст `Calories`. ```js -assert(document.querySelector('.calories-info')?.lastElementChild?.querySelector('span')); +assert(document.querySelector('.left-container')?.lastElementChild?.innerText === 'Calories'); ``` -Ваш елемент `span` повинен мати `class` зі значенням `right`. +Ваш елемент `span` повинен йти після елемента `.left-container`. ```js -assert(document.querySelector('.calories-info')?.lastElementChild?.querySelector('span')?.classList?.contains('right')); +assert(document.querySelector('.left-container')?.nextElementSibling?.localName ==='span'); ``` Ваш елемент `span` повинен мати текст `230`. ```js -assert(document.querySelector('.calories-info')?.lastElementChild?.querySelector('span')?.innerText === '230'); +assert(document.querySelector('.calories-info')?.lastElementChild?.innerText === '230'); ``` # --seed-- @@ -55,28 +54,32 @@ assert(document.querySelector('.calories-info')?.lastElementChild?.querySelector ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

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

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    ---fcc-editable-region--
                                                                                                                                                                                                                                                                                                                                    - +--fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                                                    + ``` @@ -108,6 +111,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -119,20 +124,20 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } + +.calories-info h2 { + margin: 0; +} ``` diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f575b50b91e72af079480.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f575b50b91e72af079480.md index 7ab4cfa19f0..cf3109add23 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f575b50b91e72af079480.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f575b50b91e72af079480.md @@ -1,29 +1,41 @@ --- id: 615f575b50b91e72af079480 -title: Крок 33 +title: Крок 35 challengeType: 0 -dashedName: step-33 +dashedName: step-35 --- # --description-- -Створіть новий селектор `.calories-info h1`, встановивши для верхнього та нижнього поля значення `-5px`, а для лівого та правого поля — `-2px`. +Створіть новий селектор `.left-container p`, встановивши для верхнього та нижнього полів значення `-5px`, а для лівого та правого – `-2px`. Також встановіть `font-size` на `2em` та `font-weight` на `700`. # --hints-- -Ви повинні мати новий селектор `.calories-info h1`. +Ви повинні мати новий селектор `.left-container p`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.calories-info h1')); +assert(new __helpers.CSSHelp(document).getStyle('.left-container p')); ``` -Ваш новий селектор `.calories-info h1` повинен мати властивість `margin` зі значенням `-5px -2px`. +Ваш новий селектор `.left-container p` повинен мати властивість `margin` зі значенням `-5px -2px`. ```js -assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marginTop, '-5px'); -assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marginBottom, '-5px'); -assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marginLeft, '-2px'); -assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marginRight, '-2px'); +assert.equal(new __helpers.CSSHelp(document).getStyle('.left-container p')?.marginTop, '-5px'); +assert.equal(new __helpers.CSSHelp(document).getStyle('.left-container p')?.marginBottom, '-5px'); +assert.equal(new __helpers.CSSHelp(document).getStyle('.left-container p')?.marginLeft, '-2px'); +assert.equal(new __helpers.CSSHelp(document).getStyle('.left-container p')?.marginRight, '-2px'); +``` + +Ваш новий селектор `.left-container p` повинен мати властивість `font-size` зі значенням `2em`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.left-container p')?.fontSize === '2em'); +``` + +Ваш новий селектор `.left-container p` повинен мати властивість `font-weight` зі значенням `700`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.left-container p')?.fontWeight === '700'); ``` # --seed-- @@ -33,27 +45,32 @@ assert.equal(new __helpers.CSSHelp(document).getStyle('.calories-info h1')?.marg ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Calories 230

                                                                                                                                                                                                                                                                                                                                    + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Calories

                                                                                                                                                                                                                                                                                                                                    + 230
                                                                                                                                                                                                                                                                                                                                    - +
                                                                                                                                                                                                                                                                                                                                    + ``` @@ -85,6 +102,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -96,23 +115,29 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + --fcc-editable-region-- --fcc-editable-region-- diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5af373a68e744a3c5a76.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5af373a68e744a3c5a76.md index e8c451ce184..3457a6d4a4f 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5af373a68e744a3c5a76.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5af373a68e744a3c5a76.md @@ -1,13 +1,13 @@ --- id: 615f5af373a68e744a3c5a76 -title: Крок 34 +title: Крок 36 challengeType: 0 -dashedName: step-34 +dashedName: step-36 --- # --description-- -Створіть селектор `.calories-info span` та встановіть `font-size` на `1.2em`. +Створіть селектор `.calories-info span`, встановіть його `font-size` на `2.4em` та `font-weight` на `700`. # --hints-- @@ -17,10 +17,16 @@ dashedName: step-34 assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')); ``` -Ваш селектор `.calories-info span` повинен мати властивість `font-size` зі значенням `1.2em`. +Ваш селектор `.calories-info span` повинен мати властивість `font-size` зі значенням `2.4em`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.fontSize === '1.2em'); +assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.fontSize === '2.4em'); +``` + +Ваш селектор `.calories-info span` повинен мати властивість `font-weight` зі значенням `700`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.fontWeight === '700'); ``` # --seed-- @@ -30,27 +36,32 @@ assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.fontSize ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Calories 230

                                                                                                                                                                                                                                                                                                                                    + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Calories

                                                                                                                                                                                                                                                                                                                                    + 230
                                                                                                                                                                                                                                                                                                                                    - +
                                                                                                                                                                                                                                                                                                                                    + ``` @@ -82,6 +93,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -93,25 +106,33 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; + font-size: 2em; + font-weight: 700; } --fcc-editable-region-- diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5fd85d0062761f288364.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5fd85d0062761f288364.md index f2ab5acc9a3..59a27643f7d 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5fd85d0062761f288364.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f5fd85d0062761f288364.md @@ -1,22 +1,22 @@ --- id: 615f5fd85d0062761f288364 -title: Крок 36 +title: Крок 37 challengeType: 0 -dashedName: step-36 +dashedName: step-37 --- # --description-- Типографіка часто є мистецтвом, а не наукою. Можливо, вам доведеться довго підлагоджувати такі речі, як вирівнювання. -Надайте селектору `.calories-info span` властивість `margin-top` зі значенням `-7px`. Це змістить ваш текст `230` на місце. +Надайте селектору `.calories-info span` властивість `margin` зі значенням `-7px -2px`. Це змістить ваш текст `230` на місце. # --hints-- -Ваш селектор `.calories-info span` повинен мати `margin-top` зі значенням `-7px`. +Ваш селектор `.calories-info span` повинен мати `margin` зі значенням `-7px -2px`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.marginTop === '-7px'); +assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.margin === '-7px -2px'); ``` # --seed-- @@ -26,27 +26,32 @@ assert(new __helpers.CSSHelp(document).getStyle('.calories-info span')?.marginTo ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Calories 230

                                                                                                                                                                                                                                                                                                                                    + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Calories

                                                                                                                                                                                                                                                                                                                                    + 230
                                                                                                                                                                                                                                                                                                                                    - +
                                                                                                                                                                                                                                                                                                                                    + ``` @@ -78,6 +83,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -89,31 +96,39 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } --fcc-editable-region-- .calories-info span { - font-size: 1.2em; + font-size: 2.4em; + font-weight: 700; } --fcc-editable-region-- ``` diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f61338c8ca176d6445574.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f61338c8ca176d6445574.md index 2a9c3d20517..007a0a3dcda 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f61338c8ca176d6445574.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f61338c8ca176d6445574.md @@ -1,13 +1,13 @@ --- id: 615f61338c8ca176d6445574 -title: Крок 37 +title: Крок 38 challengeType: 0 -dashedName: step-37 +dashedName: step-38 --- # --description-- -Під елементом `.calories-info` додайте `div` з атрибутом `class` зі значенням `divider md`. +Знизу елемента `.calories-info` додайте `div` з атрибутом `class` зі значенням `divider medium`. # --hints-- @@ -17,11 +17,11 @@ dashedName: step-37 assert(document.querySelectorAll('.label > div')?.length === 3) ``` -Ваш новий `div` повинен мати атрибут `class` зі значенням `divider md`. Цей div повинен бути останнім елементом в елементі `.label`. +Ваш новий `div` повинен мати атрибут `class` зі значенням `divider medium`. Цей div повинен бути останнім елементом в елементі `.label`. ```js const div = document.querySelector('.label')?.lastElementChild; -assert(div?.classList?.contains('divider') && div?.classList?.contains('md')); +assert(div?.classList?.contains('divider') && div?.classList?.contains('medium')); ``` # --seed-- @@ -31,30 +31,35 @@ assert(div?.classList?.contains('divider') && div?.classList?.contains('md')); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Calories 230

                                                                                                                                                                                                                                                                                                                                    + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Calories

                                                                                                                                                                                                                                                                                                                                    + 230 +
                                                                                                                                                                                                                                                                                                                                    --fcc-editable-region-- --fcc-editable-region-- -
                                                                                                                                                                                                                                                                                                                                    - +
                                                                                                                                                                                                                                                                                                                                    + ``` @@ -86,6 +91,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -97,30 +104,38 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; } ``` diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f666ac5edea782feb7e75.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f666ac5edea782feb7e75.md index 42d2c5f934e..2d39bedae6f 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f666ac5edea782feb7e75.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f666ac5edea782feb7e75.md @@ -1,26 +1,26 @@ --- id: 615f666ac5edea782feb7e75 -title: Крок 38 +title: Крок 39 challengeType: 0 -dashedName: step-38 +dashedName: step-39 --- # --description-- -Створіть селектор `.md` та надайте йому властивість `height` зі значенням `5px`. +Створіть селектор `.medium` та надайте йому властивість `height` зі значенням `5px`. # --hints-- -Ви повинні створити селектор `.md`. +Ви повинні створити селектор `.medium`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.md')); +assert(new __helpers.CSSHelp(document).getStyle('.medium')); ``` -Ваш селектор `.md` повинен мати властивість `height` зі значенням `5px`. +Ваш селектор `.medium` повинен мати властивість `height` зі значенням `5px`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.md')?.height === '5px'); +assert(new __helpers.CSSHelp(document).getStyle('.medium')?.height === '5px'); ``` # --seed-- @@ -30,28 +30,33 @@ assert(new __helpers.CSSHelp(document).getStyle('.md')?.height === '5px'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Calories 230

                                                                                                                                                                                                                                                                                                                                    + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Calories

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    + 230
                                                                                                                                                                                                                                                                                                                                    - +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + ``` @@ -83,6 +88,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -94,15 +101,11 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } @@ -111,17 +114,29 @@ p { --fcc-editable-region-- -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; } ``` diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f671b6d1919792745aa5d.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f671b6d1919792745aa5d.md index bc3c96fb103..00b86efa81b 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f671b6d1919792745aa5d.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f671b6d1919792745aa5d.md @@ -1,29 +1,29 @@ --- id: 615f671b6d1919792745aa5d -title: Крок 39 +title: Крок 40 challengeType: 0 -dashedName: step-39 +dashedName: step-40 --- # --description-- -Створіть новий елемент `div` під своїм елементом `.md`. Надайте йому атрибут `class` зі значенням `daily-value sm-text`. В цьому новому `div` додайте елемент `p` з текстом `% Daily Value *` та встановіть атрибут `class` на `right bold`. +Створіть новий елемент `div` знизу свого елемента `.medium`. Надайте йому атрибут `class` зі значенням `daily-value small-text`. В межах нового `div` додайте елемент `p` із текстом `% Daily Value *` та встановіть атрибут `class` на `bold right`. # --hints-- -Ви повинні створити новий елемент `div` після елемента `.md`. +Ви повинні створити новий елемент `div` після свого елемента `.medium`. ```js assert(document.querySelector('.label')?.lastElementChild?.localName === 'div'); assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('divider')); -assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('md')); +assert(document.querySelector('.label')?.lastElementChild?.previousElementSibling?.classList?.contains('medium')); ``` -Ваш новий `div` повинен мати атрибут `class` зі значенням `daily-value sm-text`. +Ваш новий `div` повинен мати атрибут `class` зі значенням `daily-value small-text`. ```js assert(document.querySelector('.label')?.lastElementChild?.classList?.contains('daily-value')); -assert(document.querySelector('.label')?.lastElementChild?.classList?.contains('sm-text')); +assert(document.querySelector('.label')?.lastElementChild?.classList?.contains('small-text')); ``` Ваш новий елемент `div` повинен мати елемент `p`. @@ -38,11 +38,11 @@ assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.lo assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.textContent === '% Daily Value *'); ``` -Ваш новий елемент `p` повинен мати атрибут `class` зі значенням `right bold`. +Ваш новий елемент `p` повинен мати атрибут `class` зі значенням `bold right`. ```js -assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.classList?.contains('right')); assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.classList?.contains('right')); ``` # --seed-- @@ -52,32 +52,36 @@ assert(document.querySelector('.label')?.lastElementChild?.firstElementChild?.cl ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Calories 230

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    ---fcc-editable-region-- ---fcc-editable-region-- + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Calories

                                                                                                                                                                                                                                                                                                                                    + 230
                                                                                                                                                                                                                                                                                                                                    - + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                                                    + + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                                                    + ``` @@ -109,6 +113,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -120,34 +126,42 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; } ``` diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6823d0815b7a991f2a75.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6823d0815b7a991f2a75.md index 26725b15cc6..319327c7005 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6823d0815b7a991f2a75.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6823d0815b7a991f2a75.md @@ -1,32 +1,32 @@ --- id: 615f6823d0815b7a991f2a75 -title: Крок 40 +title: Крок 42 challengeType: 0 -dashedName: step-40 +dashedName: step-42 --- # --description-- -Стилізація `float` призводить до того, що новий елемент `p` знаходиться за кордонами етикетки. Використайте наявний елемент `.divider` як приклад, щоб додати новий роздільник після елемента `p`. +Використайте наявний елемент `.divider` як приклад, щоб додати новий роздільник після елемента `p`. # --hints-- -Ви повинні створити новий `div` в елементі `.daily-value.sm-text`. +Ви повинні створити новий `div` всередині свого елемента `.daily-value`. ```js -assert(document.querySelectorAll('.daily-value.sm-text > div')?.length === 1) +assert(document.querySelectorAll('.daily-value.small-text > div')?.length === 1) ``` Ваш новий `div` повинен мати атрибут `class` зі значенням `divider`. ```js -assert(document.querySelector('.daily-value.sm-text > div')?.classList?.contains('divider')) +assert(document.querySelector('.daily-value.small-text > div')?.classList?.contains('divider')) ``` Ваш новий `div` повинен йти після елемента `p`. ```js -assert(document.querySelector('.daily-value.sm-text > div')?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text > div')?.previousElementSibling?.localName === 'p'); ``` # --seed-- @@ -36,34 +36,38 @@ assert(document.querySelector('.daily-value.sm-text > div')?.previousElementSibl ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Calories 230

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

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Calories

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

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                                                    + ``` @@ -95,6 +99,8 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { @@ -106,34 +112,46 @@ p { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } ``` diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6b2d164f81809efd9bdc.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6b2d164f81809efd9bdc.md index ed8f005be1e..0b9aa252f9d 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6b2d164f81809efd9bdc.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6b2d164f81809efd9bdc.md @@ -1,56 +1,62 @@ --- id: 615f6b2d164f81809efd9bdc -title: Крок 42 +title: Крок 43 challengeType: 0 -dashedName: step-42 +dashedName: step-43 --- # --description-- -Після останнього елемента `.divider` створіть елемент `p` та надайте йому текст `Total Fat 8g 10%`. Обгорніть `Total Fat` в елемент `span` з `class`, встановленим на `bold`. Обгорніть `10%` в інший елемент `span` з `class`, встановленим на `bold right`. +Після останнього елемента `.divider` створіть елемент `p` та надайте йому текст `Total Fat 8g 10%`. Обгорніть `Total Fat` в елемент `span` з `class`, встановленим на `bold`. Обгорніть `10%` в інший елемент `span` із `class` зі значенням `bold`. Також обгорніть слова `Total Fat 8g` в додатковий елемент `span` для вирівнювання. # --hints-- Ви повинні створити новий елемент `p` в кінці елемента `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` Ваш новий елемент `p` повинен мати текст `Total Fat 8g 10%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Total Fat 8g[\s|\n]+10%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Total Fat[\s|\n]+8g[\s|\n]+10%/)); ``` -Ваш елемент `p` повинен мати два елементи `span`. +Ваш елемент `p` повинен мати три елементи `span`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 2); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 3); ``` -Ваш перший елемент `span` повинен обгортати текст `Total Fat`. +Один елемент `span` повинен обгортати текст `Total Fat`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.innerText === 'Total Fat'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span > span')?.innerText === 'Total Fat'); ``` -Ваш перший елемент `span` повинен мати `class` зі значенням `bold`. +Елемент `span` навколо `Total Fat` повинен мати `class` зі значенням `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.className === 'bold'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span > span')?.className === 'bold'); ``` -Ваш другий елемент `span` повинен обгортати текст `10%`. +Елемент `span` повинен обгортати текст `10%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.[1]?.innerText === '10%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span + span')?.innerText === '10%'); ``` -Ваш другий елемент `span` повинен мати `class` зі значенням `bold right`. +Елемент `span` навколо `10%` повинен мати `class` зі значенням `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.[1]?.className === 'bold right'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.[1]?.className === 'bold'); +``` + +Елемент `span` повинен мати текст `Total Fat 8g`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Total Fat[\s|\n]+8g/)); ``` # --seed-- @@ -60,35 +66,39 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySe ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Calories 230

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    ---fcc-editable-region-- ---fcc-editable-region-- + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Calories

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

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                                                    + ``` @@ -120,46 +130,59 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } ``` diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6cc778f7698258467596.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6cc778f7698258467596.md index 3d7b936d494..8cda988aaca 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6cc778f7698258467596.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6cc778f7698258467596.md @@ -1,46 +1,45 @@ --- id: 615f6cc778f7698258467596 -title: Крок 43 +title: Крок 44 challengeType: 0 -dashedName: step-43 +dashedName: step-44 --- # --description-- -Під елементом з текстом `Total Fat` створіть новий елемент `p` з текстом `Saturated Fat 1g 5%`. Обгорніть `5%` в `span` з атрибутом `class`, встановленим на `bold right`. +Під елементом з текстом `Total Fat` створіть новий елемент `p` з текстом `Saturated Fat 1g 5%`. Обгорніть `5%` в `span` з атрибутом `class`, встановленим на `bold`. У такому випадку цього достатньо, щоб вирівняти відсотки до `5%`. # --hints-- Ви повинні створити новий елемент `p` під елементом з текстом `Total Fat`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.innerText.match(/Total Fat 8g\s*10%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.innerText.match(/Total Fat 8g\s*10%/)); ``` Ваш новий елемент `p` повинен мати текст `Saturated Fat 1g 5%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText.match(/Saturated Fat 1g\s*5%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText.match(/Saturated Fat 1g\s*5%/)); ``` Ваш новий елемент `p` повинен мати елемент `span`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.localName === 'span'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.localName === 'span'); ``` -Ваш елемент `span` повинен мати атрибут `class` зі значенням `bold right`. +Ваш елемент `span` повинен мати атрибут `class` зі значенням `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); ``` Ваш елемент `span` повинен обгортати текст `5%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.innerText === "5%"); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === "5%"); ``` # --seed-- @@ -50,36 +49,40 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastEle ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Calories 230

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g10%

                                                                                                                                                                                                                                                                                                                                    ---fcc-editable-region-- ---fcc-editable-region-- + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Calories

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

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                                                    + ``` @@ -111,46 +114,59 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } ``` diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6fddaac1e083502d3e6a.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6fddaac1e083502d3e6a.md index 49f16ab74ff..de275763b64 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6fddaac1e083502d3e6a.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f6fddaac1e083502d3e6a.md @@ -1,8 +1,8 @@ --- id: 615f6fddaac1e083502d3e6a -title: Крок 44 +title: Крок 45 challengeType: 0 -dashedName: step-44 +dashedName: step-45 --- # --description-- @@ -14,7 +14,7 @@ dashedName: step-44 Ваш елемент `p` з текстом `Saturated Fat 1g 5%` повинен мати атрибут `class` зі значенням `indent`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('indent')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('indent')); ``` # --seed-- @@ -24,36 +24,41 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Calories 230

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g10%

                                                                                                                                                                                                                                                                                                                                    ---fcc-editable-region-- -

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Calories

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

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                                                    + ``` @@ -85,46 +90,59 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } ``` diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f70077a4ff98424236c1e.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f70077a4ff98424236c1e.md index f5642826e19..11c79274d1c 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f70077a4ff98424236c1e.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f70077a4ff98424236c1e.md @@ -1,8 +1,8 @@ --- id: 615f70077a4ff98424236c1e -title: Крок 45 +title: Крок 46 challengeType: 0 -dashedName: step-45 +dashedName: step-46 --- # --description-- @@ -30,34 +30,39 @@ assert(new __helpers.CSSHelp(document).getStyle('.indent')?.marginLeft === '1em' ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Calories 230

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g10%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Calories

                                                                                                                                                                                                                                                                                                                                    + 230
                                                                                                                                                                                                                                                                                                                                    - +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + ``` @@ -89,47 +94,60 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } --fcc-editable-region-- diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f72a872354a850d4f533e.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f72a872354a850d4f533e.md index b28a6970663..32ca77ef604 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f72a872354a850d4f533e.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f72a872354a850d4f533e.md @@ -1,8 +1,8 @@ --- id: 615f72a872354a850d4f533e -title: Крок 46 +title: Крок 47 challengeType: 0 -dashedName: step-46 +dashedName: step-47 --- # --description-- @@ -30,34 +30,39 @@ assert(new __helpers.CSSHelp(document).getStyle('.daily-value p')?.borderBottom ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Calories 230

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g10%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Calories

                                                                                                                                                                                                                                                                                                                                    + 230
                                                                                                                                                                                                                                                                                                                                    - +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + ``` @@ -89,47 +94,60 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f74a71f1e498619e38ee8.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f74a71f1e498619e38ee8.md index 501dd2cf273..3c83225876b 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f74a71f1e498619e38ee8.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f74a71f1e498619e38ee8.md @@ -1,8 +1,8 @@ --- id: 615f74a71f1e498619e38ee8 -title: Крок 47 +title: Крок 48 challengeType: 0 -dashedName: step-47 +dashedName: step-48 --- # --description-- @@ -14,16 +14,15 @@ dashedName: step-47 Ваш елемент `p` з текстом `% Daily Value *` повинен мати `no-divider`, доданий до атрибута `class`. Не видаляйте наявні класи. ```js -const p = document.querySelector('.daily-value.sm-text')?.firstElementChild; +const p = document.querySelector('.daily-value.small-text')?.firstElementChild; assert(p?.classList?.contains('no-divider')); assert(p?.classList?.contains('bold')); -assert(p?.classList?.contains('right')); ``` Ваш елемент `p` з текстом `Saturated Fat 1g 5%` повинен мати `no-divider`, доданий до атрибута `class`. Не видаляйте наявні класи. ```js -const p = document.querySelector('.daily-value.sm-text')?.lastElementChild; +const p = document.querySelector('.daily-value.small-text')?.lastElementChild; assert(p?.classList?.contains('no-divider')); assert(p?.classList?.contains('indent')); ``` @@ -35,36 +34,41 @@ assert(p?.classList?.contains('indent')); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Calories 230

                                                                                                                                                                                                                                                                                                                                    + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Calories

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

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g10%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

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

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                                                    + ``` @@ -96,47 +100,60 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ad94380408d971d14f6.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ad94380408d971d14f6.md index b9135bf64a9..dcc9b7ac2e4 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ad94380408d971d14f6.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ad94380408d971d14f6.md @@ -1,8 +1,8 @@ --- id: 615f7ad94380408d971d14f6 -title: Крок 48 +title: Крок 49 challengeType: 0 -dashedName: step-48 +dashedName: step-49 --- # --description-- @@ -44,37 +44,43 @@ assert(style?.borderBottom === '1px solid rgb(136, 137, 137)'); ## --seed-contents-- + ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Calories 230

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g10%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Calories

                                                                                                                                                                                                                                                                                                                                    + 230
                                                                                                                                                                                                                                                                                                                                    - +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + ``` @@ -106,47 +112,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7bc680f7168ea01ebf99.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7bc680f7168ea01ebf99.md index 3cd3efa3922..140e38f78fc 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7bc680f7168ea01ebf99.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7bc680f7168ea01ebf99.md @@ -1,8 +1,8 @@ --- id: 615f7bc680f7168ea01ebf99 -title: Крок 49 +title: Крок 50 challengeType: 0 -dashedName: step-49 +dashedName: step-50 --- # --description-- @@ -13,16 +13,16 @@ dashedName: step-49 # --hints-- -Ви повинні створити новий `div` в кінці елемента `.daily-value.sm-text`. +Ви повинні створити новий `div` в кінці свого елемента `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` Ваш новий `div` повинен мати атрибут `class` зі значенням `divider`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -32,36 +32,41 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Calories 230

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

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g10%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Calories

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

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                                                    + ``` @@ -93,47 +98,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7c71eab8218f846e4503.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7c71eab8218f846e4503.md index 3d74f48c301..1ba34d02e4d 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7c71eab8218f846e4503.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7c71eab8218f846e4503.md @@ -1,32 +1,32 @@ --- id: 615f7c71eab8218f846e4503 -title: Крок 50 +title: Крок 51 challengeType: 0 -dashedName: step-50 +dashedName: step-51 --- # --description-- -Після останнього `.divider` створіть інший елемент `p` з текстом `Trans Fat 0g`. Виділіть слово `Trans` курсивом, обгорнувши його елементом `i`. Надайте новому елементу `p` атрибут `class` зі значенням `indent no-divider`. +Після останнього `.divider` створіть інший елемент `p` з текстом `Trans Fat 0g`. Виділіть слово `Trans` курсивом, обгорнувши його елементом `i`. Надайте новому елементу `p` атрибут `class` зі значенням `indent no-divider`. Обгорніть `Trans Fat 0g` в елемент `span` для вирівнювання. # --hints-- -Ви повинні створити новий елемент `p` в кінці елемента `.daily-value.sm-text`. +Ви повинні створити новий елемент `p` в кінці свого елемента `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` Ваш новий елемент `p` повинен мати текст `Trans Fat 0g`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText === 'Trans Fat 0g'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText === 'Trans Fat 0g'); ``` Ваш новий елемент `p` повинен мати атрибут `class` зі значенням `indent no-divider`. ```js -const p = document.querySelector('.daily-value.sm-text')?.lastElementChild; +const p = document.querySelector('.daily-value.small-text')?.lastElementChild; assert(p?.classList?.contains('indent')); assert(p?.classList?.contains('no-divider')); ``` @@ -34,13 +34,25 @@ assert(p?.classList?.contains('no-divider')); Ваш новий елемент `p` повинен мати елемент `i`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.localName === 'i'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('i')); ``` Ваш елемент `i` повинен обгортати текст `Trans`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.innerText === 'Trans'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('i')?.innerText === 'Trans'); +``` + +Ваш новий елемент `p` повинен мати елемент `span`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span')); +``` + +Ваш елемент `span` повинен обгортати текст `Trans Fat 0g`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span')?.innerText?.match(/Trans[\s|\n]+Fat 0g/)); ``` # --seed-- @@ -50,37 +62,42 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstEl ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Calories 230

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

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g10%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Calories

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

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                                                    + ``` @@ -112,47 +129,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7d489a581590d1350288.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7d489a581590d1350288.md index a108104e578..cbf392ce538 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7d489a581590d1350288.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7d489a581590d1350288.md @@ -1,8 +1,8 @@ --- id: 615f7d489a581590d1350288 -title: Крок 51 +title: Крок 52 challengeType: 0 -dashedName: step-51 +dashedName: step-52 --- # --description-- @@ -11,16 +11,16 @@ dashedName: step-51 # --hints-- -Ви повинні створити новий елемент `div` в кінці елемента `.daily-value.sm-text`. +Ви повинні створити новий елемент `div` в кінці свого елемента `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` Ваш новий елемент `div` повинен мати атрибут `class` зі значенням `divider`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -30,38 +30,43 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Calories 230

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

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g10%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Trans Fat 0g

                                                                                                                                                                                                                                                                                                                                    ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Calories

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

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Trans Fat 0g

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                                                    + ``` @@ -93,47 +98,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7de4487b64919bb4aa5e.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7de4487b64919bb4aa5e.md index 0b87d5e8353..ebe6c696724 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7de4487b64919bb4aa5e.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7de4487b64919bb4aa5e.md @@ -1,57 +1,62 @@ --- id: 615f7de4487b64919bb4aa5e -title: Крок 52 +title: Крок 53 challengeType: 0 -dashedName: step-52 +dashedName: step-53 --- # --description-- -Після останнього `.divider` створіть новий елемент `p` з текстом `Cholesterol 0mg 0%`. Обгорніть текст `Cholesterol` в елемент `span` та надайте цьому елементу `span` атрибут `class` зі значенням `bold`. Обгорніть текст `0%` в інший елемент `span` з `class`, встановленим на `bold right`. +Після останнього `.divider` створіть новий елемент `p` з текстом `Cholesterol 0mg 0%`. Обгорніть текст `Cholesterol` в елемент `span` та надайте цьому елементу `span` атрибут `class` зі значенням `bold`. Обгорніть текст `0%` в інший елемент `span` з `class` зі значенням `bold`. Також обгорніть `Cholesterol 0mg` в додатковий елемент `span` для вирівнювання. # --hints-- -Ви повинні створити новий елемент `p` в кінці елемента `.daily-value.sm-text`. +Ви повинні створити новий елемент `p` в кінці свого елемента `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` Ваш новий елемент `p` повинен мати текст `Cholesterol 0mg 0%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Cholesterol 0mg[\s|\n]+0%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Cholesterol[\s|\n]+0mg[\s|\n]+0%/)); ``` -Ваш елемент `p` повинен мати два елементи `span`. +Ваш новий елемент `p` повинен мати три елементи `span`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 2); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 3); ``` -Ваш перший елемент `span` повинен мати атрибут `class` зі значенням `bold`. +Ваш перший елемент `span` `Cholesterol` повинен мати атрибут `class` зі значенням `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.classList?.contains('bold')); +``` + +Ваш перший елемент `span` повинен обгортати текст `Cholesterol 0mg`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.innerText?.match(/Cholesterol[\s|\n]+0mg/)); ``` Ваш перший елемент `span` повинен обгортати текст `Cholesterol`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.innerText === 'Cholesterol'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.innerText === 'Cholesterol'); ``` -Ваш другий елемент `span` повинен мати атрибут `class` зі значенням `bold right`. +Ваш другий елемент `span` повинен мати атрибут `class` зі значенням `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); ``` Ваш другий елемент `span` повинен обгортати текст `0%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.innerText === '0%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === '0%'); ``` # --seed-- @@ -61,39 +66,44 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastEle ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Calories 230

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

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g10%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Trans Fat 0g

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Calories

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

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Trans Fat 0g

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                                                    + ``` @@ -125,47 +135,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7e7281626a92bbd62da8.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7e7281626a92bbd62da8.md index 40d36e5b107..52764fb9cb0 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7e7281626a92bbd62da8.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7e7281626a92bbd62da8.md @@ -1,57 +1,62 @@ --- id: 615f7e7281626a92bbd62da8 -title: Крок 53 +title: Крок 54 challengeType: 0 -dashedName: step-53 +dashedName: step-54 --- # --description-- -Під останнім елементом `p` створіть ще один елемент `p` з текстом `Sodium 160mg 7%`. Оберніть текст `Sodium` в елемент `span` з атрибутом `class`, встановленим на `bold`. Оберніть текст `7%` в інший елемент `span` з `class`, встановленим на `bold right`. +Під останнім елементом `p` створіть ще один елемент `p` з текстом `Sodium 160mg 7%`. Оберніть текст `Sodium` в елемент `span` з атрибутом `class`, встановленим на `bold`. Оберніть текст `7%` в інший елемент `span` з `class` зі значенням `bold`. Також додайте додатковий елемент `span` навколо `Sodium 160mg` для правильного вирівнювання. # --hints-- -Ви повинні створити новий елемент `p` в кінці елемента `.daily-value.sm-text`. +Ви повинні створити новий елемент `p` в кінці свого елемента `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` Ваш новий елемент `p` повинен мати текст `Sodium 160mg 7%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Sodium 160mg[\s|\n]+7%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Sodium[\s|\n]160mg[\s|\n]+7%/)); ``` -Ваш новий елемент `p` повинен мати два елементи `span`. +Ваш новий елемент `p` повинен мати три елементи `span`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 2); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 3); ``` -Ваш перший елемент `span` повинен мати атрибут `class` зі значенням `bold`. +Елемент `span` повинен обгортати текст `Sodium 360mg`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.innerText?.match(/Sodium[\s|\n]160mg/)); ``` -Ваш перший елемент `span` повинен обгортати текст `Sodium`. +Елемент `span` повинен обгортати текст `Sodium`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.innerText === 'Sodium'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.innerText === "Sodium"); ``` -Ваш другий елемент `span` повинен мати атрибут `class` зі значенням `bold right`. +`span` навколо `Sodium` повинен мати атрибут `class` зі значенням `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.classList?.contains('bold')); ``` -Ваш другий елемент `span` повинен обгортати текст `7%`. +Елемент `span` повинен обгортати текст `7%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.innerText === '7%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === '7%'); +``` + +Елемент `span` навколо `7%` повинен мати атрибут `class` зі значенням `bold`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); ``` # --seed-- @@ -61,40 +66,45 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastEle ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Calories 230

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

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g10%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Trans Fat 0g

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                                                    ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Calories

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

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Trans Fat 0g

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                                                    + ``` @@ -126,47 +136,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ecb09de9a938ef94756.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ecb09de9a938ef94756.md index 6c9fdd3f507..afb04c47b44 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ecb09de9a938ef94756.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7ecb09de9a938ef94756.md @@ -1,57 +1,68 @@ --- id: 615f7ecb09de9a938ef94756 -title: Крок 54 +title: Крок 55 challengeType: 0 -dashedName: step-54 +dashedName: step-55 --- # --description-- -Додайте ще один елемент `p` з текстом `Total Carbohydrate 37g 13%`. Як і раніше, використайте елементи `span`, щоб зробити текст `Total Carbohydrate` жирним, а текст `13%` жирним та вирівняним за правим краєм. +Додайте ще один елемент `p` з текстом `Total Carbohydrate 37g 13%`. Як і раніше, використайте елементи `span`, щоб зробити шрифт текстів `Total Carbohydrate` та `13%` жирним. Також додайте додатковий елемент `span`, щоб обгорнути текст `Total Carbohydrate 37g` в елемент span, щоб вирівняти його за лівим краєм, а `13%` – за правим. # --hints-- -Ви повинні створити новий елемент `p` в кінці елемента `.daily-value.sm-text`. +Ви повинні створити новий елемент `p` в кінці свого елемента `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` Ваш новий елемент `p` повинен мати текст `Total Carbohydrate 37g 13%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Total Carbohydrate 37g[\s|\n]+13%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Total Carbohydrate[\s|\n]+37g[\s|\n]+13%/)); ``` -Ваш новий елемент `p` повинен мати два елементи `span`. +Ваш новий елемент `p` повинен мати три елементи `span`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 2); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 3); ``` -Ваш перший елемент `span` повинен мати атрибут `class` зі значенням `bold`. +Один елемент `span` повинен обгортати текст `Total Carbohydrate 37g`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.innerText?.match(/Total Carbohydrate[\s|\n]+37g/)); ``` -Ваш перший елемент `span` повинен обгортати текст `Total Carbohydrate`. +Один елемент `span` повинен обгортати текст `Total Carbohydrate`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.innerText === 'Total Carbohydrate'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.innerText === 'Total Carbohydrate'); ``` -Ваш другий елемент `span` повинен мати атрибут `class` зі значенням `bold right`. +Елемент `span` навколо `Total Carbohydrate` повинен мати атрибут `class` зі значенням `bold`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.firstElementChild?.classList?.contains('bold')); +``` + +Елемент `span` повинен обгортати текст `13%`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === '13%'); +``` + +Елемент `span` навколо `13%` повинен мати атрибут `class` зі значенням `bold`. + +```js +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.classList?.contains('bold')); ``` Ваш другий елемент `span` повинен обгортати текст `13%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastElementChild?.innerText === '13%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.lastElementChild?.innerText === '13%'); ``` # --seed-- @@ -61,41 +72,46 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.lastEle ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Calories 230

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

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g10%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Trans Fat 0g

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                                                    ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Calories

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

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Trans Fat 0g

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                                                    + ``` @@ -127,47 +143,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7fa959ab75948f96a0d6.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7fa959ab75948f96a0d6.md index 72273d25c88..7d9f5e2823c 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7fa959ab75948f96a0d6.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f7fa959ab75948f96a0d6.md @@ -1,8 +1,8 @@ --- id: 615f7fa959ab75948f96a0d6 -title: Крок 55 +title: Крок 56 challengeType: 0 -dashedName: step-55 +dashedName: step-56 --- # --description-- @@ -11,30 +11,30 @@ dashedName: step-55 # --hints-- -Ви повинні створити нові елементи `p` та `div` в кінці елемента `.daily-value.sm-text`. +Ви повинні створити новий елемент `p` та новий `div` в кінці свого елемента `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` Ваш новий елемент `p` повинен мати текст `Dietary Fiber 4g`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.innerText.match(/Dietary Fiber[\s|\n]+4g/)); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.innerText.match(/Dietary Fiber[\s|\n]+4g/)); ``` Ваш новий елемент `p` повинен мати атрибут `class` зі значенням `indent no-divider`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('indent')); -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('indent')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('no-divider')); ``` Ваш новий `div` повинен мати атрибут `class` зі значенням `divider`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -44,42 +44,47 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Calories 230

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

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g10%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Trans Fat 0g

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                                                    ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Calories

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

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Trans Fat 0g

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                                                    + ``` @@ -111,47 +116,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f808d85793195b0f53be9.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f808d85793195b0f53be9.md index dcefb780e41..6670cac5b1d 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f808d85793195b0f53be9.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f808d85793195b0f53be9.md @@ -1,8 +1,8 @@ --- id: 615f808d85793195b0f53be9 -title: Крок 56 +title: Крок 57 challengeType: 0 -dashedName: step-56 +dashedName: step-57 --- # --description-- @@ -11,30 +11,30 @@ dashedName: step-56 # --hints-- -Ви повинні створити нові елементи `p` та `div` в кінці елемента `.daily-value.sm-text`. +Ви повинні створити новий елемент `p` та новий `div` в кінці свого елемента `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` Ваш новий елемент `p` повинен мати текст `Total Sugars 12g`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.innerText.match(/Total Sugars[\s|\n]+12g/)); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.innerText.match(/Total Sugars[\s|\n]+12g/)); ``` Ваш новий елемент `p` повинен мати атрибут `class` зі значенням `indent no-divider`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('indent')); -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('indent')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('no-divider')); ``` Ваш новий `div` повинен мати атрибут `class` зі значенням `divider`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -44,44 +44,49 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Calories 230

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

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g10%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Trans Fat 0g

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Calories

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

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Trans Fat 0g

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                                                    + ``` @@ -113,47 +118,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f829d07b18f96f6f6684b.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f829d07b18f96f6f6684b.md index bb8b15cfa17..2af041bc5d4 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f829d07b18f96f6f6684b.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f829d07b18f96f6f6684b.md @@ -1,21 +1,21 @@ --- id: 615f829d07b18f96f6f6684b -title: Крок 57 +title: Крок 58 challengeType: 0 -dashedName: step-57 +dashedName: step-58 --- # --description-- -Перевага створення цих роздільників полягає в тому, що ви можете застосувати певні класи для індивідуальної стилізації. Додайте `dbl-indent` до `class` вашого останнього `.divider`. +Перевага створення цих роздільників полягає в тому, що ви можете застосувати певні класи для індивідуальної стилізації. Додайте `double-indent` до `class` вашого останнього `.divider`. # --hints-- -Ваш останній елемент `.divider` повинен мати `dbl-indent`, доданий до `class`. Не видаляйте наявне значення. +Ваш останній елемент `.divider` повинен мати `double-indent`, доданий до `class`. Не видаляйте наявне значення. ```js -const last = document.querySelector('.daily-value.sm-text')?.lastElementChild; -assert(last?.classList?.contains('dbl-indent')); +const last = document.querySelector('.daily-value.small-text')?.lastElementChild; +assert(last?.classList?.contains('double-indent')); assert(last?.classList?.contains('divider')); ``` @@ -26,46 +26,51 @@ assert(last?.classList?.contains('divider')); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Calories 230

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

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g10%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Trans Fat 0g

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Sugars 12g

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Calories

                                                                                                                                                                                                                                                                                                                                    + 230
                                                                                                                                                                                                                                                                                                                                    - +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Trans Fat 0g

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Sugars 12g

                                                                                                                                                                                                                                                                                                                                    + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                                                    + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + ``` @@ -97,47 +102,61 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f83ef928ec9982b785b6a.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f83ef928ec9982b785b6a.md index 44ca7c9e6da..c4d10b73ce5 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f83ef928ec9982b785b6a.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f83ef928ec9982b785b6a.md @@ -1,26 +1,26 @@ --- id: 615f83ef928ec9982b785b6a -title: Крок 58 +title: Крок 59 challengeType: 0 -dashedName: step-58 +dashedName: step-59 --- # --description-- -Створіть селектор `.dbl-indent` та надайте йому ліве поле зі значенням `2em`. +Створіть селектор `.double-indent` та надайте йому ліве поле зі значенням `2em`. # --hints-- -Ви повинні мати новий селектор `.dbl-indent`. +Ви повинні мати новий селектор `.double-indent`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.dbl-indent')); +assert(new __helpers.CSSHelp(document).getStyle('.double-indent')); ``` -Ваш селектор `.dbl-indent` повинен мати властивість `margin-left` зі значенням `2em`. +Ваш селектор `.double-indent` повинен мати властивість `margin-left` зі значенням `2em`. ```js -assert(new __helpers.CSSHelp(document).getStyle('.dbl-indent')?.marginLeft === '2em'); +assert(new __helpers.CSSHelp(document).getStyle('.double-indent')?.marginLeft === '2em'); ``` # --seed-- @@ -30,44 +30,49 @@ assert(new __helpers.CSSHelp(document).getStyle('.dbl-indent')?.marginLeft === ' ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Calories 230

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g10%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Trans Fat 0g

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Sugars 12g

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Calories

                                                                                                                                                                                                                                                                                                                                    + 230
                                                                                                                                                                                                                                                                                                                                    - +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Trans Fat 0g

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Sugars 12g

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + ``` @@ -99,56 +104,70 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } ---fcc-editable-region-- +--fcc-editable-region-- ---fcc-editable-region-- +--fcc-editable-region-- .daily-value p:not(.no-divider) { border-bottom: 1px solid #888989; diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f84f246e8ba98e3cd97be.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f84f246e8ba98e3cd97be.md index f3523b53d3e..ca41d5718c1 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f84f246e8ba98e3cd97be.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f84f246e8ba98e3cd97be.md @@ -1,61 +1,60 @@ --- id: 615f84f246e8ba98e3cd97be -title: Крок 59 +title: Крок 60 challengeType: 0 -dashedName: step-59 +dashedName: step-60 --- # --description-- -Під елементом `.dbl-indent` додайте новий елемент `p` з текстом `Includes 10g Added Sugars 20%`. Ваш новий елемент `p` також повинен мати подвійний відступ та не мати нижнього кордону. Використайте `span`, щоб зробити `20%` жирним та вирівняним за правим краєм. +Знизу елемента `.double-indent` додайте новий елемент `p` з текстом `Includes 10g Added Sugars 20%`. Ваш новий елемент `p` також повинен мати подвійний відступ та не мати нижнього кордону. Використайте `span`, щоб зробити `20%` жирним та вирівняним за правим краєм. Потім створіть ще один роздільник після цього елемента `p`. # --hints-- -Ви повинні створити нові елементи `p` та `div` в кінці елемента `.daily-value.sm-text`. +Ви повинні створити новий елемент `p` та новий `div` в кінці свого елемента `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` Ваш новий елемент `p` повинен мати текст `Includes 10g Added Sugars 20%`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.innerText.match(/Includes 10g Added Sugars[\s|\n]+20%/)); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.innerText.match(/Includes 10g Added Sugars[\s|\n]+20%/)); ``` -Ваш новий елемент `p` повинен мати атрибут `class` зі значенням `dbl-indent no-divider`. +Ваш новий елемент `p` повинен мати атрибут `class` зі значенням `double-indent no-divider`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('dbl-indent')); -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('double-indent')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('no-divider')); ``` Ваш новий елемент `p` повинен мати елемент `span`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.firstElementChild?.localName === 'span'); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.firstElementChild?.localName === 'span'); ``` -Ваш елемент `span` повинен мати атрибут `class` зі значенням `bold right`. +Ваш елемент `span` повинен мати атрибут `class` зі значенням `bold`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.firstElementChild?.classList?.contains('bold')); -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.firstElementChild?.classList?.contains('right')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.firstElementChild?.classList?.contains('bold')); ``` Ваш елемент `span` повинен обгортати текст `20%`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type span')?.innerText === '20%'); +assert(document.querySelector('.daily-value.small-text p:last-of-type span')?.innerText === '20%'); ``` Ваш новий `div` повинен мати атрибут `class` зі значенням `divider`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); ``` # --seed-- @@ -65,46 +64,51 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Calories 230

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

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g10%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Trans Fat 0g

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Sugars 12g

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Calories

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

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Trans Fat 0g

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Sugars 12g

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                                                    + ``` @@ -136,54 +140,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f887466db4ba14b5342cc.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f887466db4ba14b5342cc.md index 990fc1cd75a..d76a1c1efdb 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f887466db4ba14b5342cc.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f887466db4ba14b5342cc.md @@ -1,8 +1,8 @@ --- id: 615f887466db4ba14b5342cc -title: Крок 60 +title: Крок 61 challengeType: 0 -dashedName: step-60 +dashedName: step-61 --- # --description-- @@ -13,30 +13,30 @@ dashedName: step-60 # --hints-- -Ви повинні створити нові елементи `p` та `div` в кінці вашого елемента `.daily-value.sm-text`. +Ви повинні створити новий елемент `p` та новий `div` в кінці свого елемента `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'div'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'div'); ``` Ваш новий елемент `p` повинен мати текст `Protein 3g`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.innerText.match(/Protein[\s|\n]+3g/)); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.innerText.match(/Protein[\s|\n]+3g/)); ``` Ваш новий елемент `p` повинен мати атрибут `class` зі значенням `no-divider`. ```js -assert(document.querySelector('.daily-value.sm-text p:last-of-type')?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text p:last-of-type')?.classList?.contains('no-divider')); ``` -Ваш новий `div` повинен мати атрибут `class` зі значенням `divider lg`. +Ваш новий `div` повинен мати атрибут `class` зі значенням `divider large`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('divider')); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('lg')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('large')); ``` # --seed-- @@ -46,48 +46,53 @@ assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classLi ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Calories 230

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

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g10%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Trans Fat 0g

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Sugars 12g

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Includes 10g Added Sugars 20% -

                                                                                                                                                                                                                                                                                                                                    ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Calories

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

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Trans Fat 0g

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Sugars 12g

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Includes 10g Added Sugars 20% +

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                                                    + ``` @@ -119,54 +124,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f89e055040ba294719d2f.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f89e055040ba294719d2f.md index 92b6b46958a..b1f5bb1366c 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f89e055040ba294719d2f.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f89e055040ba294719d2f.md @@ -1,39 +1,40 @@ --- id: 615f89e055040ba294719d2f -title: Крок 61 +title: Крок 62 challengeType: 0 -dashedName: step-61 +dashedName: step-62 --- # --description-- -Створіть інший елемент `p` під вашим великим роздільником. Надайте елементу `p` текст `Vitamin D 2mcg 10%`. Використайте `span`, щоб вирівняти `10%` за правим краєм, але не робіть його жирним. +Створіть інший елемент `p` під вашим великим роздільником. Надайте елементу `p` текст `Vitamin D 2mcg 10%`. + +Елемент `p` містить лише текст, а відсотки можна обгорнути в елементі `span`, щоб вони розглядались окремо від решти тексту та переміщувались праворуч. # --hints-- -Ви повинні створити новий елемент `p` в кінці елемента `.daily-value.sm-text`. +Ви повинні створити новий елемент `p` в кінці свого елемента `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` Ваш новий елемент `p` повинен мати текст `Vitamin D 2mcg 10%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Vitamin D 2mcg[\s|\n]+10%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Vitamin D 2mcg[\s|\n]+10%/)); ``` Ваш новий елемент `p` повинен мати елемент `span`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 1); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 1); ``` -Ваш елемент `span` повинен мати `class` зі значенням `right`. Пам’ятайте: не застосовуйте жирний шрифт. +Ваш елемент `span` не повинен бути жирним. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.classList?.contains('right')); -assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.classList?.contains('bold')); +assert(!document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span')?.classList?.contains('bold')); ``` # --seed-- @@ -43,50 +44,55 @@ assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.queryS ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Calories 230

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

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g10%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Trans Fat 0g

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Sugars 12g

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Includes 10g Added Sugars 20% -

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Protein 3g

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Calories

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

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Trans Fat 0g

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Sugars 12g

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Includes 10g Added Sugars 20% +

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Protein 3g

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                                                    + ``` @@ -118,54 +124,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8bfe0f30a1a3c340356b.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8bfe0f30a1a3c340356b.md index 0fdcdd5abc4..81b82480acc 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8bfe0f30a1a3c340356b.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8bfe0f30a1a3c340356b.md @@ -1,8 +1,8 @@ --- id: 615f8bfe0f30a1a3c340356b -title: Крок 62 +title: Крок 63 challengeType: 0 -dashedName: step-62 +dashedName: step-63 --- # --description-- @@ -11,55 +11,53 @@ dashedName: step-62 # --hints-- -Ви повинні створити два нові елементи `p` в кінці елемента `.daily-value.sm-text`. +Ви повинні створити два нових елементи `p` в кінці свого елемента `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.localName === 'p'); ``` Ваш перший новий елемент `p` повинен мати текст `Calcium 260mg 20%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.innerText?.match(/Calcium 260mg[\s|\n]+20%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.innerText?.match(/Calcium 260mg[\s|\n]+20%/)); ``` Ваш перший новий елемент `p` повинен мати елемент `span`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.localName === 'span'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.localName === 'span'); ``` -Ваш перший елемент `span` повинен мати атрибут `class` зі значенням `right`. Пам’ятайте: не застосовуйте жирний шрифт. +Ваш перший елемент `span` не повинен бути жирним. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.classList?.contains('right')); -assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.classList?.contains('bold')); +assert(!document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.classList?.contains('bold')); ``` Ваш перший елемент `span` повинен обгортати текст `20%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.innerText === '20%'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.previousElementSibling?.firstElementChild?.innerText === '20%'); ``` Ваш другий новий елемент `p` повинен мати текст `Iron 8mg 45%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Iron 8mg[\s|\n]+45%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Iron 8mg[\s|\n]+45%/)); ``` Ваш другий новий елемент `p` повинен мати елемент `span`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.localName === 'span'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.localName === 'span'); ``` -Ваш другий елемент `span` повинен мати атрибут `class` зі значенням `right`. Пам’ятайте: не застосовуйте жирний шрифт. +Ваш другий елемент `span` не повинен бути жирним. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('right')); -assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); +assert(!document.querySelector('.daily-value.small-text')?.lastElementChild?.firstElementChild?.classList?.contains('bold')); ``` # --seed-- @@ -69,51 +67,56 @@ assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.firstE ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Calories 230

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

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g10%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Trans Fat 0g

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Sugars 12g

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Includes 10g Added Sugars 20% -

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Protein 3g

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Vitamin D 2mcg 10%

                                                                                                                                                                                                                                                                                                                                    ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Calories

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

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Trans Fat 0g

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Sugars 12g

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Includes 10g Added Sugars 20% +

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Protein 3g

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Vitamin D 2mcg 10%

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                                                    + ``` @@ -145,54 +148,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8f1223601fa546e93f31.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8f1223601fa546e93f31.md index 3542e3cb055..9baf357eaed 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8f1223601fa546e93f31.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f8f1223601fa546e93f31.md @@ -1,8 +1,8 @@ --- id: 615f8f1223601fa546e93f31 -title: Крок 63 +title: Крок 64 challengeType: 0 -dashedName: step-63 +dashedName: step-64 --- # --description-- @@ -11,35 +11,34 @@ dashedName: step-63 # --hints-- -Ви повинні створити новий елемент `p` в кінці елемента `.daily-value.sm-text`. +Ви повинні створити новий елемент `p` в кінці свого елемента `.daily-value`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.localName === 'p'); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.localName === 'p'); ``` Ваш новий елемент `p` повинен мати атрибут `class` зі значенням `no-divider`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.classList?.contains('no-divider')); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.classList?.contains('no-divider')); ``` Ваш новий елемент `p` повинен мати текст `Potassium 235mg 6%`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.innerText?.match(/Potassium 235mg[\s|\n]+6%/)); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.innerText?.match(/Potassium 235mg[\s|\n]+6%/)); ``` Ваш новий елемент `p` повинен мати елемент `span`. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelectorAll('span')?.length === 1); +assert(document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelectorAll('span')?.length === 1); ``` -Ваш елемент `span` повинен мати `class` зі значенням `right`. Пам’ятайте: не застосовуйте жирний шрифт. +Ваш елемент `span` не повинен бути жирним. ```js -assert(document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.classList?.contains('right')); -assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.querySelector('span')?.classList?.contains('bold')); +assert(!document.querySelector('.daily-value.small-text')?.lastElementChild?.querySelector('span')?.classList?.contains('bold')); ``` # --seed-- @@ -49,53 +48,58 @@ assert(!document.querySelector('.daily-value.sm-text')?.lastElementChild?.queryS ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Calories 230

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

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g10%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Trans Fat 0g

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Sugars 12g

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Includes 10g Added Sugars 20% -

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Protein 3g

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Vitamin D 2mcg 10%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Calcium 260mg 20%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Iron 8mg 45%

                                                                                                                                                                                                                                                                                                                                    ---fcc-editable-region-- + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Calories

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

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Trans Fat 0g

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Sugars 12g

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Includes 10g Added Sugars 20% +

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Protein 3g

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Vitamin D 2mcg 10%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Calcium 260mg 20%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Iron 8mg 45%

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                                                    + ``` @@ -127,54 +131,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f905fbd1017a65ca224eb.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f905fbd1017a65ca224eb.md index 536b2bba6f9..a52e148ae80 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f905fbd1017a65ca224eb.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f905fbd1017a65ca224eb.md @@ -1,8 +1,8 @@ --- id: 615f905fbd1017a65ca224eb -title: Крок 64 +title: Крок 65 challengeType: 0 -dashedName: step-64 +dashedName: step-65 --- # --description-- @@ -23,11 +23,11 @@ dashedName: step-64 assert(document.querySelector('.daily-value').nextElementSibling?.localName === 'div'); ``` -Ваш новий `div` повинен мати `class` зі значенням `divider md`. +Ваш новий `div` повинен мати `class` зі значенням `divider medium`. ```js assert(document.querySelector('.daily-value')?.nextElementSibling?.classList?.contains('divider')); -assert(document.querySelector('.daily-value')?.nextElementSibling?.classList?.contains('md')); +assert(document.querySelector('.daily-value')?.nextElementSibling?.classList?.contains('medium')); ``` Ви повинні створити елемент `p` після нового елемента `div`. @@ -55,55 +55,60 @@ assert.equal(document.querySelector('.label')?.lastElementChild?.innerText, '* T ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Calories 230

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g10%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Trans Fat 0g

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Sugars 12g

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Includes 10g Added Sugars 20% -

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Protein 3g

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Vitamin D 2mcg 10%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Calcium 260mg 20%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Iron 8mg 45%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Potassium 235mg 6%

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    ---fcc-editable-region-- ---fcc-editable-region-- + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Calories

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + 230
                                                                                                                                                                                                                                                                                                                                    - +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Trans Fat 0g

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Sugars 12g

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Includes 10g Added Sugars 20% +

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Protein 3g

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Vitamin D 2mcg 10%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Calcium 260mg 20%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Iron 8mg 45%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Potassium 235mg 6%

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + --fcc-editable-region-- + + --fcc-editable-region-- +
                                                                                                                                                                                                                                                                                                                                    + ``` @@ -135,54 +140,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f94786869e1a7fec54375.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f94786869e1a7fec54375.md index a0e4fbc6029..ade9ecf7927 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f94786869e1a7fec54375.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f94786869e1a7fec54375.md @@ -1,8 +1,8 @@ --- id: 615f94786869e1a7fec54375 -title: Крок 65 +title: Крок 66 challengeType: 0 -dashedName: step-65 +dashedName: step-66 --- # --description-- @@ -36,54 +36,60 @@ assert(new __helpers.CSSHelp(document).getStyle('.note')?.margin === '5px 0px'); ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Calories 230

                                                                                                                                                                                                                                                                                                                                    + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Calories

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Trans Fat 0g

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Sugars 12g

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Includes 10g Added Sugars 20% -

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Protein 3g

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Vitamin D 2mcg 10%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Calcium 260mg 20%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Iron 8mg 45%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Potassium 235mg 6%

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                                                                                                                                                                                                                                                    + 230
                                                                                                                                                                                                                                                                                                                                    - +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Trans Fat 0g

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Sugars 12g

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Includes 10g Added Sugars 20% +

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Protein 3g

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Vitamin D 2mcg 10%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Calcium 260mg 20%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Iron 8mg 45%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Potassium 235mg 6%

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily + diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + ``` @@ -115,54 +121,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f951dff9317a900ef683f.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f951dff9317a900ef683f.md index 86386109e38..7adfb4729ae 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f951dff9317a900ef683f.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f951dff9317a900ef683f.md @@ -1,8 +1,8 @@ --- id: 615f951dff9317a900ef683f -title: Крок 66 +title: Крок 67 challengeType: 0 -dashedName: step-66 +dashedName: step-67 --- # --description-- @@ -35,54 +35,60 @@ assert(new __helpers.CSSHelp(document).getStyle('.note')?.textIndent === '-8px') ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Calories 230

                                                                                                                                                                                                                                                                                                                                    + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Calories

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Trans Fat 0g

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Sugars 12g

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Includes 10g Added Sugars 20% -

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Protein 3g

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Vitamin D 2mcg 10%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Calcium 260mg 20%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Iron 8mg 45%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Potassium 235mg 6%

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                                                                                                                                                                                                                                                    + 230
                                                                                                                                                                                                                                                                                                                                    - +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Trans Fat 0g

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Sugars 12g

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Includes 10g Added Sugars 20% +

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Protein 3g

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Vitamin D 2mcg 10%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Calcium 260mg 20%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Iron 8mg 45%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Potassium 235mg 6%

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily + diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + ``` @@ -114,54 +120,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } @@ -182,54 +202,60 @@ p { ```html - - - Nutrition Label - - - - -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Calories 230

                                                                                                                                                                                                                                                                                                                                    + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Calories

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Trans Fat 0g

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Total Sugars 12g

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Includes 10g Added Sugars 20% -

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Protein 3g

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Vitamin D 2mcg 10%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Calcium 260mg 20%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Iron 8mg 45%

                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    Potassium 235mg 6%

                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -

                                                                                                                                                                                                                                                                                                                                    * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                                                                                                                                                                                                                                                    + 230
                                                                                                                                                                                                                                                                                                                                    - +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Fat 8g 10%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Saturated Fat 1g 5%

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Trans Fat 0g

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Cholesterol 0mg 0%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Sodium 160mg 7%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Carbohydrate 37g 13%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Dietary Fiber 4g

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Total Sugars 12g

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Includes 10g Added Sugars 20% +

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Protein 3g

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Vitamin D 2mcg 10%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Calcium 260mg 20%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Iron 8mg 45%

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Potassium 235mg 6%

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    * The % Daily Value (DV) tells you how much a nutrient in a serving of food contributes to a daily + diet. 2,000 calories a day is used for general nutrition advice.

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + ``` @@ -261,54 +287,68 @@ header h1 { p { margin: 0; + display: flex; + justify-content: space-between; } .divider { border-bottom: 1px solid #888989; margin: 2px 0; - clear: right; } .bold { font-weight: 800; } -.right { - float: right; -} - -.lg { +.large { height: 10px; } -.lg, .md { +.large, .medium { background-color: black; border: 0; } -.md { +.medium { height: 5px; } -.sm-text { +.small-text { font-size: 0.85rem; } -.calories-info h1 { + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { margin: -5px -2px; - overflow: hidden; + font-size: 2em; + font-weight: 700; } .calories-info span { - font-size: 1.2em; - margin-top: -7px; + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +.right { + justify-content: flex-end; } .indent { margin-left: 1em; } -.dbl-indent { +.double-indent { margin-left: 2em; } diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/635bde33c91c80540eae239b.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/635bde33c91c80540eae239b.md new file mode 100644 index 00000000000..a18f761d451 --- /dev/null +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/635bde33c91c80540eae239b.md @@ -0,0 +1,153 @@ +--- +id: 635bde33c91c80540eae239b +title: Крок 41 +challengeType: 0 +dashedName: step-41 +--- + +# --description-- + +Текст `* Daily Value %` повинен бути вирівняний за правим краєм. Створіть селектор `.right` та використайте властивість `justify-content` для цього. + +# --hints-- + +Ви повинні мати селектор `.right`. + +```js +const hasRight = new __helpers.CSSHelp(document).getStyle('.right'); +assert(hasRight); + +``` + +Селектор `.right` повинен мати властивість `justify-content` зі значенням `flex-end`. + +```js +const rightJustifyContent = new __helpers.CSSHelp(document).getStyle('.right')?.getPropertyValue('justify-content'); +assert(rightJustifyContent === 'flex-end'); + +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Calories

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + 230 +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    % Daily Value *

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + + +``` + +```css +* { + box-sizing: border-box; +} + +html { + font-size: 16px; +} + +body { + font-family: 'Open Sans', sans-serif; +} + +.label { + border: 2px solid black; + width: 270px; + margin: 20px auto; + padding: 0 7px; +} + +header h1 { + text-align: center; + margin: -4px 0; + letter-spacing: 0.15px +} + +p { + margin: 0; + display: flex; + justify-content: space-between; +} + +.divider { + border-bottom: 1px solid #888989; + margin: 2px 0; +} + +.bold { + font-weight: 800; +} + +.large { + height: 10px; +} + +.large, .medium { + background-color: black; + border: 0; +} + +.medium { + height: 5px; +} + +.small-text { + font-size: 0.85rem; +} + +.calories-info { + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.calories-info h2 { + margin: 0; +} + +.left-container p { + margin: -5px -2px; + font-size: 2em; + font-weight: 700; +} + +.calories-info span { + margin: -7px -2px; + font-size: 2.4em; + font-weight: 700; +} + +--fcc-editable-region-- + +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6395d33ab5d91bf317107c48.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6395d33ab5d91bf317107c48.md new file mode 100644 index 00000000000..128049945fd --- /dev/null +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6395d33ab5d91bf317107c48.md @@ -0,0 +1,117 @@ +--- +id: 6395d33ab5d91bf317107c48 +title: Крок 32 +challengeType: 0 +dashedName: step-32 +--- + +# --description-- + +Створіть селектор `.calories-info h2` та видаліть всі поля. + +# --hints-- + +Створіть селектор `.calories-info h2`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info h2')); +``` + +Ваш селектор `.calories-info h2` повинен мати `margin` зі значенням `0`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info h2')?.margin === '0px'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + + +``` + +```css +* { + box-sizing: border-box; +} + +html { + font-size: 16px; +} + +body { + font-family: 'Open Sans', sans-serif; +} + +.label { + border: 2px solid black; + width: 270px; + margin: 20px auto; + padding: 0 7px; +} + +header h1 { + text-align: center; + margin: -4px 0; + letter-spacing: 0.15px +} + +p { + margin: 0; + display: flex; + justify-content: space-between; +} + +.divider { + border-bottom: 1px solid #888989; + margin: 2px 0; +} + +.bold { + font-weight: 800; +} + +.large { + height: 10px; +} + +.large, .medium { + background-color: black; + border: 0; +} + +.small-text { + font-size: 0.85rem; +} + +--fcc-editable-region-- + +--fcc-editable-region-- +``` diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6396e33fe478dd264ebbf278.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6396e33fe478dd264ebbf278.md new file mode 100644 index 00000000000..2e16d31ed9a --- /dev/null +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/6396e33fe478dd264ebbf278.md @@ -0,0 +1,135 @@ +--- +id: 6396e33fe478dd264ebbf278 +title: Крок 34 +challengeType: 0 +dashedName: step-34 +--- + +# --description-- + +Створіть новий селектор `.calories-info` та надайте йому властивість `display` зі значенням `flex`. Також надайте йому властивість `justify-content` зі значенням `space-between` та властивість `align-items` зі значенням `flex-end`. + +# --hints-- + +Ви повинні створити селектор `.calories-info`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info')); +``` + +Ваш селектор `.calories-info` повинен мати властивість `display` зі значенням `flex`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info')?.display === 'flex'); +``` + +Ваш селектор `.calories-info` повинен мати властивість `justify-content` зі значенням `space-between`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info')?.justifyContent === 'space-between'); +``` + +Ваш селектор `.calories-info` повинен мати властивість `align-items` зі значенням `flex-end`. + +```js +assert(new __helpers.CSSHelp(document).getStyle('.calories-info')?.alignItems === 'flex-end'); +``` + +# --seed-- + +## --seed-contents-- + +```html + + + + + + Nutrition Label + + + + + +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Nutrition Facts

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    8 servings per container

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Serving size 2/3 cup (55g)

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Amount per serving

                                                                                                                                                                                                                                                                                                                                    +

                                                                                                                                                                                                                                                                                                                                    Calories

                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + 230 +
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    + + +``` + +```css +* { + box-sizing: border-box; +} + +html { + font-size: 16px; +} + +body { + font-family: 'Open Sans', sans-serif; +} + +.label { + border: 2px solid black; + width: 270px; + margin: 20px auto; + padding: 0 7px; +} + +header h1 { + text-align: center; + margin: -4px 0; + letter-spacing: 0.15px +} + +p { + margin: 0; + display: flex; + justify-content: space-between; +} + +.divider { + border-bottom: 1px solid #888989; + margin: 2px 0; +} + +.bold { + font-weight: 800; +} + +.large { + height: 10px; +} + +.large, .medium { + background-color: black; + border: 0; +} + +.small-text { + font-size: 0.85rem; +} + +--fcc-editable-region-- + +--fcc-editable-region-- + +.calories-info h2 { + margin: 0; +} +``` diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c8bf3980c14c438d2aed.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c8bf3980c14c438d2aed.md index 23d7c98dd28..4009a2d7817 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c8bf3980c14c438d2aed.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c8bf3980c14c438d2aed.md @@ -7,7 +7,7 @@ dashedName: step-39 # --description-- -Наразі зробіть так, щоб функція `goStore` виводила повідомлення `Going to store.` на консоль. Наприклад, ось функція, яка виводить повідомлення "Hello World". +Наразі зробіть так, щоб функція `goStore` виводила повідомлення `Going to store.` на консоль. Наприклад, ось функція, яка виводить повідомлення `Hello World`. ```js function functionName() { diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b0b5053f16111b0b6b5f.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b0b5053f16111b0b6b5f.md index dad79fe3e10..b68d4682042 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b0b5053f16111b0b6b5f.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b0b5053f16111b0b6b5f.md @@ -47,7 +47,7 @@ assert.match(update.toString(), /button2\.onclick\s*=\s*goCave/); assert.match(update.toString(), /button3\.onclick\s*=\s*fightDragon/); ``` -Ваша функція `update` повинна встановити `text.innerText` на `You are in the town square. You see a sign that says "Store".`. +Ваша функція `update` повинна встановити `text.innerText` на `You are in the town square. You see a sign that says \"Store\".`. ```js assert.match(update.toString(), /text\.innerText\s*=\s*"You are in the town square. You see a sign that says \\"Store\\"\."/); diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md index 4ddb2bd4064..9f87c0038ae 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8b6536156c51500739b41.md @@ -7,7 +7,7 @@ dashedName: step-62 # --description-- -Масив `locations` містить дві локації: площа (town square) та магазин (store). Наразі ви передаєте цілий масив до оновлених функцій. Передайте лише перший елемент масиву `locations`, додавши `[0]` в кінці змінної. Наприклад: `myFunction(arg[0]);`. +Масив `locations` містить дві локації: `town square` та `store`. Наразі ви передаєте цілий масив до функції `update`. Передайте лише перший елемент масиву `locations`, додавши `[0]` в кінці змінної. Наприклад: `myFunction(arg[0]);`. Це називається дужковою нотацією. Значення в масиві доступні за індексом. Індекси є числовими значеннями та починаються з 0 – це називається індексуванням від нуля. Першим елементом у масиві `arg` був би `arg[0]`. diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md index 0a3514c079f..71ea6e2898f 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c151b23bf21bc7c4fcba.md @@ -7,7 +7,7 @@ dashedName: step-67 # --description-- -Зрештою оновіть присвоєння `text.innerText`, щоб воно дорівнювало `text` об'єкту локації. Але замість дужкової нотації використайте крапкову нотацію. Ось приклад отримання доступу до властивості `name` об'єкта під назвою `obj`: `obj.name`. +Оновіть присвоєння `text.innerText`, щоб воно дорівнювало `text` об'єкта `location`. Але замість дужкової нотації використайте крапкову нотацію. Ось приклад отримання доступу до властивості `name` об'єкта під назвою `obj`: `obj.name`. # --hints-- diff --git a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c89e4272512d44fc1c66.md b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c89e4272512d44fc1c66.md index 7bb7d3a9eb9..1a3fb14b403 100644 --- a/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c89e4272512d44fc1c66.md +++ b/curriculum/challenges/ukrainian/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8c89e4272512d44fc1c66.md @@ -7,7 +7,7 @@ dashedName: step-83 # --description-- -Подібно до функції `buyHealth`, встановіть `gold` на 30 менше, ніж поточне значення. Переконайтеся, що це всередині інструкції `if`. +Подібно до функції `buyHealth`, встановіть `gold` на `30` менше за поточне значення. Переконайтеся, що це всередині інструкції `if`. # --hints-- diff --git a/curriculum/getChallenges.js b/curriculum/getChallenges.js index 154ed1e8c8d..d558dc6e0a4 100644 --- a/curriculum/getChallenges.js +++ b/curriculum/getChallenges.js @@ -34,9 +34,7 @@ const COMMENT_TRANSLATIONS = createCommentMap( function createCommentMap(dictionariesDir) { // get all the languages for which there are dictionaries. - const languages = fs - .readdirSync(dictionariesDir) - .filter(x => x !== 'english'); + const languages = fs.readdirSync(dictionariesDir); // get all their dictionaries const dictionaries = languages.reduce( @@ -363,18 +361,18 @@ Challenges that have been already audited cannot fall back to their English vers await validate(filePath, meta.superBlock); - const useEnglish = - lang === 'english' || - !isAuditedCert(lang, meta.superBlock) || - !fs.existsSync(getFullPath(lang, filePath)); + // We always try to translate comments (even English ones) to confirm that translations exist. + const translateComments = + isAuditedCert(lang, meta.superBlock) && + fs.existsSync(getFullPath(lang, filePath)); - const challenge = await (useEnglish - ? parseMD(getFullPath('english', filePath)) - : parseTranslation( + const challenge = await (translateComments + ? parseTranslation( getFullPath(lang, filePath), COMMENT_TRANSLATIONS, lang - )); + ) + : parseMD(getFullPath('english', filePath))); addMetaToChallenge(challenge, meta); diff --git a/curriculum/package.json b/curriculum/package.json index 24c4ae1ee91..4aa285b9a26 100644 --- a/curriculum/package.json +++ b/curriculum/package.json @@ -29,7 +29,7 @@ "test:full-output": "cross-env FULL_OUTPUT=true ts-node ../node_modules/mocha/bin/mocha --delay --reporter progress" }, "devDependencies": { - "@babel/core": "7.20.7", + "@babel/core": "7.20.12", "@babel/polyfill": "7.12.1", "@babel/preset-env": "7.20.2", "@babel/preset-typescript": "7.18.6", diff --git a/curriculum/schema/challengeSchema.js b/curriculum/schema/challengeSchema.js index d837e813e2f..f4dffebb713 100644 --- a/curriculum/schema/challengeSchema.js +++ b/curriculum/schema/challengeSchema.js @@ -28,7 +28,7 @@ const schema = Joi.object() challengeOrder: Joi.number(), removeComments: Joi.bool(), certification: Joi.string().regex(slugRE), - challengeType: Joi.number().min(0).max(14).required(), + challengeType: Joi.number().min(0).max(15).required(), checksum: Joi.number(), // __commentCounts is only used to test the comment replacement __commentCounts: Joi.object(), @@ -91,6 +91,7 @@ const schema = Joi.object() crossDomain: Joi.bool() }) ), + assignments: Joi.array().items(Joi.string()), solutions: Joi.array().items(Joi.array().items(fileJoi).min(1)), superBlock: Joi.string().regex(slugWithSlashRE), superOrder: Joi.number(), diff --git a/cypress/e2e/default/landing.js b/cypress/e2e/default/landing.ts similarity index 64% rename from cypress/e2e/default/landing.js rename to cypress/e2e/default/landing.ts index 8f25c16a00f..4360cfe1f1e 100644 --- a/cypress/e2e/default/landing.js +++ b/cypress/e2e/default/landing.ts @@ -1,10 +1,14 @@ -const selectors = { +const landingPageElements = { heading: "[data-test-label='landing-header']", callToAction: "[data-test-label='landing-big-cta']", certifications: "[data-test-label='certifications']", testimonials: "[data-test-label='testimonial-cards']", landingPageImage: '.landing-page-image' -}; +} as const; + +type LandingPageTypes = T[keyof T]; + +type LandingPageLogs = LandingPageTypes; const certifications = [ '(New) Responsive Web Design', @@ -27,12 +31,12 @@ describe('Landing page', () => { 'eq', 'Learn to Code — For Free — Coding Courses for Busy People' ); - cy.contains(selectors.callToAction, "Get started (it's free)"); - cy.get(selectors.callToAction).should('have.length', 2); + cy.contains(landingPageElements.callToAction, "Get started (it's free)"); + cy.get(landingPageElements.callToAction).should('have.length', 2); }); it('Has visible header and sub-header', () => { - cy.contains(selectors.heading, 'Learn to code — for free.'); + cy.contains(landingPageElements.heading, 'Learn to code — for free.'); cy.contains('Build projects.').should('be.visible'); cy.contains('Earn certifications.').should('be.visible'); @@ -52,19 +56,29 @@ describe('Landing page', () => { }); it('Has a visible large image on large viewports', function () { - cy.viewport(1200, 660).get(selectors.landingPageImage).should('be.visible'); + cy.viewport(1200, 660) + .get(landingPageElements.landingPageImage) + .should('be.visible'); - cy.viewport(1199, 660).get(selectors.landingPageImage).should('not.exist'); + cy.viewport(1199, 660) + .get(landingPageElements.landingPageImage) + .should('not.exist'); }); it('Has links to all the certifications', function () { - cy.get(selectors.certifications).children().its('length').should('eq', 11); - cy.wrap(certifications).each(cert => { - cy.get(selectors.certifications).contains(cert); + cy.get(landingPageElements.certifications) + .children() + .its('length') + .should('eq', 11); + cy.wrap(certifications).each((cert: LandingPageLogs) => { + cy.get(landingPageElements.certifications).contains(cert); }); }); it('Has 3 testimonial cards', function () { - cy.get(selectors.testimonials).children().its('length').should('eq', 3); + cy.get(landingPageElements.testimonials) + .children() + .its('length') + .should('eq', 3); }); }); diff --git a/cypress/e2e/default/learn/challenges/failed-updates.js b/cypress/e2e/default/learn/challenges/failed-updates.ts similarity index 72% rename from cypress/e2e/default/learn/challenges/failed-updates.js rename to cypress/e2e/default/learn/challenges/failed-updates.ts index 4e7e8389e02..26c39c6e174 100644 --- a/cypress/e2e/default/learn/challenges/failed-updates.js +++ b/cypress/e2e/default/learn/challenges/failed-updates.ts @@ -1,4 +1,5 @@ -const store = require('store'); +import store from 'store'; +import { ChallengeData } from '../../../../../tools/challenge-editor/api/interfaces/ChallengeData'; const failedUpdates = [ { @@ -12,10 +13,13 @@ const failedUpdates = [ id: 'ea289e2f-a5d2-45e0-b795-0f9f4afc5124' } ]; - const failedUpdatesKey = 'fcc-failed-updates'; -describe('failed update flushing', () => { +function getCompletedIds(completedChallenges: ChallengeData[]): string[] { + return completedChallenges.map((challenge: ChallengeData) => challenge.id); +} + +describe('failed update flushing', function () { before(() => { cy.exec('npm run seed'); cy.login(); @@ -29,9 +33,8 @@ describe('failed update flushing', () => { store.set(failedUpdatesKey, failedUpdates); cy.request('http://localhost:3000/user/get-session-user') .its('body.user.developmentuser.completedChallenges') - .then(completedChallenges => { - const completedIds = completedChallenges.map(challenge => challenge.id); - + .then((completedChallenges: ChallengeData[]) => { + const completedIds: string[] = getCompletedIds(completedChallenges); failedUpdates.forEach(failedUpdate => { expect(completedIds).not.to.include(failedUpdate.payload.id); }); @@ -47,9 +50,8 @@ describe('failed update flushing', () => { cy.wait('@completed'); cy.request('http://localhost:3000/user/get-session-user') .its('body.user.developmentuser.completedChallenges') - .then(completedChallenges => { - const completedIds = completedChallenges.map(challenge => challenge.id); - + .then((completedChallenges: ChallengeData[]) => { + const completedIds: string[] = getCompletedIds(completedChallenges); failedUpdates.forEach(failedUpdate => { expect(completedIds).to.include(failedUpdate.payload.id); }); diff --git a/cypress/e2e/default/learn/challenges/multifileCertProject.js b/cypress/e2e/default/learn/challenges/multifile-cert-project.ts similarity index 100% rename from cypress/e2e/default/learn/challenges/multifileCertProject.js rename to cypress/e2e/default/learn/challenges/multifile-cert-project.ts diff --git a/cypress/e2e/default/learn/challenges/multifile.js b/cypress/e2e/default/learn/challenges/multifile.ts similarity index 100% rename from cypress/e2e/default/learn/challenges/multifile.js rename to cypress/e2e/default/learn/challenges/multifile.ts diff --git a/cypress/e2e/default/learn/challenges/project-preview.js b/cypress/e2e/default/learn/challenges/project-preview.ts similarity index 100% rename from cypress/e2e/default/learn/challenges/project-preview.js rename to cypress/e2e/default/learn/challenges/project-preview.ts diff --git a/cypress/e2e/default/learn/coding-interview-prep/intro-page.js b/cypress/e2e/default/learn/coding-interview-prep/intro-page.ts similarity index 100% rename from cypress/e2e/default/learn/coding-interview-prep/intro-page.js rename to cypress/e2e/default/learn/coding-interview-prep/intro-page.ts diff --git a/cypress/e2e/default/learn/common-components/editor.js b/cypress/e2e/default/learn/common-components/editor.ts similarity index 100% rename from cypress/e2e/default/learn/common-components/editor.js rename to cypress/e2e/default/learn/common-components/editor.ts diff --git a/cypress/e2e/default/learn/common-components/footer.js b/cypress/e2e/default/learn/common-components/footer.ts similarity index 100% rename from cypress/e2e/default/learn/common-components/footer.js rename to cypress/e2e/default/learn/common-components/footer.ts diff --git a/cypress/e2e/default/learn/common-components/helpButton.js b/cypress/e2e/default/learn/common-components/help-button.ts similarity index 100% rename from cypress/e2e/default/learn/common-components/helpButton.js rename to cypress/e2e/default/learn/common-components/help-button.ts diff --git a/cypress/e2e/default/learn/donate/donate-page-default.js b/cypress/e2e/default/learn/donate/donate-page-default.ts similarity index 100% rename from cypress/e2e/default/learn/donate/donate-page-default.js rename to cypress/e2e/default/learn/donate/donate-page-default.ts diff --git a/cypress/e2e/default/learn/index.js b/cypress/e2e/default/learn/index.ts similarity index 85% rename from cypress/e2e/default/learn/index.js rename to cypress/e2e/default/learn/index.ts index 408dec4a8bc..721fec71352 100644 --- a/cypress/e2e/default/learn/index.js +++ b/cypress/e2e/default/learn/index.ts @@ -1,10 +1,10 @@ -const selectors = { +const challengerSelector = { challengeMap: "[data-test-label='learn-curriculum-map']" -}; +} as const; -const locations = { +const learnUrl = { index: '/learn' -}; +} as const; const superBlockNames = [ '(New) Responsive Web Design Certification', @@ -24,7 +24,7 @@ const superBlockNames = [ describe('Learn Landing page (not logged in)', () => { it('Should render', () => { - cy.visit(locations.index); + cy.visit(learnUrl.index); cy.title().should( 'eq', @@ -33,15 +33,15 @@ describe('Learn Landing page (not logged in)', () => { }); it('Has the correct heading for an unauthenticated User', () => { - cy.visit(locations.index); + cy.visit(learnUrl.index); cy.contains('h1', "Welcome to freeCodeCamp's curriculum."); }); it('Should render a curriculum map', () => { cy.document().then(document => { - const superBlocks = document.querySelectorAll( - `${selectors.challengeMap} > li > a` + const superBlocks = document.querySelectorAll( + `${challengerSelector.challengeMap} > li > a` ); expect(superBlocks).to.have.length(13); @@ -76,7 +76,7 @@ describe('Superblocks and Blocks', () => { }); it('Has all superblocks visible', () => { - cy.wrap(superBlockNames.slice(1)).each(name => { + cy.wrap(superBlockNames.slice(1)).each((name: string) => { cy.contains(name).should('be.visible'); }); }); diff --git a/cypress/e2e/default/learn/redirects/breadcrumbs.js b/cypress/e2e/default/learn/redirects/breadcrumbs.ts similarity index 100% rename from cypress/e2e/default/learn/redirects/breadcrumbs.js rename to cypress/e2e/default/learn/redirects/breadcrumbs.ts diff --git a/cypress/e2e/default/learn/responsive-web-design/basic-css/index.js b/cypress/e2e/default/learn/responsive-web-design/basic-css/index.ts similarity index 100% rename from cypress/e2e/default/learn/responsive-web-design/basic-css/index.js rename to cypress/e2e/default/learn/responsive-web-design/basic-css/index.ts diff --git a/cypress/e2e/third-party/donate-page.js b/cypress/e2e/third-party/donate-page.ts similarity index 100% rename from cypress/e2e/third-party/donate-page.js rename to cypress/e2e/third-party/donate-page.ts diff --git a/docs/_sidebar.md b/docs/_sidebar.md index 0ecd8ac2ab7..66ff3b2f533 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -25,6 +25,7 @@ - [Set up freeCodeCamp on Windows (WSL)](how-to-setup-wsl.md) - [User Token Workflow](user-token-workflow.md) - [Troubleshooting Development Issues](troubleshooting-development-issues.md) + - [Authors Analytics Manual](authors-analytics-manual.md) --- diff --git a/docs/_theme.css b/docs/_theme.css index 8444fd51928..4fc5e8ca03b 100644 --- a/docs/_theme.css +++ b/docs/_theme.css @@ -175,6 +175,15 @@ section.cover.show ~ .sidebar-toggle { } } +@media (max-width: 400px) { + section.cover .cover-main > p:last-child a:last-child { + padding-left: 0; + padding-right: 0; + margin-right: 0; + margin-left: 0; + } +} + /****** Sidebar ******/ .sidebar ul li a:hover { diff --git a/docs/authors-analytics-manual.md b/docs/authors-analytics-manual.md new file mode 100644 index 00000000000..221ca725cd9 --- /dev/null +++ b/docs/authors-analytics-manual.md @@ -0,0 +1,27 @@ +# Authors Analytics Manual + +If you are an author with access to the publication's Google Analytics Property (News), you can use this guide to view your articles engagement and search for articles by publication language. + +## Search by Language + +To search for engagement reports by a specific language: + +![Image - Show steps to search by language on googla analytics](https://contribute.freecodecamp.org/images/google-analytics/search-by-language.png) + +1. From the top dropdown menu, select `News`. +1. From the sidebar, click on `Reports`. +1. From the secondary sidebar, select `Engagement`. +1. Click on `Pages and Screens`. +1. In the search bar, type the subpath for the desired language. +1. From the dropdown under the search bar, choose `Page path and screen class`. + +## Filter Reports by Author + +After arriving at the `Pages and Screens` reports mentioned above, use the following steps to filter the results by specific authors. + +![Image - Show steps to search by language on googla analytics](https://contribute.freecodecamp.org/images/google-analytics/filter-by-author.png) + +1. Click on the `Add filter` button. +1. From the side navigation include `Author`. +1. From the `Dimensions values` dropdown, choose an author's name. +1. Click on the `Apply` button to apply changes. diff --git a/docs/how-to-add-cypress-tests.md b/docs/how-to-add-cypress-tests.md index d4012c365c5..3f94fc089b8 100644 --- a/docs/how-to-add-cypress-tests.md +++ b/docs/how-to-add-cypress-tests.md @@ -34,7 +34,13 @@ To run tests against production builds, replace `dev` with `prd` below. - To run a single test: ```console - npm run cypress:dev:run -- --spec=cypress/pathToYourSpec/youSpecFileName.js + npm run cypress -- run --spec=cypress/ + ``` + + For example: + + ```console + npm run cypress -- run --spec=cypress/e2e/default/landing.js ``` - To create a development build, start the development server, and run all existing cypress end-to-end tests: diff --git a/docs/i18n/chinese-traditional/_sidebar.md b/docs/i18n/chinese-traditional/_sidebar.md index abff4e2a311..bd7c3ed848b 100644 --- a/docs/i18n/chinese-traditional/_sidebar.md +++ b/docs/i18n/chinese-traditional/_sidebar.md @@ -25,6 +25,7 @@ - [Set up freeCodeCamp on Windows (WSL)](how-to-setup-wsl.md) - [User Token Workflow](user-token-workflow.md) - [Troubleshooting Development Issues](troubleshooting-development-issues.md) + - [Authors Analytics Manual](authors-analytics-manual.md) --- diff --git a/docs/i18n/chinese-traditional/authors-analytics-manual.md b/docs/i18n/chinese-traditional/authors-analytics-manual.md new file mode 100644 index 00000000000..221ca725cd9 --- /dev/null +++ b/docs/i18n/chinese-traditional/authors-analytics-manual.md @@ -0,0 +1,27 @@ +# Authors Analytics Manual + +If you are an author with access to the publication's Google Analytics Property (News), you can use this guide to view your articles engagement and search for articles by publication language. + +## Search by Language + +To search for engagement reports by a specific language: + +![Image - Show steps to search by language on googla analytics](https://contribute.freecodecamp.org/images/google-analytics/search-by-language.png) + +1. From the top dropdown menu, select `News`. +1. From the sidebar, click on `Reports`. +1. From the secondary sidebar, select `Engagement`. +1. Click on `Pages and Screens`. +1. In the search bar, type the subpath for the desired language. +1. From the dropdown under the search bar, choose `Page path and screen class`. + +## Filter Reports by Author + +After arriving at the `Pages and Screens` reports mentioned above, use the following steps to filter the results by specific authors. + +![Image - Show steps to search by language on googla analytics](https://contribute.freecodecamp.org/images/google-analytics/filter-by-author.png) + +1. Click on the `Add filter` button. +1. From the side navigation include `Author`. +1. From the `Dimensions values` dropdown, choose an author's name. +1. Click on the `Apply` button to apply changes. diff --git a/docs/i18n/chinese-traditional/how-to-add-cypress-tests.md b/docs/i18n/chinese-traditional/how-to-add-cypress-tests.md index 10067be750f..36178c21efc 100644 --- a/docs/i18n/chinese-traditional/how-to-add-cypress-tests.md +++ b/docs/i18n/chinese-traditional/how-to-add-cypress-tests.md @@ -33,7 +33,13 @@ To run tests against production builds, replace `dev` with `prd` below. - To run a single test: ```console - npm run cypress:dev:run -- --spec=cypress/pathToYourSpec/youSpecFileName.js + npm run cypress -- run --spec=cypress/ + ``` + + For example: + + ```console + npm run cypress -- run --spec=cypress/e2e/default/landing.js ``` - To create a development build, start the development server, and run all existing cypress end-to-end tests: diff --git a/docs/i18n/chinese/_sidebar.md b/docs/i18n/chinese/_sidebar.md index 9df4c3a08b1..241263ffe2e 100644 --- a/docs/i18n/chinese/_sidebar.md +++ b/docs/i18n/chinese/_sidebar.md @@ -25,6 +25,7 @@ - [Set up freeCodeCamp on Windows (WSL)](how-to-setup-wsl.md) - [User Token Workflow](user-token-workflow.md) - [Troubleshooting Development Issues](troubleshooting-development-issues.md) + - [Authors Analytics Manual](authors-analytics-manual.md) --- diff --git a/docs/i18n/chinese/authors-analytics-manual.md b/docs/i18n/chinese/authors-analytics-manual.md new file mode 100644 index 00000000000..221ca725cd9 --- /dev/null +++ b/docs/i18n/chinese/authors-analytics-manual.md @@ -0,0 +1,27 @@ +# Authors Analytics Manual + +If you are an author with access to the publication's Google Analytics Property (News), you can use this guide to view your articles engagement and search for articles by publication language. + +## Search by Language + +To search for engagement reports by a specific language: + +![Image - Show steps to search by language on googla analytics](https://contribute.freecodecamp.org/images/google-analytics/search-by-language.png) + +1. From the top dropdown menu, select `News`. +1. From the sidebar, click on `Reports`. +1. From the secondary sidebar, select `Engagement`. +1. Click on `Pages and Screens`. +1. In the search bar, type the subpath for the desired language. +1. From the dropdown under the search bar, choose `Page path and screen class`. + +## Filter Reports by Author + +After arriving at the `Pages and Screens` reports mentioned above, use the following steps to filter the results by specific authors. + +![Image - Show steps to search by language on googla analytics](https://contribute.freecodecamp.org/images/google-analytics/filter-by-author.png) + +1. Click on the `Add filter` button. +1. From the side navigation include `Author`. +1. From the `Dimensions values` dropdown, choose an author's name. +1. Click on the `Apply` button to apply changes. diff --git a/docs/i18n/chinese/how-to-add-cypress-tests.md b/docs/i18n/chinese/how-to-add-cypress-tests.md index 10067be750f..36178c21efc 100644 --- a/docs/i18n/chinese/how-to-add-cypress-tests.md +++ b/docs/i18n/chinese/how-to-add-cypress-tests.md @@ -33,7 +33,13 @@ To run tests against production builds, replace `dev` with `prd` below. - To run a single test: ```console - npm run cypress:dev:run -- --spec=cypress/pathToYourSpec/youSpecFileName.js + npm run cypress -- run --spec=cypress/ + ``` + + For example: + + ```console + npm run cypress -- run --spec=cypress/e2e/default/landing.js ``` - To create a development build, start the development server, and run all existing cypress end-to-end tests: diff --git a/docs/i18n/espanol/_sidebar.md b/docs/i18n/espanol/_sidebar.md index cb94898ae8f..80d200a29e3 100644 --- a/docs/i18n/espanol/_sidebar.md +++ b/docs/i18n/espanol/_sidebar.md @@ -25,6 +25,7 @@ - [Configurar freeCodeCamp en Windows (WSL)](how-to-setup-wsl.md) - [Flujo de trabajo del Token del usuario](user-token-workflow.md) - [Troubleshooting Development Issues](troubleshooting-development-issues.md) + - [Authors Analytics Manual](authors-analytics-manual.md) --- diff --git a/docs/i18n/espanol/authors-analytics-manual.md b/docs/i18n/espanol/authors-analytics-manual.md new file mode 100644 index 00000000000..221ca725cd9 --- /dev/null +++ b/docs/i18n/espanol/authors-analytics-manual.md @@ -0,0 +1,27 @@ +# Authors Analytics Manual + +If you are an author with access to the publication's Google Analytics Property (News), you can use this guide to view your articles engagement and search for articles by publication language. + +## Search by Language + +To search for engagement reports by a specific language: + +![Image - Show steps to search by language on googla analytics](https://contribute.freecodecamp.org/images/google-analytics/search-by-language.png) + +1. From the top dropdown menu, select `News`. +1. From the sidebar, click on `Reports`. +1. From the secondary sidebar, select `Engagement`. +1. Click on `Pages and Screens`. +1. In the search bar, type the subpath for the desired language. +1. From the dropdown under the search bar, choose `Page path and screen class`. + +## Filter Reports by Author + +After arriving at the `Pages and Screens` reports mentioned above, use the following steps to filter the results by specific authors. + +![Image - Show steps to search by language on googla analytics](https://contribute.freecodecamp.org/images/google-analytics/filter-by-author.png) + +1. Click on the `Add filter` button. +1. From the side navigation include `Author`. +1. From the `Dimensions values` dropdown, choose an author's name. +1. Click on the `Apply` button to apply changes. diff --git a/docs/i18n/espanol/how-to-add-cypress-tests.md b/docs/i18n/espanol/how-to-add-cypress-tests.md index 94b553e805a..57d4d4ca6d5 100644 --- a/docs/i18n/espanol/how-to-add-cypress-tests.md +++ b/docs/i18n/espanol/how-to-add-cypress-tests.md @@ -33,7 +33,13 @@ Para ejecutar pruebas en las compilaciones de producción, reemplaza `dev` con ` - Para ejecutar una sola prueba: ```console - npm run cypress:dev:run -- --spec=cypress/pathToYourSpec/youSpecFileName.js + npm run cypress -- run --spec=cypress/ + ``` + + For example: + + ```console + npm run cypress -- run --spec=cypress/e2e/default/landing.js ``` - Para crear una compilación de desarrollo, inicia el servidor de desarrollo y ejecuta todas las pruebas de cypress existentes de extremo a extremo: diff --git a/docs/i18n/german/_sidebar.md b/docs/i18n/german/_sidebar.md index 930b9558e4d..46fcd456fe6 100644 --- a/docs/i18n/german/_sidebar.md +++ b/docs/i18n/german/_sidebar.md @@ -25,6 +25,7 @@ - [freeCodeCamp unter Windows einrichten (WSL)](how-to-setup-wsl.md) - [Benutzer-Token Workflow](user-token-workflow.md) - [Troubleshooting Development Issues](troubleshooting-development-issues.md) + - [Authors Analytics Manual](authors-analytics-manual.md) --- diff --git a/docs/i18n/german/authors-analytics-manual.md b/docs/i18n/german/authors-analytics-manual.md new file mode 100644 index 00000000000..221ca725cd9 --- /dev/null +++ b/docs/i18n/german/authors-analytics-manual.md @@ -0,0 +1,27 @@ +# Authors Analytics Manual + +If you are an author with access to the publication's Google Analytics Property (News), you can use this guide to view your articles engagement and search for articles by publication language. + +## Search by Language + +To search for engagement reports by a specific language: + +![Image - Show steps to search by language on googla analytics](https://contribute.freecodecamp.org/images/google-analytics/search-by-language.png) + +1. From the top dropdown menu, select `News`. +1. From the sidebar, click on `Reports`. +1. From the secondary sidebar, select `Engagement`. +1. Click on `Pages and Screens`. +1. In the search bar, type the subpath for the desired language. +1. From the dropdown under the search bar, choose `Page path and screen class`. + +## Filter Reports by Author + +After arriving at the `Pages and Screens` reports mentioned above, use the following steps to filter the results by specific authors. + +![Image - Show steps to search by language on googla analytics](https://contribute.freecodecamp.org/images/google-analytics/filter-by-author.png) + +1. Click on the `Add filter` button. +1. From the side navigation include `Author`. +1. From the `Dimensions values` dropdown, choose an author's name. +1. Click on the `Apply` button to apply changes. diff --git a/docs/i18n/german/how-to-add-cypress-tests.md b/docs/i18n/german/how-to-add-cypress-tests.md index bb3c4cfac76..6f977295709 100644 --- a/docs/i18n/german/how-to-add-cypress-tests.md +++ b/docs/i18n/german/how-to-add-cypress-tests.md @@ -33,7 +33,13 @@ Um Tests mit Produktions-Builds durchzuführen, ersetze unten `dev` durch `prd`. - Um einen einzelnen Test durchzuführen: ```console - npm run cypress:dev:run -- --spec=cypress/pathToYourSpec/youSpecFileName.js + npm run cypress -- run --spec=cypress/ + ``` + + For example: + + ```console + npm run cypress -- run --spec=cypress/e2e/default/landing.js ``` - Um einen Entwicklungs-Build zu erstellen, starte den Entwicklungsserver und führe alle vorhandenen Cypress-End-to-End-Tests aus: diff --git a/docs/i18n/italian/_sidebar.md b/docs/i18n/italian/_sidebar.md index 6d44065a6d6..16d26b5de22 100644 --- a/docs/i18n/italian/_sidebar.md +++ b/docs/i18n/italian/_sidebar.md @@ -25,6 +25,7 @@ - [Settare freeCodeCamp su Windows (WSL)](how-to-setup-wsl.md) - [Workflow con il Token Utente](user-token-workflow.md) - [Risolvere i Problemi di Sviluppo](troubleshooting-development-issues.md) + - [Manuale Analytics per gli autori](authors-analytics-manual.md) --- diff --git a/docs/i18n/italian/authors-analytics-manual.md b/docs/i18n/italian/authors-analytics-manual.md new file mode 100644 index 00000000000..c1e2936ea44 --- /dev/null +++ b/docs/i18n/italian/authors-analytics-manual.md @@ -0,0 +1,27 @@ +# Manuale Analytics per gli autori + +Se sei un autore con accesso alla proprietà Google Analytics della pubblicazione (News), puoi utilizzare questa guida per visualizzare l'impatto degli articoli e cercare gli articoli per lingua di pubblicazione. + +## Cercare per lingua + +Per cercare rapporti di engagement per una lingua specifica: + +![Immagine - Mostra i passaggi per cercare per lingua su google analytics](https://contribute.freecodecamp.org/images/google-analytics/search-by-language.png) + +1. Dal menu a discesa in alto, seleziona `News`. +1. Nella barra laterale, clicca su `Reports`. +1. Dalla barra laterale secondaria, seleziona `Engagement`. +1. Clicca su `Pages and Screens`. +1. Nella barra di ricerca, digita il sotto-percorso per la lingua desiderata. +1. Dal menu a discesa sotto la barra di ricerca, scegli `Page path and screen class`. + +## Filtrare i report per autore + +Dopo essere arrivati ai report `Pages and Screens` menzionati sopra, utilizza i seguenti passaggi per filtrare i risultati in base all'autore. + +![Immagine - Mostra i passaggi per cercare per lingua su google analytics](https://contribute.freecodecamp.org/images/google-analytics/filter-by-author.png) + +1. Clicca sul pulsante `Add filter`. +1. Dalla barra di navigazione laterale includi `Author`. +1. Dal menu a discesa `Dimensions values`, scegli il nome dell'autore. +1. Clicca sul pulsante `Apply` per applicare le modifiche. diff --git a/docs/i18n/italian/codebase-best-practices.md b/docs/i18n/italian/codebase-best-practices.md index a1aeb2426e3..2d2ccee4810 100644 --- a/docs/i18n/italian/codebase-best-practices.md +++ b/docs/i18n/italian/codebase-best-practices.md @@ -8,17 +8,17 @@ I colori sono definiti in [`variable.css`](/client/src/components/layouts/variab Siamo estremamente categorici circa l'aggiunta di nuove variabili/token ai colori. Dopo un'attenta ricerca, i colori sono stati scelti per rispettare l'identità del marchio freeCodeCamp, l'esperienza dello sviluppatore e l'accessibilità. -The `!important` keyword may be used to override values in some cases (e.g. accessibility concerns). È necessario aggiungere un commento che descriva il problema, in modo che non venga rimosso in un futuro refactoring. +La parola chiave `!important` può essere usata per sovrascrivere i valori in alcuni casi (per esempio: problemi di accessibilità). È necessario aggiungere un commento che descriva il problema, in modo che non venga rimosso in un futuro refactoring. ### Supporto RTL Stiamo cercando di supportare il layout da destra a sinistra (right-to-left, RTL) nel codebase per le lingue che sono lette in questa direzione. Per questo è necessario essere consapevoli di come definire lo stile dei componenti. Ecco alcune rapide regole pratiche da seguire: -- Don't use `float` properties - - Use Flexbox and Grid layouts instead, as they have RTL support already built-in, and those will be easier to maintain and review. -- Don't define the direction while using `margin` and `padding`: it may seem harmless to use `padding-right` and `margin-left`, but these directions aren't mirrored when the layout changes to RTL, and adding counter values for them in the RTL file makes maintaining the codebase harder. - - Use logical properties for them: You can add the same spacing by using `padding-inline-end` and `margin-inline-start`, and you won't need to worry about RTL layout, as they follow where the line starts and ends, and you won't need to add any extra values in the RTL files, so people won't need to remember to change the same values in two files. -- Don't use `!important` in `font-family`: RTL layout uses different fonts compared to the LTR layout, when you add `!important` in the `font-family` property it affects the RTL layout too. +- Non utilizzare le proprietà `float` + - Invece, utilizza i layout Flexbox e Grid poiché hanno già integrato il supporto RTL e saranno più facili da gestire e revisionare. +- Non definire la direzione usando `margin` e `padding`: potrebbe sembrare innocuo usare `padding-right` e `margin-left`, ma queste direzioni non sono rispecchiate quando il layout cambia in RTL e l'aggiunta di valori contatori per loro nel file RTL rende il mantenimento del codebase più difficile. + - Usa le proprietà logiche per loro: puoi aggiungere la stessa spaziatura usando `padding-inline-end` e `margin-inline-start` e non dovrai preoccuparti del layout RTL, dato che segue l'inizio e la fine della riga e non è necessario aggiungere alcun valore aggiuntivo nei file RTL, così le persone non dovranno ricordarsi di cambiare gli stessi valori in due file. +- Non usare `!important` in `font-family`: il layout RTL utilizza caratteri diversi rispetto al layout LTR, aggiungendo `!important` alla proprietà `font-family` si influisce anche sul layout RTL. ## JavaScript generale diff --git a/docs/i18n/italian/how-to-add-cypress-tests.md b/docs/i18n/italian/how-to-add-cypress-tests.md index 80c12139033..8abcccbae3d 100644 --- a/docs/i18n/italian/how-to-add-cypress-tests.md +++ b/docs/i18n/italian/how-to-add-cypress-tests.md @@ -33,7 +33,13 @@ Per eseguire i test su build di produzione, sostituisci `dev` con `prd` nella pa - Per eseguire un singolo test: ```console - npm run cypress:dev:run -- --spec=cypress/pathToYourSpec/youSpecFileName.js + npm run cypress -- run --spec=cypress/ + ``` + + Ad esempio: + + ```console + npm run cypress -- run --spec=cypress/e2e/default/landing.js ``` - Per creare una build di sviluppo, avvia il server di sviluppo e esegui tutti i test cypress end-to-end esistenti: diff --git a/docs/i18n/italian/user-token-workflow.md b/docs/i18n/italian/user-token-workflow.md index 97551077676..3d59a655ae5 100644 --- a/docs/i18n/italian/user-token-workflow.md +++ b/docs/i18n/italian/user-token-workflow.md @@ -4,7 +4,7 @@ I token utente sono utilizzati per identificare gli utenti con terze parti in mo ## Come vengono creati -Al momento, i token sono utilizzati solo per completare le sfide della certificazione Database Relazionale. A token gets created when a signed-in user clicks the "Click here to start the course" or "Click here to start the project" buttons to start one of the Relational Database courses or projects. +Al momento, i token sono utilizzati solo per completare le sfide della certificazione Database Relazionale. Un token viene creato quando un utente loggato clicca sui pulsanti "Clicca qui per iniziare il corso" o "Clicca qui per iniziare il progetto" per iniziare uno dei corsi o progetti della certificazione Database Relazionali. ## Quando vengono cancellati @@ -12,4 +12,4 @@ Un token utente viene cancellato quando un utente fa log out da freeCodeCamp, re ## Come funzionano -I token sono memorizzati in una raccolta `UserToken` nel database. Ogni record ha un `_id` unico, che è il token, e un `user_id` che collega all'account dell'utente dalla collezione `user`. Il token è codificato usando JWT e inviato al client quando viene creato. That encoded token is then given to third-party services that need it and sent to our API by them when a challenge is completed. Quando la nostra API lo riceve, è decodificato in modo da poter identificare l'utente che presenta una sfida e salvare la sfida completata nella lista delle sfide completate `completedChallenges` dell'utente. +I token sono memorizzati in una raccolta `UserToken` nel database. Ogni record ha un `_id` unico, che è il token, e un `user_id` che collega all'account dell'utente dalla collezione `user`. Il token è codificato usando JWT e inviato al client quando viene creato. Questo token codificato viene quindi dato a servizi di terze parti che ne hanno bisogno e inviato alla nostra API da loro quando una sfida è completata. Quando la nostra API lo riceve, è decodificato in modo da poter identificare l'utente che presenta una sfida e salvare la sfida completata nella lista delle sfide completate `completedChallenges` dell'utente. diff --git a/docs/i18n/japanese/_sidebar.md b/docs/i18n/japanese/_sidebar.md index 46489ac3c9a..0eed7a21fae 100644 --- a/docs/i18n/japanese/_sidebar.md +++ b/docs/i18n/japanese/_sidebar.md @@ -25,6 +25,7 @@ - [Set up freeCodeCamp on Windows (WSL)](how-to-setup-wsl.md) - [User Token Workflow](user-token-workflow.md) - [Troubleshooting Development Issues](troubleshooting-development-issues.md) + - [Authors Analytics Manual](authors-analytics-manual.md) --- diff --git a/docs/i18n/japanese/authors-analytics-manual.md b/docs/i18n/japanese/authors-analytics-manual.md new file mode 100644 index 00000000000..221ca725cd9 --- /dev/null +++ b/docs/i18n/japanese/authors-analytics-manual.md @@ -0,0 +1,27 @@ +# Authors Analytics Manual + +If you are an author with access to the publication's Google Analytics Property (News), you can use this guide to view your articles engagement and search for articles by publication language. + +## Search by Language + +To search for engagement reports by a specific language: + +![Image - Show steps to search by language on googla analytics](https://contribute.freecodecamp.org/images/google-analytics/search-by-language.png) + +1. From the top dropdown menu, select `News`. +1. From the sidebar, click on `Reports`. +1. From the secondary sidebar, select `Engagement`. +1. Click on `Pages and Screens`. +1. In the search bar, type the subpath for the desired language. +1. From the dropdown under the search bar, choose `Page path and screen class`. + +## Filter Reports by Author + +After arriving at the `Pages and Screens` reports mentioned above, use the following steps to filter the results by specific authors. + +![Image - Show steps to search by language on googla analytics](https://contribute.freecodecamp.org/images/google-analytics/filter-by-author.png) + +1. Click on the `Add filter` button. +1. From the side navigation include `Author`. +1. From the `Dimensions values` dropdown, choose an author's name. +1. Click on the `Apply` button to apply changes. diff --git a/docs/i18n/japanese/how-to-add-cypress-tests.md b/docs/i18n/japanese/how-to-add-cypress-tests.md index b1afa1ad8ff..0bcd4c655ec 100644 --- a/docs/i18n/japanese/how-to-add-cypress-tests.md +++ b/docs/i18n/japanese/how-to-add-cypress-tests.md @@ -33,7 +33,13 @@ Cypress テストもしくは「specs」の書き方については、Cypress - 単一のテストを実行します。 ```console - npm run cypress:dev:run -- --spec=cypress/pathToYourSpec/youSpecFileName.js + npm run cypress -- run --spec=cypress/ + ``` + + For example: + + ```console + npm run cypress -- run --spec=cypress/e2e/default/landing.js ``` - 開発ビルドを作成するには、開発サーバーを起動し、既存の cypress エンドツーエンドテストをすべて実行します。 diff --git a/docs/i18n/portuguese/_sidebar.md b/docs/i18n/portuguese/_sidebar.md index e43152ffcc3..a145cec7f05 100644 --- a/docs/i18n/portuguese/_sidebar.md +++ b/docs/i18n/portuguese/_sidebar.md @@ -25,6 +25,7 @@ - [Configurar freeCodeCamp no Windows (WSL)](how-to-setup-wsl.md) - [Fluxo de trabalho do token de usuário](user-token-workflow.md) - [Solucionar problemas de desenvolvimento](troubleshooting-development-issues.md) + - [Manual de análise dos autores](authors-analytics-manual.md) --- diff --git a/docs/i18n/portuguese/authors-analytics-manual.md b/docs/i18n/portuguese/authors-analytics-manual.md new file mode 100644 index 00000000000..10d616e762c --- /dev/null +++ b/docs/i18n/portuguese/authors-analytics-manual.md @@ -0,0 +1,27 @@ +# Manual de análise dos autores + +Se você é um autor com acesso à Propriedade do Google Analytics da publicação (editorial), pode usar este guia para visualizar o engajamento de seus artigos e pesquisar artigos no idioma da publicação. + +## Pesquisar por idioma + +Para procurar relatórios de engajamento por um idioma específico: + +![Imagem - Mostrar etapas para pesquisar por idioma no Google Analytics](https://contribute.freecodecamp.org/images/google-analytics/search-by-language.png) + +1. No menu suspenso na parte superior, selecione `News`. +1. Na barra lateral, clique em `Reports`. +1. Na barra lateral secundária, selecione `Engagement`. +1. Clique em `Pages and Screens`. +1. Na barra de pesquisa, digite o subcaminho para o idioma desejado. +1. Na lista suspensa da barra de pesquisa, escolha `Page path and screen class`. + +## Filtrar relatórios por autor + +Depois de chegar aos relatórios de `Pages and Screens` mencionados acima, use as seguintes etapas para filtrar os resultados por autores específicos. + +![Imagem - Mostrar etapas para pesquisar por idioma no Google Analytics](https://contribute.freecodecamp.org/images/google-analytics/filter-by-author.png) + +1. Clique no botão `Add filter`. +1. A partir da navegação lateral, inclua `Author`. +1. A partir do menu suspenso `Dimensions values`, escolha o nome de um autor. +1. Clique no botão `Apply` para aplicar as alterações. diff --git a/docs/i18n/portuguese/codebase-best-practices.md b/docs/i18n/portuguese/codebase-best-practices.md index 8367b36e5b5..960b11bf23c 100644 --- a/docs/i18n/portuguese/codebase-best-practices.md +++ b/docs/i18n/portuguese/codebase-best-practices.md @@ -8,17 +8,17 @@ As cores são definidas no arquivo [`variable.css`](/client/src/components/layou Temos uma opinião forte sobre a adição de novas variáveis/tokens às cores. Após uma pesquisa cuidadosa, as cores foram escolhidas para respeitar a identidade da marca freeCodeCamp, a experiência do desenvolvedor e a acessibilidade. -The `!important` keyword may be used to override values in some cases (e.g. accessibility concerns). Você deve adicionar um comentário descrevendo a questão para que ela não seja removida em futura refatoração. +A palavra-chave `!important` pode ser usada para substituir valores em alguns casos (por exemplo, questões de acessibilidade). Você deve adicionar um comentário descrevendo a questão para que ela não seja removida em futura refatoração. ### Suporte a RTL Estamos nos esforçando para apoiar o layout da direita para a esquerda (do inglês, right-to-left, ou RTL) na base de código para os idiomas que são lidos nessa direção. Por isso, você precisa estar atento à maneira como estilizar os componentes. Seguem aqui algumas dicas práticas para isso: -- Don't use `float` properties - - Use Flexbox and Grid layouts instead, as they have RTL support already built-in, and those will be easier to maintain and review. -- Don't define the direction while using `margin` and `padding`: it may seem harmless to use `padding-right` and `margin-left`, but these directions aren't mirrored when the layout changes to RTL, and adding counter values for them in the RTL file makes maintaining the codebase harder. - - Use logical properties for them: You can add the same spacing by using `padding-inline-end` and `margin-inline-start`, and you won't need to worry about RTL layout, as they follow where the line starts and ends, and you won't need to add any extra values in the RTL files, so people won't need to remember to change the same values in two files. -- Don't use `!important` in `font-family`: RTL layout uses different fonts compared to the LTR layout, when you add `!important` in the `font-family` property it affects the RTL layout too. +- Não use as propriedades `float` + - Em vez disso, use layouts com Flexbox e Grid, pois eles já têm incorporado o suporte a esses idiomas e serão mais fáceis de manter e revisar. +- Não defina a direção ao usar `margin` e `padding`: pode parecer inofensivo usar `padding-right` e `margin-left`, mas essas direções não são espelhadas quando o layout muda para RTL. Adicionar valores opostos para eles no arquivo RTL torna a manutenção da base de código mais difícil. + - Use as propriedades lógicas para eles: você pode adicionar o mesmo espaço, usando `padding-inline-end` e `margin-inline-start`. Você não precisará se preocupar com o layout RTL, já que ele seguirá onde a linha começa e termina. Além disso, você não precisará adicionar valores a mais nos arquivos RTL. Então, não será necessário lembrar de alterar os mesmos valores em dois arquivos. +- Não use `!important` em `font-family`: o layout RTL usará fontes diferentes daquelas do layout da esquerda para a direita (do inglês, left-to-right, ou LTR). Se você adicionar `!important` na propriedade `font-family`, isso afetará o layout RTL também, o que causa um bug de UI. ## JavaScript em geral diff --git a/docs/i18n/portuguese/how-to-add-cypress-tests.md b/docs/i18n/portuguese/how-to-add-cypress-tests.md index c057422ec88..018970dc8f1 100644 --- a/docs/i18n/portuguese/how-to-add-cypress-tests.md +++ b/docs/i18n/portuguese/how-to-add-cypress-tests.md @@ -33,7 +33,13 @@ Para executar testes usando compilações de produção, substitua `dev` por `pr - Para executar um único teste: ```console - npm run cypress:dev:run -- --spec=cypress/pathToYourSpec/youSpecFileName.js + npm run cypress -- run --spec=cypress/ + ``` + + Por exemplo: + + ```console + npm run cypress -- run --spec=cypress/e2e/default/landing.js ``` - Para criar uma versão de compilação, inicie o servidor de desenvolvimento e execute todos os testes cypress contínuos e funcionais existentes: diff --git a/docs/i18n/portuguese/user-token-workflow.md b/docs/i18n/portuguese/user-token-workflow.md index 3d1e89514bb..e9c2d9ffc8e 100644 --- a/docs/i18n/portuguese/user-token-workflow.md +++ b/docs/i18n/portuguese/user-token-workflow.md @@ -4,7 +4,7 @@ Os tokens de usuário são usados para identificar os usuários para terceiros. ## Como eles são criados -No momento, os tokens são usados apenas para enviar os desafios de Bancos de dados relacionais. A token gets created when a signed-in user clicks the "Click here to start the course" or "Click here to start the project" buttons to start one of the Relational Database courses or projects. +No momento, os tokens são usados apenas para enviar os desafios de Bancos de dados relacionais. Um token é criado quando um usuário conectado clica em "Clique aqui para iniciar o curso" ou "Clique aqui para iniciar o projeto" para iniciar um dos cursos ou projetos de Banco de dados relacionais. ## Quando eles forem excluídos ou deletados ou removidos @@ -12,4 +12,4 @@ Um token de usuário será excluído quando um usuário sai do freeCodeCamp, red ## Como eles funcionam -Os tokens são armazenados em uma coleção chamada `UserToken` no banco de dados. Cada registro tem um `_id` único, que é o token, e um `user_id` que se vincula à conta do usuário da coleção `user`. O token é codificado utilizando JWT e enviado para o cliente quando ele é criado. That encoded token is then given to third-party services that need it and sent to our API by them when a challenge is completed. Quando nossa API o receber, ele é decodificado para que possamos identificar o usuário que está enviando um desafio e salvar o desafio completo em seus `completedChallenges`. +Os tokens são armazenados em uma coleção chamada `UserToken` no banco de dados. Cada registro tem um `_id` único, que é o token, e um `user_id` que se vincula à conta do usuário da coleção `user`. O token é codificado utilizando JWT e enviado para o cliente quando ele é criado. Esse token codificado é então enviado aos serviços de terceiros que precisam dele e para a nossa API por eles quando um desafio é concluído. Quando nossa API o receber, ele é decodificado para que possamos identificar o usuário que está enviando um desafio e salvar o desafio completo em seus `completedChallenges`. diff --git a/docs/i18n/ukrainian/FAQ.md b/docs/i18n/ukrainian/FAQ.md index 941c2da808c..95936de195e 100644 --- a/docs/i18n/ukrainian/FAQ.md +++ b/docs/i18n/ukrainian/FAQ.md @@ -71,21 +71,21 @@ freeCodeCamp працює на сучасному стеку JavaScript. Якщ ### Я хочу бути модератором freeCodeCamp. З чого мені варто почати? -Модератори нашої спільноти – наші герої. Their voluntary contributions make freeCodeCamp a safe and welcoming community. +Модератори нашої спільноти – наші герої. Їхні добровільні внески роблять freeCodeCamp безпечною та гостинною спільнотою. -First and foremost, we would need you to be an active participant in the community, and live by our [code of conduct](https://www.freecodecamp.org/news/code-of-conduct/) (not just enforce it). +Перш за все, ви повинні бути активним учасником нашої спільноти та дотримуватись нашого [кодексу поведінки](https://www.freecodecamp.org/news/code-of-conduct/) (а не просто обіцяти його виконання). Декілька рекомендацій стосовно наших платформ: -- To be a **Discord/Chat** moderator, have an active presence in our chat and have positive engagements with others, while also learning and practicing how to deal with potential conflicts that may arise. -- To be a **Forum** moderator, similar to a chat moderator, have an active presence and engage with other forum posters, supporting others in their learning journey, and even giving feedback when asked. Take a look at [The Subforum Leader Handbook](https://forum.freecodecamp.org/t/the-subforum-leader-handbook/326326) for more information. -- To be a **GitHub** moderator, help process GitHub issues that are brought up to see if they are valid and (ideally) try to propose solutions for these issues to be picked up by others (or yourself). +- Щоб бути модератором **дискорду/чату**, будьте активними у нашому чаті та взаємодійте з іншими, навчаючись та практикуючи вирішення потенційних конфліктів. +- Щоб бути модератором **форуму**, будьте активними та взаємодійте з іншими людьми на форумі, підтримуйте їх та надавайте зворотний зв'язок за потреби. Див. [посібник керівника підфоруму](https://forum.freecodecamp.org/t/the-subforum-leader-handbook/326326) для додаткової інформації. +- Щоб бути модератором **GitHub**, допомагайте з обробкою завдань GitHub, перевіряючи, чи вони дійсні та (в ідеалі) пропонуйте їх вирішення (власне чи чуже). -Коротко: поважайте інших. Ми – люди з усього світу. With that in mind, please also consider using encouraging or supportive language and be mindful of cross-cultural communication. +Коротко: поважайте інших. Ми – люди з усього світу. Зважаючи на це, будь ласка, слідкуйте за своїм спілкуванням із людьми інших культур. -If you practice the above **consistently for a while** and our fellow moderator members recommend you, a staff member will reach out and onboard you to the moderators' team. Відкрита робота є волонтерською роботою, і наш час обмежений. Ми розуміємо, що в вашому випадку це правда. So we emphasize being **consistent** rather than engaging in the community 24/7. +Якщо ви практикували вищезгадане **деякий час** та хтось із модераторів рекомендує вас, з вами зв'яжеться співробітник та залучить до команди модераторів. Відкрита робота є волонтерською роботою, і наш час обмежений. Ми розуміємо, що в вашому випадку це правда. Тому ми наголошуємо на тому, щоб бути **послідовними**, а не взаємодіяти у спільноті 24/7. -Take a look at our [Moderator Handbook](moderator-handbook.md) for a more exhaustive list of other responsibilities and expectations we have of our moderators. +Див. наш [довідник модератора](moderator-handbook.md) для детальнішого списку обов'язків модератора та наших очікувань від них. ### Моя проблема не висвітлена у цій документації. diff --git a/docs/i18n/ukrainian/_sidebar.md b/docs/i18n/ukrainian/_sidebar.md index 7d2bad24122..ccad0f64b74 100644 --- a/docs/i18n/ukrainian/_sidebar.md +++ b/docs/i18n/ukrainian/_sidebar.md @@ -6,25 +6,26 @@ - [Робота над перекладом ресурсів](how-to-translate-files.md) - [Робота над редагуванням перекладів](how-to-proofread-files.md) - **Внесок до коду** - - [Set up freeCodeCamp](how-to-setup-freecodecamp-locally.md) - - [Follow best-practices](codebase-best-practices.md) - - [Open a pull request](how-to-open-a-pull-request.md) - - [Work on Codebase](how-to-contribute-to-the-codebase.md) - - [Work on Coding Challenges](how-to-work-on-coding-challenges.md) - - [Work on Component Library](how-to-work-on-the-component-library.md) - - [Work on Practice Projects](how-to-work-on-practice-projects.md) - - [Work on Mobile app](how-to-setup-freecodecamp-mobile-app-locally.md) - - [Work on tutorials with CodeRoad](how-to-work-on-tutorials-that-use-coderoad.md) - - [Work on Localized Web App](how-to-work-on-localized-client-webapp.md) - - [Work on Cypress tests](how-to-add-cypress-tests.md) - - [Work on Video Challenges](how-to-help-with-video-challenges.md) - - [Work on Documentation](how-to-work-on-the-docs-theme.md) + - [Налаштування freeCodeCamp](how-to-setup-freecodecamp-locally.md) + - [Передові практики написання коду](codebase-best-practices.md) + - [Відкриття пул реквеста](how-to-open-a-pull-request.md) + - [Робота над кодовою базою](how-to-contribute-to-the-codebase.md) + - [Робота над завданнями з кодом](how-to-work-on-coding-challenges.md) + - [Робота над компонентною бібліотекою](how-to-work-on-the-component-library.md) + - [Робота над практичними проєктами](how-to-work-on-practice-projects.md) + - [Робота над мобільним додатком](how-to-setup-freecodecamp-mobile-app-locally.md) + - [Робота над туторіалами з CodeRoad](how-to-work-on-tutorials-that-use-coderoad.md) + - [Робота над локалізованим вебдодатком](how-to-work-on-localized-client-webapp.md) + - [Робота над тестами Cypress](how-to-add-cypress-tests.md) + - [Робота над відеозавданнями](how-to-help-with-video-challenges.md) + - [Робота над документацією](how-to-work-on-the-docs-theme.md) - **Додаткові інструкції** - - [Ознайомлення зі структурою файлів навчальної програми](curriculum-file-structure.md) - - [Налагодження вихідних електронних листів локально](how-to-catch-outgoing-emails-locally.md) + - [Структура файлів навчальної програми](curriculum-file-structure.md) + - [Налагодження вихідних е-листів локально](how-to-catch-outgoing-emails-locally.md) - [Встановлення freeCodeCamp на Windows (WSL)](how-to-setup-wsl.md) - [Робочий процес токенів користувача](user-token-workflow.md) - - [Troubleshooting Development Issues](troubleshooting-development-issues.md) + - [Розв'язання проблем розробки](troubleshooting-development-issues.md) + - [Керівництво з аналітики](authors-analytics-manual.md) --- diff --git a/docs/i18n/ukrainian/authors-analytics-manual.md b/docs/i18n/ukrainian/authors-analytics-manual.md new file mode 100644 index 00000000000..66cc778199a --- /dev/null +++ b/docs/i18n/ukrainian/authors-analytics-manual.md @@ -0,0 +1,27 @@ +# Керівництво з аналітики + +Якщо ви є автором публікацій та маєте доступ до Google Analytics (News), ви можете використати це керівництво для перегляду статистики публікацій та пошуку публікацій за мовою. + +## Пошук за мовою + +Перегляд статистики певної мови: + +![Зображення - Кроки для пошуку за мовою в google analytics](https://contribute.freecodecamp.org/images/google-analytics/search-by-language.png) + +1. Оберіть `News` із верхнього випадного меню. +1. Натисніть `Reports` на бічній панелі. +1. У другорядній бічній панелі оберіть `Engagement`. +1. Натисніть `Pages and Screens`. +1. У рядку пошуку введіть підшлях потрібної мови. +1. Оберіть `Page path and screen class` у випадному меню під рядком пошуку. + +## Статистика автора + +Після отримання вищезгаданої статистики `Pages and Screens` використайте наступні кроки, щоб переглянути статистику певного автора. + +![Зображення - Кроки для пошуку за мовою в google analytics](https://contribute.freecodecamp.org/images/google-analytics/filter-by-author.png) + +1. Натисніть на кнопку `Add filter`. +1. Оберіть `Author` на бічній навігації. +1. Виберіть ім’я автора із випадного меню `Dimensions values`. +1. Натисніть на кнопку `Apply`, щоб застосувати зміни. diff --git a/docs/i18n/ukrainian/codebase-best-practices.md b/docs/i18n/ukrainian/codebase-best-practices.md index 84ef9a8d527..905974494eb 100644 --- a/docs/i18n/ukrainian/codebase-best-practices.md +++ b/docs/i18n/ukrainian/codebase-best-practices.md @@ -1,54 +1,54 @@ # Рекомендації щодо кодової бази -## Styling a component +## Стилізація компоненту -We recommend styling components using our [design style guide](https://design-style-guide.freecodecamp.org/). +Ми рекомендуємо стилізувати компоненти, використовуючи наш [посібник зі стилю](https://design-style-guide.freecodecamp.org/). -The colors are defined in [`variable.css`](/client/src/components/layouts/variables.css), and the fonts are in [`fonts.css`](/client/src/components/layouts/fonts.css). +Кольори визначені у [`variable.css`](/client/src/components/layouts/variables.css), а шрифти визначені у [`fonts.css`](/client/src/components/layouts/fonts.css). -We are strongly opinionated about adding new variables/tokens to the colors. After careful research, the colors have been chosen to respect the freeCodeCamp brand identity, developer experience, and accessibility. +Ми категоричні щодо додавання нових змінних/токенів до кольорів. Після ретельного аналізу ми обрали кольори, які відповідають ідентичності бренду freeCodeCamp, досвіду розробників і доступності. -The `!important` keyword may be used to override values in some cases (e.g. accessibility concerns). You should add a comment describing the issue, so it doesn't get removed in future refactoring. +Ключове слово `!important` може бути використане для заміни значень у деяких випадках (наприклад, проблеми доступності). Ви повинні додати коментар з описом проблеми, щоб її не видалили у майбутньому рефакторингу. -### RTL support +### Підтримка RTL -We are striving to support right-to-left (RTL) layout in the codebase for languages that are read in this direction. For this you need be mindful of how to style components. Here are some quick rules of thumb to follow: +Ми прагнемо підтримувати макети справа наліво (RTL) у кодовій базі для мов, які використовують письмо в такому напрямку. Для цього потрібно бути уважними щодо стилізації компонентів. Ось деякі правила, яких потрібно дотримуватись: -- Don't use `float` properties - - Use Flexbox and Grid layouts instead, as they have RTL support already built-in, and those will be easier to maintain and review. -- Don't define the direction while using `margin` and `padding`: it may seem harmless to use `padding-right` and `margin-left`, but these directions aren't mirrored when the layout changes to RTL, and adding counter values for them in the RTL file makes maintaining the codebase harder. - - Use logical properties for them: You can add the same spacing by using `padding-inline-end` and `margin-inline-start`, and you won't need to worry about RTL layout, as they follow where the line starts and ends, and you won't need to add any extra values in the RTL files, so people won't need to remember to change the same values in two files. -- Don't use `!important` in `font-family`: RTL layout uses different fonts compared to the LTR layout, when you add `!important` in the `font-family` property it affects the RTL layout too. +- Не використовуйте властивості `float` + - Натомість використовуйте макети Flexbox та Grid, оскільки вони мають вбудовану підтримку RTL, і їх буде простіше підтримувати та переглядати. +- Не визначайте напрямок, використовуючи `margin` та `padding`: використання `padding-right` та `margin-left` може здаватись безобідним, але ці напрямки не відображаються, коли макет змінюється на RTL, а додавання протилежних значень ускладнює утримання кодової бази. + - Використовуйте логічні властивості: ви можете додати однаковий інтервал, використовуючи `padding-inline-end` та `margin-inline-start`, і вам не доведеться переживати про макет RTL, оскільки вони відповідають тому, де починається та закінчується рядок. Крім того, вам не доведеться турбуватися про додавання додаткових значень до файлів RTL, і, відповідно, не доведеться пам’ятати про зміну однакових значень у двох файлах. +- Не використовуйте `!important` у `font-family`: для макетів RTL та LTR використовуються різні шрифти; додавання `!important` до властивості `font-family` впливає й на макет RTL. -## General JavaScript +## Загальний JavaScript -In most cases, our [linter](how-to-setup-freecodecamp-locally.md#follow-these-steps-to-get-your-development-environment-ready) will warn of any formatting which goes against this codebase's preferred practice. +У більшості випадків наш [лінтер](how-to-setup-freecodecamp-locally.md#follow-these-steps-to-get-your-development-environment-ready) попереджатиме про будь-яке форматування, яке суперечить вподобанням нашої кодової бази. -It is encouraged to use functional components over class-based components. +Рекомендовано використовувати функціональні компоненти, а не класові. -## Specific TypeScript +## Особливий TypeScript -### Migrating a JavaScript File to TypeScript +### Перенесення файлу JavaScript до TypeScript #### Збереження історії файлів Git -Sometimes changing the file from `.js` to `.ts` (or `.tsx`) causes the original file to be deleted, and a new one created, and other times the filename just changes - in terms of Git. Ideally, we want the file history to be preserved. +Іноді зміна файлу з `.js` на `.ts` (або `.tsx`) призводить до видалення вихідного файлу та створення нового, а в іншому випадку просто змінюється назва файлу, згідно з Git. В ідеалі ми хочемо, щоб історія файлів була збережена. -The best bet at achieving this is to: +Для цього потрібно: 1. Перейменувати файл -2. Затвердити прапорцем `--no-verify`, щоб запобігти скаргам Хаскі на помилки lint -3. Провести реорганізацію коду в TypeScript, в окремому коміті +2. Позначити прапорцем `--no-verify`, щоб Хаскі не скаржився на помилки лінтера +3. Провести рефакторинг для перенесення у TypeScript в окремому коміті -> [!NOTE] Такі редактори, як VSCode, однаково показуватимуть, що файл видалено та створено новий. Якщо ви використовуєте CLI для `git add .`, то VSCode показуватиме файл як перейменований +> [!NOTE] Редактори типу VSCode однаково показуватимуть, що файл видалено та створено новий. Якщо ви використаєте CLI для `git add .`, то VSCode показуватиме файл як перейменований -### Naming Conventions +### Конвенції про іменування #### Інтерфейси та типи -For the most part, it is encouraged to use interface declarations over type declarations. +У більшості випадків рекомендовано використовувати оголошення інтерфейсу, а не оголошення типу. -React Component Props - suffix with `Props` +Пропси компоненту React – суфікс `Props` ```typescript interface MyComponentProps {} @@ -56,7 +56,7 @@ interface MyComponentProps {} const MyComponent = (props: MyComponentProps) => {}; ``` -React Stateful Components - suffix with `State` +Stateful-компоненти React – суфікс `State` ```typescript interface MyComponentState {} @@ -64,7 +64,7 @@ interface MyComponentState {} class MyComponent extends Component {} ``` -Default - object name in PascalCase +За замовчуванням – ім’я об’єкта ВерблюдячимРегістром ```typescript interface MyObject {} @@ -78,7 +78,7 @@ const myObject: MyObject = {}; ## Redux -### Action Definitions +### Визначення дій ```typescript enum AppActionTypes = { @@ -93,7 +93,7 @@ export const actionFunction = ( }); ``` -### How to Reduce +### Як використовувати reduce ```typescript // Base reducer action without payload @@ -120,9 +120,9 @@ export const reducer = ( }; ``` -### How to Dispatch +### Як використовувати dispatch -Within a component, import the actions and selectors needed. +Імпортуйте необхідні дії та селектори всередині компонента. ```tsx // Add type definition @@ -148,7 +148,7 @@ export default connect(null, mapDispatchToProps)(MyComponent); -## Further Literature +## Додаткова література -- [TypeScript Docs](https://www.typescriptlang.org/docs/) -- [TypeScript with React CheatSheet](https://github.com/typescript-cheatsheets/react#readme) +- [Документація TypeScript](https://www.typescriptlang.org/docs/) +- [Шпаргалка для TypeScript із React](https://github.com/typescript-cheatsheets/react#readme) diff --git a/docs/i18n/ukrainian/how-to-add-cypress-tests.md b/docs/i18n/ukrainian/how-to-add-cypress-tests.md index d7a3965316e..e3d3a935bb4 100644 --- a/docs/i18n/ukrainian/how-to-add-cypress-tests.md +++ b/docs/i18n/ukrainian/how-to-add-cypress-tests.md @@ -33,7 +33,13 @@ - Для запуску одного тесту: ```console - npm run cypress:dev:run -- --spec=cypress/pathToYourSpec/youSpecFileName.js + npm run cypress -- run --spec=cypress/ + ``` + + Наприклад: + + ```console + npm run cypress -- run --spec=cypress/e2e/default/landing.js ``` - Щоб створити збірку розробки, запустіть сервер розробки і виконайте всі наявні тести cypress: diff --git a/docs/i18n/ukrainian/how-to-contribute-to-the-codebase.md b/docs/i18n/ukrainian/how-to-contribute-to-the-codebase.md index 92b44d2c450..b2fbb65c0ad 100644 --- a/docs/i18n/ukrainian/how-to-contribute-to-the-codebase.md +++ b/docs/i18n/ukrainian/how-to-contribute-to-the-codebase.md @@ -134,7 +134,7 @@ Follow these steps: git status ``` - Output: + Вивід: ```console On branch feat/documentation @@ -155,7 +155,7 @@ Follow these steps: git commit -m "fix: my short commit message" ``` - Some examples: + Декілька прикладів: ```md fix: add test for JavaScript - for loop step @@ -201,7 +201,7 @@ After you've committed your changes, check here for [how to open a Pull Request] A quick reference to the commands that you will need when working. -| command | description | +| команда | опис | | -------------------------------------------------------------- | ----------------------------------------------------------------------------------- | | `npm test` | Run all JS tests in the system, including client, server, lint and challenge tests. | | `npm run test-client` | Run the client test suite. | diff --git a/docs/i18n/ukrainian/how-to-open-a-pull-request.md b/docs/i18n/ukrainian/how-to-open-a-pull-request.md index 8a2d1baefd2..2f2d64b88cb 100644 --- a/docs/i18n/ukrainian/how-to-open-a-pull-request.md +++ b/docs/i18n/ukrainian/how-to-open-a-pull-request.md @@ -1,52 +1,52 @@ -# How to open a Pull Request (PR) +# Як відкрити запит на пул (PR) -A pull request (PR) enables you to send changes from your fork on GitHub to freeCodeCamp.org's main repository. Once you are done making changes to the code, you can follow these guidelines to open a PR. +Запит на пул (PR) дозволяє надсилати зміни зі свого форку на GitHub до головного репозиторію freeCodeCamp.org. Як тільки ви закінчите вносити зміни до коду, дотримуйтесь цих рекомендацій, щоб відкрити запит на пул. -We expect our contributors to be aware of the process specific to this project. Following the guidelines religiously earns you the respect of fellow maintainers and saves everyone time. +Ми очікуємо, що наші помічники обізнані щодо процесу проєкту. Ви отримаєте повагу тих, хто відповідає за технічне обслуговування, і заощадите час, дотримуючись цих вказівок. -Some examples of this are: +Деякі приклади: -1. Do not edit files directly through GitHub – while you can, it's not a good idea. -2. Make sure you follow the PR checklist and not just tick things off; otherwise, we won't take you seriously. -3. Use the correct way to link issues in the description of the PR by updating the `XXXXXX`. Do not just add issue numbers everywhere and anywhere you feel like. -4. Do not "@mention" or request someone for reviews too many times. +1. Не редагуйте файли напряму через GitHub, це не дуже хороша ідея. +2. Переконайтесь, що дотримуєтесь контрольного списку PR, а не просто ставите галочки. В такому випадку ми не сприйматимемо вас серйозно. +3. Використайте правильний спосіб пов’язати завдання в описі PR, оновивши `XXXXXX`. Не додавайте номери завдань будь-де. +4. Не «@згадуйте» чи запитуйте відгук кілька разів. - We understand you are excited about contributing. As much as a maintainer will love to get back to you, they are busy people looking after hundreds of requests just like yours. Be patient, someone will get to you sooner or later. + Ми розуміємо, що ви раді зробити свій внесок. Модераторам подобається відповідати кожному, однак пам’ятайте: вони зайняті люди, які розглядають сотні запитів. Рано чи пізно, хтось дійде і до вашого запиту. -5. Do not work directly off your `main` branch - create a new branch for the changes you are working on. +5. Не працюйте напряму зі своєї гілки `main`. Створіть нову гілку для змін, над якими ви працюєте. -> [!NOTE] Your PR should be targeting changes to the English curriculum only. Read [this guide](index.md#translations) instead for contributing to translations. +> [!NOTE] Ваш PR повинен націлюватись лише на зміни навчальної програми англійською мовою. Див. [цей довідник](index.md#translations), щоб зробити внесок до перекладу. -## Prepare a good PR title +## Підготуйте хороший заголовок для PR -We recommend using [conventional title and messages](https://www.conventionalcommits.org/) for commits and pull request. The convention has the following format: +Ми рекомендуємо використовувати [ загальноприйняті заголовки та повідомлення](https://www.conventionalcommits.org/) для комітів і запитів на пул. Конвенція вимагає наступного формату: -> `([optional scope(s)]): ` +> `<тип>([область (необов’язково)]): <опис>` > -> For example: +> Наприклад: > -> `fix(learn): tests for the do...while loop challenge` +> `fix(learn): тести для завдання з циклу do...while` -Whenever you open a Pull Request(PR), you can use the below to determine the type, scope (optional), and description. +Щоразу, коли ви відкриваєте запит на пул (PR), використовуйте нижчеподану інформацію, щоб визначити тип, область та опис. -**Type:** +**Тип:** -| Type | When to select | -|:----- |:-------------------------------------------------------------------------------- | -| fix | Changed or updated/improved functionality, tests, the verbiage of a lesson, etc. | -| feat | Only if you are adding new functionality, tests, etc. | -| chore | Changes that are not related to code, tests, or verbiage of a lesson. | -| docs | Changes to `/docs` directory or the contributing guidelines, etc. | +| Тип | Коли обирати | +|:----- |:-------------------------------------------------------------------------- | +| fix | Змінені або оновлені/вдосконалені функції, тести, формулювання уроку тощо. | +| feat | Лише при додаванні нової функції, тестів тощо. | +| chore | Зміни, які не повʼязані з кодом, тестами або формулюванням уроку. | +| docs | Зміни до директорії `/docs` чи настанов щодо внесків тощо. | -**Scope:** +**Область:** -You can select a scope from [this list of labels](https://github.com/freeCodeCamp/freeCodeCamp/labels?q=scope). +Область можна обрати із [цього списку міток](https://github.com/freeCodeCamp/freeCodeCamp/labels?q=scope). -**Description:** +**Опис:** -Keep it short (less than 30 characters) and simple; you can add more information in the PR description box and comments. +Опис повинен бути коротким (не більше 30 символів) та простим; більше інформації можна додати в полі опису PR та коментарях. -Some examples of good PR titles would be: +Декілька прикладів хороших заголовків: - `fix(a11y): improved search bar contrast` - `feat: add more tests to HTML and CSS challenges` @@ -58,7 +58,7 @@ Some examples of good PR titles would be: 1. Once the edits have been committed, you will be prompted to create a pull request on your fork's GitHub Page.
                                                                                                                                                                                                                                                                                                                                    - See screenshot + Переглянути знімок екрану ![Image - Compare & pull request prompt on GitHub](https://contribute.freecodecamp.org/images/github/compare-pull-request-prompt.png) @@ -69,7 +69,7 @@ Some examples of good PR titles would be: Make sure that your Base Fork is set to freeCodeCamp/freeCodeCamp when raising a Pull Request.
                                                                                                                                                                                                                                                                                                                                    - See screenshot + Переглянути знімок екрану ![Image - Comparing forks when making a pull request](https://contribute.freecodecamp.org/images/github/comparing-forks-for-pull-request.png) @@ -93,13 +93,13 @@ Some examples of good PR titles would be: - If your PR affects the behaviour of a page it should be accompanied by corresponding [Cypress integration tests](how-to-add-cypress-tests.md). -## Feedback on pull requests +## Зворотний зв’язок по PR -> :tada: Congratulations on making a PR and thanks a lot for taking the time to contribute. +> :tada: Вітаємо зі створенням PR та дуже дякуємо, що знайшли час зробити свій внесок. -Our moderators will now take a look and leave you feedback. Please be patient with the fellow moderators and respect their time. All pull requests are reviewed in due course. +Наші модератори все переглянуть та залишать свій відгук. Будь ласка, наберіться терпіння та поважайте їхній час. Усі запити на пул розглядаються за усталеним порядком. -And as always, feel free to ask questions on the ['Contributors' category on our forum](https://forum.freecodecamp.org/c/contributors) or [the contributors chat room](https://discord.gg/PRyKn3Vbay). +І як завжди, не соромтеся ставити питання [на нашому форумі в категорії «Contributors»](https://forum.freecodecamp.org/c/contributors) або [у чат-кімнаті «contributors»](https://discord.gg/PRyKn3Vbay). > [!TIP] If you are to be contributing more pull requests, we recommend you read the [making changes and syncing](how-to-setup-freecodecamp-locally.md#making-changes-locally) guidelines to avoid having to delete your fork. @@ -123,11 +123,11 @@ When you are working on regular bugs and features on our development branch `mai 2. Resolve any conflicts and add / edit commits ```console - # Either + # Або git add . git commit -m "chore: resolve conflicts" - # Or + # Або git add . git commit --amend --no-edit ``` @@ -158,12 +158,12 @@ When you are working on features for our upcoming curriculum `next-*` branches, ```console git checkout - # example: + # приклад: # git checkout feat/add-numpy-video-question git checkout -b - # example: + # приклад: # git checkout -b backup-feat/add-numpy-video-question git branch -D @@ -174,7 +174,7 @@ When you are working on features for our upcoming curriculum `next-*` branches, ```console git checkout -b origin/ - # example: + # приклад: # git checkout -b backup-feat/add-numpy-video-question origin/feat/add-numpy-video-question ``` @@ -193,7 +193,7 @@ When you are working on features for our upcoming curriculum `next-*` branches, npm ci npm run test:curriculum --superblock= - # example: + # приклад: # npm run test:curriculum --superblock=python-for-everybody diff --git a/docs/i18n/ukrainian/index.md b/docs/i18n/ukrainian/index.md index bc500df199c..a06106f42e3 100644 --- a/docs/i18n/ukrainian/index.md +++ b/docs/i18n/ukrainian/index.md @@ -30,7 +30,7 @@ - [Португальська (Português)](https://www.freecodecamp.org/portuguese/learn) - [Українська](https://www.freecodecamp.org/ukrainian/learn) - [Японська (日本語)](https://www.freecodecamp.org/japanese/learn) -- [German (Deutsch)](https://www.freecodecamp.org/german/learn) +- [Німецька (Deutsch)](https://www.freecodecamp.org/german/learn) Радимо вам прочитати [це оголошення](https://www.freecodecamp.org/news/help-translate-freecodecamp-language/) та поділитися ним зі своїми друзями, аби зацікавити ще і їх. diff --git a/docs/i18n/ukrainian/moderator-handbook.md b/docs/i18n/ukrainian/moderator-handbook.md index a6d2788f447..dbbe2de9670 100644 --- a/docs/i18n/ukrainian/moderator-handbook.md +++ b/docs/i18n/ukrainian/moderator-handbook.md @@ -315,11 +315,11 @@ This is a standard message notifying you that, since you don't seem to have been If you think we did this in error, or once you're ready to come back and contribute more, just reply to this message letting us know. ``` -## How Our Contributors Room Works +## Як працює кімната помічників -Anyone is welcome in the [contributors room on our chat server](https://discord.gg/PRyKn3Vbay). It is the designated chat room for moderators and other campers who contribute to our community in any number of ways, including through study groups. +Ми вітаємо кожного у [кімнаті помічників на нашому чат-сервері](https://discord.gg/PRyKn3Vbay). Ми створили її для модераторів та інших кемперів, які роблять внесок до нашої спільноти будь-яким чином, включно з навчальними групами. -We assume contributors will read anything in this room that directly mentions them with an **@username**. Everything else is optional, but feel free to read anything anyone posts in there and interact. +Ми прискаємо, що помічники читають всі повідомлення, у яких вони згадуються через **@username**. Все інше за бажанням, однак не соромтесь читати інші дописи та взаємодіяти з ними. ## Комунікація із посередниками @@ -414,7 +414,7 @@ git fetch upstream git pull upstream main ```` -If you're using a GUI, you can simply `Add a new remote...` and use the link `git://github.com/freeCodeCamp/freeCodeCamp.git` from above. +Якщо ви використовуєте графічний інтерфейс користувача, просто виконайте команду `Add a new remote...` та використайте посилання `git://github.com/freeCodeCamp/freeCodeCamp.git`. Once you sync your fork and pass the build, we will be able to review your PR and merge it. 😊 @@ -441,7 +441,7 @@ If you're not familiar with the merge conflict process, feel free to look over G Also, it's good practice on GitHub to write a brief description of your changes when creating a PR. 📝 ```` -¹ If a first-time-contributor has a merge conflict, maintainers will resolve the conflict for them. +¹ Якщо у новачка виникає конфлікт злиття, то спеціалісти розв’яжуть цю проблему замість нього. ### Дублікат diff --git a/docs/i18n/ukrainian/user-token-workflow.md b/docs/i18n/ukrainian/user-token-workflow.md index e7dc16b32b9..59d3ed34ae6 100644 --- a/docs/i18n/ukrainian/user-token-workflow.md +++ b/docs/i18n/ukrainian/user-token-workflow.md @@ -4,7 +4,7 @@ ## Як їх створюють -Зараз токени використовуються лише для надсилання завдань над реляційною базою даних. A token gets created when a signed-in user clicks the "Click here to start the course" or "Click here to start the project" buttons to start one of the Relational Database courses or projects. +Зараз токени використовуються лише для надсилання завдань над реляційною базою даних. Токен створюється, коли зареєстрований користувач натискає «Натисніть тут, щоб розпочати курс» або «Натисніть тут, щоб розпочати проєкт», щоб розпочати один із курсів чи проєктів реляційної бази даних. ## Коли їх видаляють @@ -12,4 +12,4 @@ ## Як вони працюють -Токени зберігаються у колекції `UserToken` у базі даних. Кожен запис має унікальний `_id`, який є токеном та `user_id`, який посилає на обліковий запис користувача із колекції `user`. Токен закодовано за допомогою JWT та відправлено клієнту під час його створення. That encoded token is then given to third-party services that need it and sent to our API by them when a challenge is completed. Коли наш API отримує токен, він буде розкодованим, щоб ми могли ідентифікувати користувача та зберегти виконане завдання до його `completedChallenges`. +Токени зберігаються у колекції `UserToken` у базі даних. Кожен запис має унікальний `_id`, який є токеном та `user_id`, який посилає на обліковий запис користувача із колекції `user`. Токен закодовано за допомогою JWT та відправлено клієнту під час його створення. Потім цей закодований токен надають стороннім сервісам, які потребують його, а коли завдання виконане – відправляють його на наш API. Коли наш API отримує токен, він буде розкодованим, щоб ми могли ідентифікувати користувача та зберегти виконане завдання до його `completedChallenges`. diff --git a/docs/images/crowdin/context.png b/docs/images/crowdin/context.png index bfce9157f5f..2b3f0e17dce 100644 Binary files a/docs/images/crowdin/context.png and b/docs/images/crowdin/context.png differ diff --git a/docs/images/crowdin/pre-translate1.png b/docs/images/crowdin/pre-translate1.png index 6cd5fbf1ce1..a6c3e7f45ba 100644 Binary files a/docs/images/crowdin/pre-translate1.png and b/docs/images/crowdin/pre-translate1.png differ diff --git a/docs/images/crowdin/pre-translate2.png b/docs/images/crowdin/pre-translate2.png index a23d4daec2a..a5add9eda74 100644 Binary files a/docs/images/crowdin/pre-translate2.png and b/docs/images/crowdin/pre-translate2.png differ diff --git a/docs/images/crowdin/pre-translate3.png b/docs/images/crowdin/pre-translate3.png index f0daa4e66f4..c1f6fa5de63 100644 Binary files a/docs/images/crowdin/pre-translate3.png and b/docs/images/crowdin/pre-translate3.png differ diff --git a/docs/images/crowdin/tag-hover.png b/docs/images/crowdin/tag-hover.png index 545ae89fb0a..4fdf3a660e0 100644 Binary files a/docs/images/crowdin/tag-hover.png and b/docs/images/crowdin/tag-hover.png differ diff --git a/docs/images/google-analytics/filter-by-author.png b/docs/images/google-analytics/filter-by-author.png new file mode 100644 index 00000000000..e61a4a5a851 Binary files /dev/null and b/docs/images/google-analytics/filter-by-author.png differ diff --git a/docs/images/google-analytics/search-by-language.png b/docs/images/google-analytics/search-by-language.png new file mode 100644 index 00000000000..a32de0ef411 Binary files /dev/null and b/docs/images/google-analytics/search-by-language.png differ diff --git a/knip.jsonc b/knip.jsonc new file mode 100644 index 00000000000..05a44e74850 --- /dev/null +++ b/knip.jsonc @@ -0,0 +1,42 @@ +{ + "$schema": "https://unpkg.com/knip@next/schema.json", + + "ignore": "**/*.d.ts", + "ignoreBinaries": ["cd", "echo", "sh"], + + // Only workspaces with a configuration below are analyzed by Knip + "workspaces": { + ".": { + "entry": [], + // Configuration options can be overridden individually (necessary here as the default is `cypress/e2e/**/*.cy.{js,jsx,ts,tsx}`). + "cypress": ["cypress.config.js", "cypress/e2e/**/*.{js,ts}"] + }, + "client": { + // Files used by Gatsby are handled by Knip's Gatsby plugin (https://github.com/webpro/knip/blob/next/src/plugins/gatsby/README.md) + // The rest are `webpack.entry` files. + "entry": [], + "project": ["**/*.{js,ts,tsx}"], + "webpack": { + "config": "webpack-workers.js", + "entry": [ + "src/client/frame-runner.ts", + "src/client/workers/sass-compile.ts", + "src/client/workers/test-evaluator.ts" + ] + }, + "ignore": ["i18n/schema-validation.*", "**/__mocks__", "**/__fixtures__"] + }, + "client/plugins/*": { + "entry": "gatsby-node.js" + }, + // This monospace gives a few unused files, so as not to make the node.js-find-unused workflow fail this is still commented out + // Also try --production to find more unused files. + // "tools/ui-components": { + // "entry": ["src/index.ts!", "utils/gen-component-script.ts"], + // "project": ["src/**/*.{ts,tsx}!", "utils/*.ts"] + // }, + "tools/scripts/build": { + "entry": ["*.ts"] + } + } +} diff --git a/package-lock.json b/package-lock.json index 1c15f30d1a7..314287bced0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -43,7 +43,6 @@ "@types/enzyme-adapter-react-16": "1.0.6", "@types/eslint": "7.29.0", "@types/estree": "0.0.52", - "@types/faker": "5.5.9", "@types/inquirer": "8.2.5", "@types/jest": "27.5.2", "@types/jquery": "3.5.16", @@ -67,8 +66,8 @@ "@types/sanitize-html": "2.8.0", "@types/store": "2.0.2", "@types/validator": "13.7.10", - "@typescript-eslint/eslint-plugin": "5.48.0", - "@typescript-eslint/parser": "5.48.0", + "@typescript-eslint/eslint-plugin": "5.48.1", + "@typescript-eslint/parser": "5.48.1", "babel-eslint": "10.1.0", "babel-plugin-transform-imports": "2.0.0", "cross-env": "7.0.3", @@ -78,16 +77,15 @@ "docsify-cli": "4.4.4", "eslint": "7.32.0", "eslint-config-prettier": "8.6.0", - "eslint-plugin-import": "2.26.0", + "eslint-plugin-import": "2.27.4", "eslint-plugin-jest-dom": "3.9.4", - "eslint-plugin-jsx-a11y": "6.6.1", + "eslint-plugin-jsx-a11y": "6.7.1", "eslint-plugin-no-only-tests": "2.6.0", "eslint-plugin-prefer-object-spread": "1.2.1", - "eslint-plugin-react": "7.31.11", + "eslint-plugin-react": "7.32.0", "eslint-plugin-react-hooks": "4.6.0", "eslint-plugin-testing-library": "4.12.4", "execa": "5.1.1", - "faker": "5.5.3", "husky": "8.0.3", "jest": "27.5.1", "js-yaml": "3.14.1", @@ -430,7 +428,7 @@ "@babel/polyfill": "7.12.1", "@babel/preset-env": "7.20.2", "@babel/preset-react": "7.18.6", - "@babel/standalone": "7.20.11", + "@babel/standalone": "7.20.12", "@fortawesome/fontawesome-svg-core": "6.2.1", "@fortawesome/free-brands-svg-icons": "6.2.1", "@fortawesome/free-solid-svg-icons": "6.2.1", @@ -444,7 +442,7 @@ "@loadable/component": "5.15.2", "@reach/router": "1.3.4", "@sentry/gatsby": "6.19.7", - "@stripe/react-stripe-js": "1.16.1", + "@stripe/react-stripe-js": "1.16.3", "@stripe/stripe-js": "1.46.0", "@types/react-scrollable-anchor": "0.6.1", "algoliasearch": "4.14.3", @@ -459,9 +457,10 @@ "date-fns": "2.27.0", "enzyme": "3.11.0", "enzyme-adapter-react-16": "1.15.7", - "final-form": "4.20.7", + "final-form": "4.20.8", "gatsby": "3.15.0", "gatsby-cli": "3.15.0", + "gatsby-link": "3.15.0", "gatsby-plugin-advanced-sitemap": "2.1.0", "gatsby-plugin-create-client-paths": "3.15.0", "gatsby-plugin-manifest": "3.15.0", @@ -479,7 +478,7 @@ "nanoid": "3.3.4", "normalize-url": "4.5.1", "path-browserify": "1.0.1", - "postcss": "8.4.20", + "postcss": "8.4.21", "prismjs": "1.29.0", "process": "0.11.10", "prop-types": "15.8.1", @@ -488,11 +487,12 @@ "react": "16.14.0", "react-dom": "16.14.0", "react-final-form": "6.5.9", - "react-ga": "3.3.1", + "react-gtm-module": "2.0.11", "react-helmet": "6.1.0", "react-hotkeys": "2.0.0", "react-i18next": "11.18.6", - "react-instantsearch-dom": "6.38.1", + "react-instantsearch-core": "6.38.3", + "react-instantsearch-dom": "6.38.3", "react-lazy-load": "3.1.14", "react-monaco-editor": "0.40.0", "react-redux": "5.1.2", @@ -523,10 +523,11 @@ }, "devDependencies": { "@babel/types": "7.20.7", - "@codesee/babel-plugin-instrument": "0.470.0", - "@codesee/tracker": "0.470.0", + "@codesee/babel-plugin-instrument": "0.479.0", + "@codesee/tracker": "0.479.0", "@testing-library/jest-dom": "5.16.5", "@testing-library/react": "12.1.5", + "@types/react-gtm-module": "2.0.1", "autoprefixer": "10.4.13", "babel-plugin-transform-imports": "2.0.0", "chokidar": "3.5.3", @@ -627,7 +628,7 @@ "version": "0.0.0-next.4", "license": "(BSD-3-Clause AND CC-BY-SA-4.0)", "devDependencies": { - "@babel/core": "7.20.7", + "@babel/core": "7.20.12", "@babel/polyfill": "7.12.1", "@babel/preset-env": "7.20.2", "@babel/preset-typescript": "7.18.6", @@ -915,24 +916,24 @@ } }, "node_modules/@babel/core": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.20.7.tgz", - "integrity": "sha512-t1ZjCluspe5DW24bn2Rr1CDb2v9rn/hROtg9a2tmd0+QYf4bsloYfLQzjG4qHPNMhWtKdGC33R5AxGR2Af2cBw==", + "version": "7.20.12", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.20.12.tgz", + "integrity": "sha512-XsMfHovsUYHFMdrIHkZphTN/2Hzzi78R08NuHfDBehym2VsPDL6Zn/JAD/JQdnRvbSsbQc4mVaU1m6JgtTEElg==", "dependencies": { "@ampproject/remapping": "^2.1.0", "@babel/code-frame": "^7.18.6", "@babel/generator": "^7.20.7", "@babel/helper-compilation-targets": "^7.20.7", - "@babel/helper-module-transforms": "^7.20.7", + "@babel/helper-module-transforms": "^7.20.11", "@babel/helpers": "^7.20.7", "@babel/parser": "^7.20.7", "@babel/template": "^7.20.7", - "@babel/traverse": "^7.20.7", + "@babel/traverse": "^7.20.12", "@babel/types": "^7.20.7", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", - "json5": "^2.2.1", + "json5": "^2.2.2", "semver": "^6.3.0" }, "engines": { @@ -2723,10 +2724,11 @@ } }, "node_modules/@babel/runtime": { - "version": "7.19.4", - "license": "MIT", + "version": "7.20.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.7.tgz", + "integrity": "sha512-UF0tvkUtxwAgZ5W/KrkHf0Rn0fdnLDU9ScxBrEVNUprE/MzirjK4MJUX1/BVDv00Sv8cljtukVK1aky++X1SjQ==", "dependencies": { - "regenerator-runtime": "^0.13.4" + "regenerator-runtime": "^0.13.11" }, "engines": { "node": ">=6.9.0" @@ -2734,6 +2736,7 @@ }, "node_modules/@babel/runtime-corejs3": { "version": "7.16.3", + "dev": true, "license": "MIT", "dependencies": { "core-js-pure": "^3.19.0", @@ -2744,9 +2747,9 @@ } }, "node_modules/@babel/standalone": { - "version": "7.20.11", - "resolved": "https://registry.npmjs.org/@babel/standalone/-/standalone-7.20.11.tgz", - "integrity": "sha512-WUPlwwXFk3iViGE7QFVVp423eVtT+eoXu1940Xu4QJgqgHBF6WWtlwO1Ip5rIWQnp7OHrGdwrwKLtLhUVfOZbA==", + "version": "7.20.12", + "resolved": "https://registry.npmjs.org/@babel/standalone/-/standalone-7.20.12.tgz", + "integrity": "sha512-hK/X+m1il3w1tYS4H8LDaGCEdiT47SVqEXY8RiEAgou26BystipSU8ZL6EvBR6t5l7lTv0ilBiChXWblKJ5iUA==", "engines": { "node": ">=6.9.0" } @@ -2765,9 +2768,9 @@ } }, "node_modules/@babel/traverse": { - "version": "7.20.10", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.10.tgz", - "integrity": "sha512-oSf1juCgymrSez8NI4A2sr4+uB/mFd9MXplYGPEBnfAuWmmyeVcHa6xLPiaRBcXkcb/28bgxmQLTVwFKE1yfsg==", + "version": "7.20.12", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.12.tgz", + "integrity": "sha512-MsIbFN0u+raeja38qboyF8TIT7K0BFzz/Yd/77ta4MsUsmP2RAnidIlwq7d5HFQrH/OZJecGV6B71C4zAgpoSQ==", "dependencies": { "@babel/code-frame": "^7.18.6", "@babel/generator": "^7.20.7", @@ -2841,9 +2844,9 @@ } }, "node_modules/@codesee/babel-plugin-instrument": { - "version": "0.470.0", - "resolved": "https://registry.npmjs.org/@codesee/babel-plugin-instrument/-/babel-plugin-instrument-0.470.0.tgz", - "integrity": "sha512-vQZ8Ugt4yPGgGTVPBDTI6BtiBGEes/r35O7MnQ0RzY0Ebw0vs/q6+1zos0z0HXkYt5CsDb65VGQV4h7ySskBeA==", + "version": "0.479.0", + "resolved": "https://registry.npmjs.org/@codesee/babel-plugin-instrument/-/babel-plugin-instrument-0.479.0.tgz", + "integrity": "sha512-5fAc8y4jWAZOB70ivVnUhR2o/oYfr2WtxCnKKrV6p369NWRgufqACZte48HvBjxcNXzbKgEOaMlyl4yK2leR9Q==", "dev": true, "dependencies": { "@babel/plugin-syntax-jsx": "^7.12.13", @@ -2858,9 +2861,9 @@ } }, "node_modules/@codesee/tracker": { - "version": "0.470.0", - "resolved": "https://registry.npmjs.org/@codesee/tracker/-/tracker-0.470.0.tgz", - "integrity": "sha512-pphmdAb6waC/XP4ZHUQCoHZ04FSdpX3q+TJ9/YPJvHoebPA4xmUSwnw3jHsE8Y4MA15/n0NQQlzd/QYOWFxANw==", + "version": "0.479.0", + "resolved": "https://registry.npmjs.org/@codesee/tracker/-/tracker-0.479.0.tgz", + "integrity": "sha512-JjXgIX0g6IEEPMPQPebL7lu9+9tIcjzzmJDIJgO9C323p2QDveEkjvEXbBnTVU4tdvCx8aX6ldJYTOxaZ8uYJg==", "dev": true }, "node_modules/@cspotcode/source-map-support": { @@ -13030,9 +13033,9 @@ } }, "node_modules/@stripe/react-stripe-js": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/@stripe/react-stripe-js/-/react-stripe-js-1.16.1.tgz", - "integrity": "sha512-einalv46WrAZhCN8jDHz3e6ePYmwwkbwDfv//XPKw/higzdiZmSZgMJWeqEOPvalf8qryx9vOXOYaH7G6yUGug==", + "version": "1.16.3", + "resolved": "https://registry.npmjs.org/@stripe/react-stripe-js/-/react-stripe-js-1.16.3.tgz", + "integrity": "sha512-gS6UDGEuM92K50pFB3o//EqqPxmaqpC8IrsBda4P4LxeULoO0pBFSHXJ5Ab6uA7G2lyO2bluvSLereh0OH9GrQ==", "dependencies": { "prop-types": "^15.7.2" }, @@ -13874,11 +13877,6 @@ "@types/range-parser": "*" } }, - "node_modules/@types/faker": { - "version": "5.5.9", - "dev": true, - "license": "MIT" - }, "node_modules/@types/get-port": { "version": "3.2.0", "license": "MIT" @@ -14159,6 +14157,12 @@ "@types/react": "^17" } }, + "node_modules/@types/react-gtm-module": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/react-gtm-module/-/react-gtm-module-2.0.1.tgz", + "integrity": "sha512-T/DN9gAbCYk5wJ1nxf4pSwmXz4d1iVjM++OoG+mwMfz9STMAotGjSb65gJHOS5bPvl6vLSsJnuC+y/43OQrltg==", + "dev": true + }, "node_modules/@types/react-helmet": { "version": "6.1.6", "resolved": "https://registry.npmjs.org/@types/react-helmet/-/react-helmet-6.1.6.tgz", @@ -14597,13 +14601,13 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.48.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.48.0.tgz", - "integrity": "sha512-SVLafp0NXpoJY7ut6VFVUU9I+YeFsDzeQwtK0WZ+xbRN3mtxJ08je+6Oi2N89qDn087COdO0u3blKZNv9VetRQ==", + "version": "5.48.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.48.1.tgz", + "integrity": "sha512-9nY5K1Rp2ppmpb9s9S2aBiF3xo5uExCehMDmYmmFqqyxgenbHJ3qbarcLt4ITgaD6r/2ypdlcFRdcuVPnks+fQ==", "dependencies": { - "@typescript-eslint/scope-manager": "5.48.0", - "@typescript-eslint/type-utils": "5.48.0", - "@typescript-eslint/utils": "5.48.0", + "@typescript-eslint/scope-manager": "5.48.1", + "@typescript-eslint/type-utils": "5.48.1", + "@typescript-eslint/utils": "5.48.1", "debug": "^4.3.4", "ignore": "^5.2.0", "natural-compare-lite": "^1.4.0", @@ -14838,13 +14842,13 @@ "license": "ISC" }, "node_modules/@typescript-eslint/parser": { - "version": "5.48.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.48.0.tgz", - "integrity": "sha512-1mxNA8qfgxX8kBvRDIHEzrRGrKHQfQlbW6iHyfHYS0Q4X1af+S6mkLNtgCOsGVl8+/LUPrqdHMssAemkrQ01qg==", + "version": "5.48.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.48.1.tgz", + "integrity": "sha512-4yg+FJR/V1M9Xoq56SF9Iygqm+r5LMXvheo6DQ7/yUWynQ4YfCRnsKuRgqH4EQ5Ya76rVwlEpw4Xu+TgWQUcdA==", "dependencies": { - "@typescript-eslint/scope-manager": "5.48.0", - "@typescript-eslint/types": "5.48.0", - "@typescript-eslint/typescript-estree": "5.48.0", + "@typescript-eslint/scope-manager": "5.48.1", + "@typescript-eslint/types": "5.48.1", + "@typescript-eslint/typescript-estree": "5.48.1", "debug": "^4.3.4" }, "engines": { @@ -14885,12 +14889,12 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.48.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.48.0.tgz", - "integrity": "sha512-0AA4LviDtVtZqlyUQnZMVHydDATpD9SAX/RC5qh6cBd3xmyWvmXYF+WT1oOmxkeMnWDlUVTwdODeucUnjz3gow==", + "version": "5.48.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.48.1.tgz", + "integrity": "sha512-S035ueRrbxRMKvSTv9vJKIWgr86BD8s3RqoRZmsSh/s8HhIs90g6UlK8ZabUSjUZQkhVxt7nmZ63VJ9dcZhtDQ==", "dependencies": { - "@typescript-eslint/types": "5.48.0", - "@typescript-eslint/visitor-keys": "5.48.0" + "@typescript-eslint/types": "5.48.1", + "@typescript-eslint/visitor-keys": "5.48.1" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -14901,12 +14905,12 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.48.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.48.0.tgz", - "integrity": "sha512-vbtPO5sJyFjtHkGlGK4Sthmta0Bbls4Onv0bEqOGm7hP9h8UpRsHJwsrCiWtCUndTRNQO/qe6Ijz9rnT/DB+7g==", + "version": "5.48.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.48.1.tgz", + "integrity": "sha512-Hyr8HU8Alcuva1ppmqSYtM/Gp0q4JOp1F+/JH5D1IZm/bUBrV0edoewQZiEc1r6I8L4JL21broddxK8HAcZiqQ==", "dependencies": { - "@typescript-eslint/typescript-estree": "5.48.0", - "@typescript-eslint/utils": "5.48.0", + "@typescript-eslint/typescript-estree": "5.48.1", + "@typescript-eslint/utils": "5.48.1", "debug": "^4.3.4", "tsutils": "^3.21.0" }, @@ -14948,9 +14952,9 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/@typescript-eslint/types": { - "version": "5.48.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.48.0.tgz", - "integrity": "sha512-UTe67B0Ypius0fnEE518NB2N8gGutIlTojeTg4nt0GQvikReVkurqxd2LvYa9q9M5MQ6rtpNyWTBxdscw40Xhw==", + "version": "5.48.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.48.1.tgz", + "integrity": "sha512-xHyDLU6MSuEEdIlzrrAerCGS3T7AA/L8Hggd0RCYBi0w3JMvGYxlLlXHeg50JI9Tfg5MrtsfuNxbS/3zF1/ATg==", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -14960,12 +14964,12 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.48.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.48.0.tgz", - "integrity": "sha512-7pjd94vvIjI1zTz6aq/5wwE/YrfIyEPLtGJmRfyNR9NYIW+rOvzzUv3Cmq2hRKpvt6e9vpvPUQ7puzX7VSmsEw==", + "version": "5.48.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.48.1.tgz", + "integrity": "sha512-Hut+Osk5FYr+sgFh8J/FHjqX6HFcDzTlWLrFqGoK5kVUN3VBHF/QzZmAsIXCQ8T/W9nQNBTqalxi1P3LSqWnRA==", "dependencies": { - "@typescript-eslint/types": "5.48.0", - "@typescript-eslint/visitor-keys": "5.48.0", + "@typescript-eslint/types": "5.48.1", + "@typescript-eslint/visitor-keys": "5.48.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -15037,15 +15041,15 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/@typescript-eslint/utils": { - "version": "5.48.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.48.0.tgz", - "integrity": "sha512-x2jrMcPaMfsHRRIkL+x96++xdzvrdBCnYRd5QiW5Wgo1OB4kDYPbC1XjWP/TNqlfK93K/lUL92erq5zPLgFScQ==", + "version": "5.48.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.48.1.tgz", + "integrity": "sha512-SmQuSrCGUOdmGMwivW14Z0Lj8dxG1mOFZ7soeJ0TQZEJcs3n5Ndgkg0A4bcMFzBELqLJ6GTHnEU+iIoaD6hFGA==", "dependencies": { "@types/json-schema": "^7.0.9", "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.48.0", - "@typescript-eslint/types": "5.48.0", - "@typescript-eslint/typescript-estree": "5.48.0", + "@typescript-eslint/scope-manager": "5.48.1", + "@typescript-eslint/types": "5.48.1", + "@typescript-eslint/typescript-estree": "5.48.1", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0", "semver": "^7.3.7" @@ -15089,11 +15093,11 @@ "license": "ISC" }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.48.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.48.0.tgz", - "integrity": "sha512-5motVPz5EgxQ0bHjut3chzBkJ3Z3sheYVcSwS5BpHZpLqSptSmELNtGixmgj65+rIfhvtQTz5i9OP2vtzdDH7Q==", + "version": "5.48.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.48.1.tgz", + "integrity": "sha512-Ns0XBwmfuX7ZknznfXozgnydyR8F6ev/KEGePP4i74uL3ArsKbEhJ7raeKr1JSa997DBDwol/4a0Y+At82c9dA==", "dependencies": { - "@typescript-eslint/types": "5.48.0", + "@typescript-eslint/types": "5.48.1", "eslint-visitor-keys": "^3.3.0" }, "engines": { @@ -15701,8 +15705,9 @@ } }, "node_modules/algoliasearch-helper": { - "version": "3.11.1", - "license": "MIT", + "version": "3.11.2", + "resolved": "https://registry.npmjs.org/algoliasearch-helper/-/algoliasearch-helper-3.11.2.tgz", + "integrity": "sha512-eKvSM5hz5w9RcUowu8LnQ5v0KRrFLCvF4K3KF/Ab3VwCT726rWgZUWUIQUPjr9qDENUMukQ/IHZ7bGUVYRGP0g==", "dependencies": { "@algolia/events": "^4.0.1" }, @@ -15923,12 +15928,45 @@ "license": "Python-2.0" }, "node_modules/aria-query": { - "version": "5.0.0", - "license": "Apache-2.0", - "engines": { - "node": ">=6.0" + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.1.3.tgz", + "integrity": "sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ==", + "dependencies": { + "deep-equal": "^2.0.5" } }, + "node_modules/aria-query/node_modules/deep-equal": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.0.tgz", + "integrity": "sha512-RdpzE0Hv4lhowpIUKKMJfeH6C1pXdtT1/it80ubgWqwI3qpuxUBpC1S4hnHg+zjnuOoDkzUtUCEEkG+XG5l3Mw==", + "dependencies": { + "call-bind": "^1.0.2", + "es-get-iterator": "^1.1.2", + "get-intrinsic": "^1.1.3", + "is-arguments": "^1.1.1", + "is-array-buffer": "^3.0.1", + "is-date-object": "^1.0.5", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "isarray": "^2.0.5", + "object-is": "^1.1.5", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.4.3", + "side-channel": "^1.0.4", + "which-boxed-primitive": "^1.0.2", + "which-collection": "^1.0.1", + "which-typed-array": "^1.1.9" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/aria-query/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" + }, "node_modules/arr-diff": { "version": "4.0.0", "license": "MIT", @@ -16041,12 +16079,14 @@ } }, "node_modules/array.prototype.flat": { - "version": "1.2.5", - "license": "MIT", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz", + "integrity": "sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==", "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.0" + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -16373,8 +16413,9 @@ "license": "MIT" }, "node_modules/axe-core": { - "version": "4.4.3", - "license": "MPL-2.0", + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.6.2.tgz", + "integrity": "sha512-b1WlTV8+XKLj9gZy2DZXgQiyDp9xkkoe2a6U6UbYccScq2wgH/YwCeI2/Jq2mgo0HzQxqJOjWZBLeA/mqsk5Mg==", "engines": { "node": ">=4" } @@ -16387,8 +16428,44 @@ } }, "node_modules/axobject-query": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-3.1.1.tgz", + "integrity": "sha512-goKlv8DZrK9hUh975fnHzhNIO4jUnFCfv/dszV5VwUGDFjI6vQ2VwoyjYjYNEbBE8AH87TduWP5uyDR1D+Iteg==", + "dependencies": { + "deep-equal": "^2.0.5" + } + }, + "node_modules/axobject-query/node_modules/deep-equal": { "version": "2.2.0", - "license": "Apache-2.0" + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.0.tgz", + "integrity": "sha512-RdpzE0Hv4lhowpIUKKMJfeH6C1pXdtT1/it80ubgWqwI3qpuxUBpC1S4hnHg+zjnuOoDkzUtUCEEkG+XG5l3Mw==", + "dependencies": { + "call-bind": "^1.0.2", + "es-get-iterator": "^1.1.2", + "get-intrinsic": "^1.1.3", + "is-arguments": "^1.1.1", + "is-array-buffer": "^3.0.1", + "is-date-object": "^1.0.5", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "isarray": "^2.0.5", + "object-is": "^1.1.5", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.4.3", + "side-channel": "^1.0.4", + "which-boxed-primitive": "^1.0.2", + "which-collection": "^1.0.1", + "which-typed-array": "^1.1.9" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/axobject-query/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" }, "node_modules/babel-code-frame": { "version": "6.26.0", @@ -23201,7 +23278,6 @@ }, "node_modules/es-get-iterator": { "version": "1.1.2", - "dev": true, "license": "MIT", "dependencies": { "call-bind": "^1.0.2", @@ -23219,7 +23295,6 @@ }, "node_modules/es-get-iterator/node_modules/isarray": { "version": "2.0.5", - "dev": true, "license": "MIT" }, "node_modules/es-module-lexer": { @@ -23479,11 +23554,13 @@ } }, "node_modules/eslint-import-resolver-node": { - "version": "0.3.6", - "license": "MIT", + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz", + "integrity": "sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==", "dependencies": { "debug": "^3.2.7", - "resolve": "^1.20.0" + "is-core-module": "^2.11.0", + "resolve": "^1.22.1" } }, "node_modules/eslint-import-resolver-node/node_modules/debug": { @@ -23498,14 +23575,19 @@ "license": "MIT" }, "node_modules/eslint-module-utils": { - "version": "2.7.3", - "license": "MIT", + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.4.tgz", + "integrity": "sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==", "dependencies": { - "debug": "^3.2.7", - "find-up": "^2.1.0" + "debug": "^3.2.7" }, "engines": { "node": ">=4" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } } }, "node_modules/eslint-module-utils/node_modules/debug": { @@ -23550,21 +23632,24 @@ } }, "node_modules/eslint-plugin-import": { - "version": "2.26.0", - "license": "MIT", + "version": "2.27.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.27.4.tgz", + "integrity": "sha512-Z1jVt1EGKia1X9CnBCkpAOhWy8FgQ7OmJ/IblEkT82yrFU/xJaxwujaTzLWqigewwynRQ9mmHfX9MtAfhxm0sA==", "dependencies": { - "array-includes": "^3.1.4", - "array.prototype.flat": "^1.2.5", - "debug": "^2.6.9", + "array-includes": "^3.1.6", + "array.prototype.flat": "^1.3.1", + "array.prototype.flatmap": "^1.3.0", + "debug": "^3.2.7", "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.6", - "eslint-module-utils": "^2.7.3", + "eslint-import-resolver-node": "^0.3.7", + "eslint-module-utils": "^2.7.4", "has": "^1.0.3", - "is-core-module": "^2.8.1", + "is-core-module": "^2.11.0", "is-glob": "^4.0.3", "minimatch": "^3.1.2", - "object.values": "^1.1.5", - "resolve": "^1.22.0", + "object.values": "^1.1.6", + "resolve": "^1.22.1", + "semver": "^6.3.0", "tsconfig-paths": "^3.14.1" }, "engines": { @@ -23574,9 +23659,18 @@ "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" } }, + "node_modules/eslint-plugin-import/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dependencies": { + "ms": "^2.1.1" + } + }, "node_modules/eslint-plugin-import/node_modules/doctrine": { "version": "2.1.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "dependencies": { "esutils": "^2.0.2" }, @@ -23586,7 +23680,8 @@ }, "node_modules/eslint-plugin-import/node_modules/minimatch": { "version": "3.1.2", - "license": "ISC", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -23594,6 +23689,11 @@ "node": "*" } }, + "node_modules/eslint-plugin-import/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, "node_modules/eslint-plugin-jest": { "version": "25.7.0", "license": "MIT", @@ -23771,21 +23871,25 @@ } }, "node_modules/eslint-plugin-jsx-a11y": { - "version": "6.6.1", - "license": "MIT", + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.7.1.tgz", + "integrity": "sha512-63Bog4iIethyo8smBklORknVjB0T2dwB8Mr/hIC+fBS0uyHdYYpzM/Ed+YC8VxTjlXHEWFOdmgwcDn1U2L9VCA==", "dependencies": { - "@babel/runtime": "^7.18.9", - "aria-query": "^4.2.2", - "array-includes": "^3.1.5", + "@babel/runtime": "^7.20.7", + "aria-query": "^5.1.3", + "array-includes": "^3.1.6", + "array.prototype.flatmap": "^1.3.1", "ast-types-flow": "^0.0.7", - "axe-core": "^4.4.3", - "axobject-query": "^2.2.0", + "axe-core": "^4.6.2", + "axobject-query": "^3.1.1", "damerau-levenshtein": "^1.0.8", "emoji-regex": "^9.2.2", "has": "^1.0.3", - "jsx-ast-utils": "^3.3.2", - "language-tags": "^1.0.5", + "jsx-ast-utils": "^3.3.3", + "language-tags": "=1.0.5", "minimatch": "^3.1.2", + "object.entries": "^1.1.6", + "object.fromentries": "^2.0.6", "semver": "^6.3.0" }, "engines": { @@ -23795,20 +23899,10 @@ "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8" } }, - "node_modules/eslint-plugin-jsx-a11y/node_modules/aria-query": { - "version": "4.2.2", - "license": "Apache-2.0", - "dependencies": { - "@babel/runtime": "^7.10.2", - "@babel/runtime-corejs3": "^7.10.2" - }, - "engines": { - "node": ">=6.0" - } - }, "node_modules/eslint-plugin-jsx-a11y/node_modules/minimatch": { "version": "3.1.2", - "license": "ISC", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -23836,8 +23930,9 @@ } }, "node_modules/eslint-plugin-react": { - "version": "7.31.11", - "license": "MIT", + "version": "7.32.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.32.0.tgz", + "integrity": "sha512-vSBi1+SrPiLZCGvxpiZIa28fMEUaMjXtCplrvxcIxGzmFiYdsXQDwInEjuv5/i/2CTTxbkS87tE8lsQ0Qxinbw==", "dependencies": { "array-includes": "^3.1.6", "array.prototype.flatmap": "^1.3.1", @@ -23851,7 +23946,7 @@ "object.hasown": "^1.1.2", "object.values": "^1.1.6", "prop-types": "^15.8.1", - "resolve": "^2.0.0-next.3", + "resolve": "^2.0.0-next.4", "semver": "^6.3.0", "string.prototype.matchall": "^4.0.8" }, @@ -23874,7 +23969,8 @@ }, "node_modules/eslint-plugin-react/node_modules/doctrine": { "version": "2.1.0", - "license": "Apache-2.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "dependencies": { "esutils": "^2.0.2" }, @@ -23884,7 +23980,8 @@ }, "node_modules/eslint-plugin-react/node_modules/minimatch": { "version": "3.1.2", - "license": "ISC", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -23894,7 +23991,8 @@ }, "node_modules/eslint-plugin-react/node_modules/resolve": { "version": "2.0.0-next.4", - "license": "MIT", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.4.tgz", + "integrity": "sha512-iMDbmAWtfU+MHpxt/I5iWI7cY6YVEZUQ3MBgPQ++XD1PELuJHIl82xBmObyP2KyQmkNB2dsqF7seoQQiAn5yDQ==", "dependencies": { "is-core-module": "^2.9.0", "path-parse": "^1.0.7", @@ -25067,11 +25165,6 @@ "node": "> 0.1.90" } }, - "node_modules/faker": { - "version": "5.5.3", - "dev": true, - "license": "MIT" - }, "node_modules/fast-copy": { "version": "2.1.1", "license": "MIT" @@ -25355,8 +25448,9 @@ } }, "node_modules/final-form": { - "version": "4.20.7", - "license": "MIT", + "version": "4.20.8", + "resolved": "https://registry.npmjs.org/final-form/-/final-form-4.20.8.tgz", + "integrity": "sha512-knyoRbK42XvZOwfElVSZEfE9licdOmgLLUfPSuxJOl0UhjYT1HiBaHZlfYnwqmvo1H9ucNGyXDHoUP0vI0474g==", "dependencies": { "@babel/runtime": "^7.10.0" }, @@ -25454,16 +25548,6 @@ "node": ">=6" } }, - "node_modules/find-up": { - "version": "2.1.0", - "license": "MIT", - "dependencies": { - "locate-path": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/flat": { "version": "5.0.2", "dev": true, @@ -25539,6 +25623,14 @@ } } }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dependencies": { + "is-callable": "^1.1.3" + } + }, "node_modules/for-in": { "version": "1.0.2", "license": "MIT", @@ -25546,10 +25638,6 @@ "node": ">=0.10.0" } }, - "node_modules/foreach": { - "version": "2.0.5", - "license": "MIT" - }, "node_modules/foreground-child": { "version": "2.0.0", "dev": true, @@ -28673,6 +28761,17 @@ "node": ">=8" } }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/got": { "version": "11.8.5", "license": "MIT", @@ -30492,6 +30591,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-array-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.1.tgz", + "integrity": "sha512-ASfLknmY8Xa2XtB4wmbz13Wu202baeA18cJBCeCy0wXUHZF0IPyVEXqKEcd+t2fNSLLL1vC6k7lxZEojNbISXQ==", + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-typed-array": "^1.1.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-arrayish": { "version": "0.2.1", "license": "MIT" @@ -30575,8 +30687,9 @@ "license": "MIT" }, "node_modules/is-core-module": { - "version": "2.9.0", - "license": "MIT", + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", + "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", "dependencies": { "has": "^1.0.3" }, @@ -30781,7 +30894,6 @@ }, "node_modules/is-map": { "version": "2.0.2", - "dev": true, "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" @@ -30983,7 +31095,6 @@ }, "node_modules/is-set": { "version": "2.0.2", - "dev": true, "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" @@ -31047,13 +31158,14 @@ } }, "node_modules/is-typed-array": { - "version": "1.1.8", - "license": "MIT", + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", + "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", "dependencies": { "available-typed-arrays": "^1.0.5", "call-bind": "^1.0.2", - "es-abstract": "^1.18.5", - "foreach": "^2.0.5", + "for-each": "^0.3.3", + "gopd": "^1.0.1", "has-tostringtag": "^1.0.0" }, "engines": { @@ -31116,6 +31228,14 @@ "node": ">=0.10.0" } }, + "node_modules/is-weakmap": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.1.tgz", + "integrity": "sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-weakref": { "version": "1.0.2", "license": "MIT", @@ -31126,6 +31246,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-weakset": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.2.tgz", + "integrity": "sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==", + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-whitespace-character": { "version": "1.0.4", "license": "MIT", @@ -33642,11 +33774,12 @@ } }, "node_modules/jsx-ast-utils": { - "version": "3.3.2", - "license": "MIT", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.3.tgz", + "integrity": "sha512-fYQHZTZ8jSfmWZ0iyzfwiU4WDX4HpHbMCZ3gPlWYiCl3BoeOTsqKBqnTVfH2rYT7eP5c3sVbeSPHnnJOaTrWiw==", "dependencies": { "array-includes": "^3.1.5", - "object.assign": "^4.1.2" + "object.assign": "^4.1.3" }, "engines": { "node": ">=4.0" @@ -34668,17 +34801,6 @@ "version": "0.1.2", "license": "MIT" }, - "node_modules/locate-path": { - "version": "2.0.0", - "license": "MIT", - "dependencies": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/lock": { "version": "1.1.0", "license": "MIT" @@ -38480,8 +38602,9 @@ "license": "MIT" }, "node_modules/node-fetch": { - "version": "2.6.7", - "license": "MIT", + "version": "2.6.8", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.8.tgz", + "integrity": "sha512-RZ6dBYuj8dRSfxpUSu+NsdF1dpPpluJxwOp+6IoDp/sH2QNDSvurYsAa+F1WxY2RjA1iP93xhcsUoYbF2XBqVg==", "dependencies": { "whatwg-url": "^5.0.0" }, @@ -38499,15 +38622,18 @@ }, "node_modules/node-fetch/node_modules/tr46": { "version": "0.0.3", - "license": "MIT" + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, "node_modules/node-fetch/node_modules/webidl-conversions": { "version": "3.0.1", - "license": "BSD-2-Clause" + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" }, "node_modules/node-fetch/node_modules/whatwg-url": { "version": "5.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" @@ -39909,33 +40035,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/p-locate": { - "version": "2.0.0", - "license": "MIT", - "dependencies": { - "p-limit": "^1.1.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/p-locate/node_modules/p-limit": { - "version": "1.3.0", - "license": "MIT", - "dependencies": { - "p-try": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/p-locate/node_modules/p-try": { - "version": "1.0.0", - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/p-map": { "version": "3.0.0", "license": "MIT", @@ -40922,9 +41021,9 @@ } }, "node_modules/postcss": { - "version": "8.4.20", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.20.tgz", - "integrity": "sha512-6Q04AXR1212bXr5fh03u8aAwbLxAQNGQ/Q1LNa0VfOI06ZAlhPHtQvE4OIdpj4kLThXilalPnmDSOD65DcHt+g==", + "version": "8.4.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz", + "integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==", "funding": [ { "type": "opencollective", @@ -41973,9 +42072,9 @@ } }, "node_modules/prettier": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.1.tgz", - "integrity": "sha512-lqGoSJBQNJidqCHE80vqZJHWHRFoNYsSpP9AjFhlhi9ODCJA541svILes/+/1GM3VaL/abZi7cpFzOpdR9UPKg==", + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.3.tgz", + "integrity": "sha512-tJ/oJ4amDihPoufT5sM0Z1SKEuKay8LfVAMlbbhnnkvt6BUserZylqo2PN+p9KeljLr0OHa2rXHU1T8reeoTrw==", "bin": { "prettier": "bin-prettier.js" }, @@ -43015,13 +43114,10 @@ "react": "^16.8.0 || ^17.0.0 || ^18.0.0" } }, - "node_modules/react-ga": { - "version": "3.3.1", - "license": "Apache-2.0", - "peerDependencies": { - "prop-types": "^15.6.0", - "react": "^15.6.2 || ^16.0 || ^17 || ^18" - } + "node_modules/react-gtm-module": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/react-gtm-module/-/react-gtm-module-2.0.11.tgz", + "integrity": "sha512-8gyj4TTxeP7eEyc2QKawEuQoAZdjKvMY4pgWfycGmqGByhs17fR+zEBs0JUDq4US/l+vbTl+6zvUIx27iDo/Vw==" }, "node_modules/react-helmet": { "version": "6.1.0", @@ -43080,11 +43176,12 @@ } }, "node_modules/react-instantsearch-core": { - "version": "6.38.1", - "license": "MIT", + "version": "6.38.3", + "resolved": "https://registry.npmjs.org/react-instantsearch-core/-/react-instantsearch-core-6.38.3.tgz", + "integrity": "sha512-m7sL8NR5SlqctZJqoRYyBUFSUplK221EHESC+g6+fZ9Vd1fUX07MNvnbZ9+8Uyn0v+Hi8nL/3qGesJZ/xbJ/dg==", "dependencies": { "@babel/runtime": "^7.1.2", - "algoliasearch-helper": "^3.11.1", + "algoliasearch-helper": "^3.11.2", "prop-types": "^15.6.2", "react-fast-compare": "^3.0.0" }, @@ -43094,15 +43191,16 @@ } }, "node_modules/react-instantsearch-dom": { - "version": "6.38.1", - "license": "MIT", + "version": "6.38.3", + "resolved": "https://registry.npmjs.org/react-instantsearch-dom/-/react-instantsearch-dom-6.38.3.tgz", + "integrity": "sha512-1VQxMq23pAaeJjyBdTuC+U2DHa35ygnKd4fCTWHv0YK/GwneoSOubxKf24QtNLsHfswJ/qjpW21xXv6IVRA90g==", "dependencies": { "@babel/runtime": "^7.1.2", - "algoliasearch-helper": "^3.11.1", + "algoliasearch-helper": "^3.11.2", "classnames": "^2.2.5", "prop-types": "^15.6.2", "react-fast-compare": "^3.0.0", - "react-instantsearch-core": "6.38.1" + "react-instantsearch-core": "6.38.3" }, "peerDependencies": { "algoliasearch": ">= 3.1 < 5", @@ -43239,9 +43337,9 @@ } }, "node_modules/react-router": { - "version": "6.6.1", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.6.1.tgz", - "integrity": "sha512-YkvlYRusnI/IN0kDtosUCgxqHeulN5je+ew8W+iA1VvFhf86kA+JEI/X/8NqYcr11hCDDp906S+SGMpBheNeYQ==", + "version": "6.6.2", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.6.2.tgz", + "integrity": "sha512-uJPG55Pek3orClbURDvfljhqFvMgJRo59Pktywkk8hUUkTY2aRfza8Yhl/vZQXs+TNQyr6tu+uqz/fLxPICOGQ==", "dependencies": { "@remix-run/router": "1.2.1" }, @@ -43253,12 +43351,12 @@ } }, "node_modules/react-router-dom": { - "version": "6.6.1", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.6.1.tgz", - "integrity": "sha512-u+8BKUtelStKbZD5UcY0NY90WOzktrkJJhyhNg7L0APn9t1qJNLowzrM9CHdpB6+rcPt6qQrlkIXsTvhuXP68g==", + "version": "6.6.2", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.6.2.tgz", + "integrity": "sha512-6SCDXxRQqW5af8ImOqKza7icmQ47/EMbz572uFjzvcArg3lZ+04PxSPp8qGs+p2Y+q+b+S/AjXv8m8dyLndIIA==", "dependencies": { "@remix-run/router": "1.2.1", - "react-router": "6.6.1" + "react-router": "6.6.2" }, "engines": { "node": ">=14" @@ -44982,8 +45080,9 @@ } }, "node_modules/regenerator-runtime": { - "version": "0.13.9", - "license": "MIT" + "version": "0.13.11", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", + "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==" }, "node_modules/regenerator-transform": { "version": "0.15.0", @@ -53176,20 +53275,35 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/which-collection": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.1.tgz", + "integrity": "sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==", + "dependencies": { + "is-map": "^2.0.1", + "is-set": "^2.0.1", + "is-weakmap": "^2.0.1", + "is-weakset": "^2.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/which-module": { "version": "2.0.0", "license": "ISC" }, "node_modules/which-typed-array": { - "version": "1.1.7", - "license": "MIT", + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", + "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", "dependencies": { "available-typed-arrays": "^1.0.5", "call-bind": "^1.0.2", - "es-abstract": "^1.18.5", - "foreach": "^2.0.5", + "for-each": "^0.3.3", + "gopd": "^1.0.1", "has-tostringtag": "^1.0.0", - "is-typed-array": "^1.1.7" + "is-typed-array": "^1.1.10" }, "engines": { "node": ">= 0.4" @@ -54189,7 +54303,7 @@ "react": "16.14.0", "react-codemirror2": "7.2.1", "react-dom": "16.14.0", - "react-router-dom": "6.6.1", + "react-router-dom": "6.6.2", "react-scripts": "5.0.1", "typescript": "4.9.4" }, @@ -54210,7 +54324,7 @@ "cross-env": "7.0.3", "gray-matter": "4.0.3", "inquirer": "8.2.5", - "prettier": "2.8.1", + "prettier": "2.8.3", "ts-node": "10.9.1", "typescript": "4.9.4" }, @@ -54364,7 +54478,7 @@ "dotenv": "16.0.3", "fs-extra": "10.0.0", "gray-matter": "4.0.3", - "node-fetch": "2.6.7", + "node-fetch": "2.6.8", "node-opencc": "2.0.1", "path": "0.12.7", "readdirp": "3.6.0" @@ -54482,7 +54596,7 @@ "typescript": "4.9.4" }, "devDependencies": { - "@babel/core": "7.20.7", + "@babel/core": "7.20.12", "@babel/preset-env": "7.20.2", "@rollup/plugin-babel": "5.3.1", "@rollup/plugin-commonjs": "19.0.2", @@ -54504,7 +54618,7 @@ "babel-loader": "8.3.0", "babel-plugin-transform-react-remove-prop-types": "0.4.24", "cross-env": "7.0.3", - "postcss": "8.4.20", + "postcss": "8.4.21", "postcss-import": "14.1.0", "rimraf": "3.0.2", "rollup": "2.79.1", @@ -54711,24 +54825,24 @@ "integrity": "sha512-sEnuDPpOJR/fcafHMjpcpGN5M2jbUGUHwmuWKM/YdPzeEDJg8bgmbcWQFUfE32MQjti1koACvoPVsDe8Uq+idg==" }, "@babel/core": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.20.7.tgz", - "integrity": "sha512-t1ZjCluspe5DW24bn2Rr1CDb2v9rn/hROtg9a2tmd0+QYf4bsloYfLQzjG4qHPNMhWtKdGC33R5AxGR2Af2cBw==", + "version": "7.20.12", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.20.12.tgz", + "integrity": "sha512-XsMfHovsUYHFMdrIHkZphTN/2Hzzi78R08NuHfDBehym2VsPDL6Zn/JAD/JQdnRvbSsbQc4mVaU1m6JgtTEElg==", "requires": { "@ampproject/remapping": "^2.1.0", "@babel/code-frame": "^7.18.6", "@babel/generator": "^7.20.7", "@babel/helper-compilation-targets": "^7.20.7", - "@babel/helper-module-transforms": "^7.20.7", + "@babel/helper-module-transforms": "^7.20.11", "@babel/helpers": "^7.20.7", "@babel/parser": "^7.20.7", "@babel/template": "^7.20.7", - "@babel/traverse": "^7.20.7", + "@babel/traverse": "^7.20.12", "@babel/types": "^7.20.7", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", - "json5": "^2.2.1", + "json5": "^2.2.2", "semver": "^6.3.0" }, "dependencies": { @@ -55740,22 +55854,25 @@ } }, "@babel/runtime": { - "version": "7.19.4", + "version": "7.20.7", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.7.tgz", + "integrity": "sha512-UF0tvkUtxwAgZ5W/KrkHf0Rn0fdnLDU9ScxBrEVNUprE/MzirjK4MJUX1/BVDv00Sv8cljtukVK1aky++X1SjQ==", "requires": { - "regenerator-runtime": "^0.13.4" + "regenerator-runtime": "^0.13.11" } }, "@babel/runtime-corejs3": { "version": "7.16.3", + "dev": true, "requires": { "core-js-pure": "^3.19.0", "regenerator-runtime": "^0.13.4" } }, "@babel/standalone": { - "version": "7.20.11", - "resolved": "https://registry.npmjs.org/@babel/standalone/-/standalone-7.20.11.tgz", - "integrity": "sha512-WUPlwwXFk3iViGE7QFVVp423eVtT+eoXu1940Xu4QJgqgHBF6WWtlwO1Ip5rIWQnp7OHrGdwrwKLtLhUVfOZbA==" + "version": "7.20.12", + "resolved": "https://registry.npmjs.org/@babel/standalone/-/standalone-7.20.12.tgz", + "integrity": "sha512-hK/X+m1il3w1tYS4H8LDaGCEdiT47SVqEXY8RiEAgou26BystipSU8ZL6EvBR6t5l7lTv0ilBiChXWblKJ5iUA==" }, "@babel/template": { "version": "7.20.7", @@ -55768,9 +55885,9 @@ } }, "@babel/traverse": { - "version": "7.20.10", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.10.tgz", - "integrity": "sha512-oSf1juCgymrSez8NI4A2sr4+uB/mFd9MXplYGPEBnfAuWmmyeVcHa6xLPiaRBcXkcb/28bgxmQLTVwFKE1yfsg==", + "version": "7.20.12", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.12.tgz", + "integrity": "sha512-MsIbFN0u+raeja38qboyF8TIT7K0BFzz/Yd/77ta4MsUsmP2RAnidIlwq7d5HFQrH/OZJecGV6B71C4zAgpoSQ==", "requires": { "@babel/code-frame": "^7.18.6", "@babel/generator": "^7.20.7", @@ -55821,9 +55938,9 @@ } }, "@codesee/babel-plugin-instrument": { - "version": "0.470.0", - "resolved": "https://registry.npmjs.org/@codesee/babel-plugin-instrument/-/babel-plugin-instrument-0.470.0.tgz", - "integrity": "sha512-vQZ8Ugt4yPGgGTVPBDTI6BtiBGEes/r35O7MnQ0RzY0Ebw0vs/q6+1zos0z0HXkYt5CsDb65VGQV4h7ySskBeA==", + "version": "0.479.0", + "resolved": "https://registry.npmjs.org/@codesee/babel-plugin-instrument/-/babel-plugin-instrument-0.479.0.tgz", + "integrity": "sha512-5fAc8y4jWAZOB70ivVnUhR2o/oYfr2WtxCnKKrV6p369NWRgufqACZte48HvBjxcNXzbKgEOaMlyl4yK2leR9Q==", "dev": true, "requires": { "@babel/plugin-syntax-jsx": "^7.12.13", @@ -55835,9 +55952,9 @@ } }, "@codesee/tracker": { - "version": "0.470.0", - "resolved": "https://registry.npmjs.org/@codesee/tracker/-/tracker-0.470.0.tgz", - "integrity": "sha512-pphmdAb6waC/XP4ZHUQCoHZ04FSdpX3q+TJ9/YPJvHoebPA4xmUSwnw3jHsE8Y4MA15/n0NQQlzd/QYOWFxANw==", + "version": "0.479.0", + "resolved": "https://registry.npmjs.org/@codesee/tracker/-/tracker-0.479.0.tgz", + "integrity": "sha512-JjXgIX0g6IEEPMPQPebL7lu9+9tIcjzzmJDIJgO9C323p2QDveEkjvEXbBnTVU4tdvCx8aX6ldJYTOxaZ8uYJg==", "dev": true }, "@cspotcode/source-map-support": { @@ -56316,7 +56433,7 @@ "react": "16.14.0", "react-codemirror2": "7.2.1", "react-dom": "16.14.0", - "react-router-dom": "6.6.1", + "react-router-dom": "6.6.2", "react-scripts": "5.0.1", "shx": "0.3.4", "typescript": "4.9.4" @@ -56419,10 +56536,10 @@ "@babel/polyfill": "7.12.1", "@babel/preset-env": "7.20.2", "@babel/preset-react": "7.18.6", - "@babel/standalone": "7.20.11", + "@babel/standalone": "7.20.12", "@babel/types": "7.20.7", - "@codesee/babel-plugin-instrument": "0.470.0", - "@codesee/tracker": "0.470.0", + "@codesee/babel-plugin-instrument": "0.479.0", + "@codesee/tracker": "0.479.0", "@fortawesome/fontawesome-svg-core": "6.2.1", "@fortawesome/free-brands-svg-icons": "6.2.1", "@fortawesome/free-solid-svg-icons": "6.2.1", @@ -56436,10 +56553,11 @@ "@loadable/component": "5.15.2", "@reach/router": "1.3.4", "@sentry/gatsby": "6.19.7", - "@stripe/react-stripe-js": "1.16.1", + "@stripe/react-stripe-js": "1.16.3", "@stripe/stripe-js": "1.46.0", "@testing-library/jest-dom": "5.16.5", "@testing-library/react": "12.1.5", + "@types/react-gtm-module": "2.0.1", "@types/react-scrollable-anchor": "0.6.1", "algoliasearch": "4.14.3", "assert": "2.0.0", @@ -56458,9 +56576,10 @@ "date-fns": "2.27.0", "enzyme": "3.11.0", "enzyme-adapter-react-16": "1.15.7", - "final-form": "4.20.7", + "final-form": "4.20.8", "gatsby": "3.15.0", "gatsby-cli": "3.15.0", + "gatsby-link": "3.15.0", "gatsby-plugin-advanced-sitemap": "2.1.0", "gatsby-plugin-create-client-paths": "3.15.0", "gatsby-plugin-manifest": "3.15.0", @@ -56481,7 +56600,7 @@ "nanoid": "3.3.4", "normalize-url": "4.5.1", "path-browserify": "1.0.1", - "postcss": "8.4.20", + "postcss": "8.4.21", "prismjs": "1.29.0", "process": "0.11.10", "prop-types": "15.8.1", @@ -56490,11 +56609,12 @@ "react": "16.14.0", "react-dom": "16.14.0", "react-final-form": "6.5.9", - "react-ga": "3.3.1", + "react-gtm-module": "2.0.11", "react-helmet": "6.1.0", "react-hotkeys": "2.0.0", "react-i18next": "11.18.6", - "react-instantsearch-dom": "6.38.1", + "react-instantsearch-core": "6.38.3", + "react-instantsearch-dom": "6.38.3", "react-lazy-load": "3.1.14", "react-monaco-editor": "0.40.0", "react-redux": "5.1.2", @@ -56572,7 +56692,7 @@ "dotenv": "16.0.3", "fs-extra": "10.0.0", "gray-matter": "4.0.3", - "node-fetch": "2.6.7", + "node-fetch": "2.6.8", "node-opencc": "2.0.1", "path": "0.12.7", "readdirp": "3.6.0" @@ -56591,7 +56711,7 @@ "@freecodecamp/curriculum": { "version": "file:curriculum", "requires": { - "@babel/core": "7.20.7", + "@babel/core": "7.20.12", "@babel/polyfill": "7.12.1", "@babel/preset-env": "7.20.2", "@babel/preset-typescript": "7.18.6", @@ -56648,7 +56768,7 @@ "cross-env": "7.0.3", "gray-matter": "4.0.3", "inquirer": "8.2.5", - "prettier": "2.8.1", + "prettier": "2.8.3", "ts-node": "10.9.1", "typescript": "4.9.4" } @@ -56772,7 +56892,7 @@ "@freecodecamp/ui": { "version": "file:tools/ui-components", "requires": { - "@babel/core": "7.20.7", + "@babel/core": "7.20.12", "@babel/preset-env": "7.20.2", "@babel/preset-typescript": "7.18.6", "@rollup/plugin-babel": "5.3.1", @@ -56795,7 +56915,7 @@ "babel-loader": "8.3.0", "babel-plugin-transform-react-remove-prop-types": "0.4.24", "cross-env": "7.0.3", - "postcss": "8.4.20", + "postcss": "8.4.21", "postcss-import": "14.1.0", "react": "16.14.0", "react-dom": "16.14.0", @@ -63709,9 +63829,9 @@ } }, "@stripe/react-stripe-js": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/@stripe/react-stripe-js/-/react-stripe-js-1.16.1.tgz", - "integrity": "sha512-einalv46WrAZhCN8jDHz3e6ePYmwwkbwDfv//XPKw/higzdiZmSZgMJWeqEOPvalf8qryx9vOXOYaH7G6yUGug==", + "version": "1.16.3", + "resolved": "https://registry.npmjs.org/@stripe/react-stripe-js/-/react-stripe-js-1.16.3.tgz", + "integrity": "sha512-gS6UDGEuM92K50pFB3o//EqqPxmaqpC8IrsBda4P4LxeULoO0pBFSHXJ5Ab6uA7G2lyO2bluvSLereh0OH9GrQ==", "requires": { "prop-types": "^15.7.2" } @@ -64270,10 +64390,6 @@ "@types/range-parser": "*" } }, - "@types/faker": { - "version": "5.5.9", - "dev": true - }, "@types/get-port": { "version": "3.2.0" }, @@ -64509,6 +64625,12 @@ "@types/react": "^17" } }, + "@types/react-gtm-module": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/react-gtm-module/-/react-gtm-module-2.0.1.tgz", + "integrity": "sha512-T/DN9gAbCYk5wJ1nxf4pSwmXz4d1iVjM++OoG+mwMfz9STMAotGjSb65gJHOS5bPvl6vLSsJnuC+y/43OQrltg==", + "dev": true + }, "@types/react-helmet": { "version": "6.1.6", "resolved": "https://registry.npmjs.org/@types/react-helmet/-/react-helmet-6.1.6.tgz", @@ -64869,13 +64991,13 @@ "version": "1.9.2" }, "@typescript-eslint/eslint-plugin": { - "version": "5.48.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.48.0.tgz", - "integrity": "sha512-SVLafp0NXpoJY7ut6VFVUU9I+YeFsDzeQwtK0WZ+xbRN3mtxJ08je+6Oi2N89qDn087COdO0u3blKZNv9VetRQ==", + "version": "5.48.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.48.1.tgz", + "integrity": "sha512-9nY5K1Rp2ppmpb9s9S2aBiF3xo5uExCehMDmYmmFqqyxgenbHJ3qbarcLt4ITgaD6r/2ypdlcFRdcuVPnks+fQ==", "requires": { - "@typescript-eslint/scope-manager": "5.48.0", - "@typescript-eslint/type-utils": "5.48.0", - "@typescript-eslint/utils": "5.48.0", + "@typescript-eslint/scope-manager": "5.48.1", + "@typescript-eslint/type-utils": "5.48.1", + "@typescript-eslint/utils": "5.48.1", "debug": "^4.3.4", "ignore": "^5.2.0", "natural-compare-lite": "^1.4.0", @@ -64996,13 +65118,13 @@ } }, "@typescript-eslint/parser": { - "version": "5.48.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.48.0.tgz", - "integrity": "sha512-1mxNA8qfgxX8kBvRDIHEzrRGrKHQfQlbW6iHyfHYS0Q4X1af+S6mkLNtgCOsGVl8+/LUPrqdHMssAemkrQ01qg==", + "version": "5.48.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.48.1.tgz", + "integrity": "sha512-4yg+FJR/V1M9Xoq56SF9Iygqm+r5LMXvheo6DQ7/yUWynQ4YfCRnsKuRgqH4EQ5Ya76rVwlEpw4Xu+TgWQUcdA==", "requires": { - "@typescript-eslint/scope-manager": "5.48.0", - "@typescript-eslint/types": "5.48.0", - "@typescript-eslint/typescript-estree": "5.48.0", + "@typescript-eslint/scope-manager": "5.48.1", + "@typescript-eslint/types": "5.48.1", + "@typescript-eslint/typescript-estree": "5.48.1", "debug": "^4.3.4" }, "dependencies": { @@ -65022,21 +65144,21 @@ } }, "@typescript-eslint/scope-manager": { - "version": "5.48.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.48.0.tgz", - "integrity": "sha512-0AA4LviDtVtZqlyUQnZMVHydDATpD9SAX/RC5qh6cBd3xmyWvmXYF+WT1oOmxkeMnWDlUVTwdODeucUnjz3gow==", + "version": "5.48.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.48.1.tgz", + "integrity": "sha512-S035ueRrbxRMKvSTv9vJKIWgr86BD8s3RqoRZmsSh/s8HhIs90g6UlK8ZabUSjUZQkhVxt7nmZ63VJ9dcZhtDQ==", "requires": { - "@typescript-eslint/types": "5.48.0", - "@typescript-eslint/visitor-keys": "5.48.0" + "@typescript-eslint/types": "5.48.1", + "@typescript-eslint/visitor-keys": "5.48.1" } }, "@typescript-eslint/type-utils": { - "version": "5.48.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.48.0.tgz", - "integrity": "sha512-vbtPO5sJyFjtHkGlGK4Sthmta0Bbls4Onv0bEqOGm7hP9h8UpRsHJwsrCiWtCUndTRNQO/qe6Ijz9rnT/DB+7g==", + "version": "5.48.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.48.1.tgz", + "integrity": "sha512-Hyr8HU8Alcuva1ppmqSYtM/Gp0q4JOp1F+/JH5D1IZm/bUBrV0edoewQZiEc1r6I8L4JL21broddxK8HAcZiqQ==", "requires": { - "@typescript-eslint/typescript-estree": "5.48.0", - "@typescript-eslint/utils": "5.48.0", + "@typescript-eslint/typescript-estree": "5.48.1", + "@typescript-eslint/utils": "5.48.1", "debug": "^4.3.4", "tsutils": "^3.21.0" }, @@ -65057,17 +65179,17 @@ } }, "@typescript-eslint/types": { - "version": "5.48.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.48.0.tgz", - "integrity": "sha512-UTe67B0Ypius0fnEE518NB2N8gGutIlTojeTg4nt0GQvikReVkurqxd2LvYa9q9M5MQ6rtpNyWTBxdscw40Xhw==" + "version": "5.48.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.48.1.tgz", + "integrity": "sha512-xHyDLU6MSuEEdIlzrrAerCGS3T7AA/L8Hggd0RCYBi0w3JMvGYxlLlXHeg50JI9Tfg5MrtsfuNxbS/3zF1/ATg==" }, "@typescript-eslint/typescript-estree": { - "version": "5.48.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.48.0.tgz", - "integrity": "sha512-7pjd94vvIjI1zTz6aq/5wwE/YrfIyEPLtGJmRfyNR9NYIW+rOvzzUv3Cmq2hRKpvt6e9vpvPUQ7puzX7VSmsEw==", + "version": "5.48.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.48.1.tgz", + "integrity": "sha512-Hut+Osk5FYr+sgFh8J/FHjqX6HFcDzTlWLrFqGoK5kVUN3VBHF/QzZmAsIXCQ8T/W9nQNBTqalxi1P3LSqWnRA==", "requires": { - "@typescript-eslint/types": "5.48.0", - "@typescript-eslint/visitor-keys": "5.48.0", + "@typescript-eslint/types": "5.48.1", + "@typescript-eslint/visitor-keys": "5.48.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -65112,15 +65234,15 @@ } }, "@typescript-eslint/utils": { - "version": "5.48.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.48.0.tgz", - "integrity": "sha512-x2jrMcPaMfsHRRIkL+x96++xdzvrdBCnYRd5QiW5Wgo1OB4kDYPbC1XjWP/TNqlfK93K/lUL92erq5zPLgFScQ==", + "version": "5.48.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.48.1.tgz", + "integrity": "sha512-SmQuSrCGUOdmGMwivW14Z0Lj8dxG1mOFZ7soeJ0TQZEJcs3n5Ndgkg0A4bcMFzBELqLJ6GTHnEU+iIoaD6hFGA==", "requires": { "@types/json-schema": "^7.0.9", "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.48.0", - "@typescript-eslint/types": "5.48.0", - "@typescript-eslint/typescript-estree": "5.48.0", + "@typescript-eslint/scope-manager": "5.48.1", + "@typescript-eslint/types": "5.48.1", + "@typescript-eslint/typescript-estree": "5.48.1", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0", "semver": "^7.3.7" @@ -65144,11 +65266,11 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "5.48.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.48.0.tgz", - "integrity": "sha512-5motVPz5EgxQ0bHjut3chzBkJ3Z3sheYVcSwS5BpHZpLqSptSmELNtGixmgj65+rIfhvtQTz5i9OP2vtzdDH7Q==", + "version": "5.48.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.48.1.tgz", + "integrity": "sha512-Ns0XBwmfuX7ZknznfXozgnydyR8F6ev/KEGePP4i74uL3ArsKbEhJ7raeKr1JSa997DBDwol/4a0Y+At82c9dA==", "requires": { - "@typescript-eslint/types": "5.48.0", + "@typescript-eslint/types": "5.48.1", "eslint-visitor-keys": "^3.3.0" }, "dependencies": { @@ -65621,7 +65743,9 @@ } }, "algoliasearch-helper": { - "version": "3.11.1", + "version": "3.11.2", + "resolved": "https://registry.npmjs.org/algoliasearch-helper/-/algoliasearch-helper-3.11.2.tgz", + "integrity": "sha512-eKvSM5hz5w9RcUowu8LnQ5v0KRrFLCvF4K3KF/Ab3VwCT726rWgZUWUIQUPjr9qDENUMukQ/IHZ7bGUVYRGP0g==", "requires": { "@algolia/events": "^4.0.1" } @@ -65757,7 +65881,43 @@ "version": "2.0.1" }, "aria-query": { - "version": "5.0.0" + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.1.3.tgz", + "integrity": "sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ==", + "requires": { + "deep-equal": "^2.0.5" + }, + "dependencies": { + "deep-equal": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.0.tgz", + "integrity": "sha512-RdpzE0Hv4lhowpIUKKMJfeH6C1pXdtT1/it80ubgWqwI3qpuxUBpC1S4hnHg+zjnuOoDkzUtUCEEkG+XG5l3Mw==", + "requires": { + "call-bind": "^1.0.2", + "es-get-iterator": "^1.1.2", + "get-intrinsic": "^1.1.3", + "is-arguments": "^1.1.1", + "is-array-buffer": "^3.0.1", + "is-date-object": "^1.0.5", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "isarray": "^2.0.5", + "object-is": "^1.1.5", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.4.3", + "side-channel": "^1.0.4", + "which-boxed-primitive": "^1.0.2", + "which-collection": "^1.0.1", + "which-typed-array": "^1.1.9" + } + }, + "isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" + } + } }, "arr-diff": { "version": "4.0.0" @@ -65820,11 +65980,14 @@ } }, "array.prototype.flat": { - "version": "1.2.5", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz", + "integrity": "sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==", "requires": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.0" + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0" } }, "array.prototype.flatmap": { @@ -66038,7 +66201,9 @@ "version": "1.11.0" }, "axe-core": { - "version": "4.4.3" + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.6.2.tgz", + "integrity": "sha512-b1WlTV8+XKLj9gZy2DZXgQiyDp9xkkoe2a6U6UbYccScq2wgH/YwCeI2/Jq2mgo0HzQxqJOjWZBLeA/mqsk5Mg==" }, "axios": { "version": "0.23.0", @@ -66047,7 +66212,43 @@ } }, "axobject-query": { - "version": "2.2.0" + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-3.1.1.tgz", + "integrity": "sha512-goKlv8DZrK9hUh975fnHzhNIO4jUnFCfv/dszV5VwUGDFjI6vQ2VwoyjYjYNEbBE8AH87TduWP5uyDR1D+Iteg==", + "requires": { + "deep-equal": "^2.0.5" + }, + "dependencies": { + "deep-equal": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.0.tgz", + "integrity": "sha512-RdpzE0Hv4lhowpIUKKMJfeH6C1pXdtT1/it80ubgWqwI3qpuxUBpC1S4hnHg+zjnuOoDkzUtUCEEkG+XG5l3Mw==", + "requires": { + "call-bind": "^1.0.2", + "es-get-iterator": "^1.1.2", + "get-intrinsic": "^1.1.3", + "is-arguments": "^1.1.1", + "is-array-buffer": "^3.0.1", + "is-date-object": "^1.0.5", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "isarray": "^2.0.5", + "object-is": "^1.1.5", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.4.3", + "side-channel": "^1.0.4", + "which-boxed-primitive": "^1.0.2", + "which-collection": "^1.0.1", + "which-typed-array": "^1.1.9" + } + }, + "isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" + } + } }, "babel-code-frame": { "version": "6.26.0", @@ -70856,7 +71057,6 @@ }, "es-get-iterator": { "version": "1.1.2", - "dev": true, "requires": { "call-bind": "^1.0.2", "get-intrinsic": "^1.1.0", @@ -70869,8 +71069,7 @@ }, "dependencies": { "isarray": { - "version": "2.0.5", - "dev": true + "version": "2.0.5" } } }, @@ -71145,10 +71344,13 @@ "requires": {} }, "eslint-import-resolver-node": { - "version": "0.3.6", + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz", + "integrity": "sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==", "requires": { "debug": "^3.2.7", - "resolve": "^1.20.0" + "is-core-module": "^2.11.0", + "resolve": "^1.22.1" }, "dependencies": { "debug": { @@ -71163,10 +71365,11 @@ } }, "eslint-module-utils": { - "version": "2.7.3", + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.4.tgz", + "integrity": "sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==", "requires": { - "debug": "^3.2.7", - "find-up": "^2.1.0" + "debug": "^3.2.7" }, "dependencies": { "debug": { @@ -71197,34 +71400,55 @@ } }, "eslint-plugin-import": { - "version": "2.26.0", + "version": "2.27.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.27.4.tgz", + "integrity": "sha512-Z1jVt1EGKia1X9CnBCkpAOhWy8FgQ7OmJ/IblEkT82yrFU/xJaxwujaTzLWqigewwynRQ9mmHfX9MtAfhxm0sA==", "requires": { - "array-includes": "^3.1.4", - "array.prototype.flat": "^1.2.5", - "debug": "^2.6.9", + "array-includes": "^3.1.6", + "array.prototype.flat": "^1.3.1", + "array.prototype.flatmap": "^1.3.0", + "debug": "^3.2.7", "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.6", - "eslint-module-utils": "^2.7.3", + "eslint-import-resolver-node": "^0.3.7", + "eslint-module-utils": "^2.7.4", "has": "^1.0.3", - "is-core-module": "^2.8.1", + "is-core-module": "^2.11.0", "is-glob": "^4.0.3", "minimatch": "^3.1.2", - "object.values": "^1.1.5", - "resolve": "^1.22.0", + "object.values": "^1.1.6", + "resolve": "^1.22.1", + "semver": "^6.3.0", "tsconfig-paths": "^3.14.1" }, "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "requires": { + "ms": "^2.1.1" + } + }, "doctrine": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "requires": { "esutils": "^2.0.2" } }, "minimatch": { "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "requires": { "brace-expansion": "^1.1.7" } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" } } }, @@ -71337,32 +71561,32 @@ } }, "eslint-plugin-jsx-a11y": { - "version": "6.6.1", + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.7.1.tgz", + "integrity": "sha512-63Bog4iIethyo8smBklORknVjB0T2dwB8Mr/hIC+fBS0uyHdYYpzM/Ed+YC8VxTjlXHEWFOdmgwcDn1U2L9VCA==", "requires": { - "@babel/runtime": "^7.18.9", - "aria-query": "^4.2.2", - "array-includes": "^3.1.5", + "@babel/runtime": "^7.20.7", + "aria-query": "^5.1.3", + "array-includes": "^3.1.6", + "array.prototype.flatmap": "^1.3.1", "ast-types-flow": "^0.0.7", - "axe-core": "^4.4.3", - "axobject-query": "^2.2.0", + "axe-core": "^4.6.2", + "axobject-query": "^3.1.1", "damerau-levenshtein": "^1.0.8", "emoji-regex": "^9.2.2", "has": "^1.0.3", - "jsx-ast-utils": "^3.3.2", - "language-tags": "^1.0.5", + "jsx-ast-utils": "^3.3.3", + "language-tags": "=1.0.5", "minimatch": "^3.1.2", + "object.entries": "^1.1.6", + "object.fromentries": "^2.0.6", "semver": "^6.3.0" }, "dependencies": { - "aria-query": { - "version": "4.2.2", - "requires": { - "@babel/runtime": "^7.10.2", - "@babel/runtime-corejs3": "^7.10.2" - } - }, "minimatch": { "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "requires": { "brace-expansion": "^1.1.7" } @@ -71379,7 +71603,9 @@ "requires": {} }, "eslint-plugin-react": { - "version": "7.31.11", + "version": "7.32.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.32.0.tgz", + "integrity": "sha512-vSBi1+SrPiLZCGvxpiZIa28fMEUaMjXtCplrvxcIxGzmFiYdsXQDwInEjuv5/i/2CTTxbkS87tE8lsQ0Qxinbw==", "requires": { "array-includes": "^3.1.6", "array.prototype.flatmap": "^1.3.1", @@ -71393,25 +71619,31 @@ "object.hasown": "^1.1.2", "object.values": "^1.1.6", "prop-types": "^15.8.1", - "resolve": "^2.0.0-next.3", + "resolve": "^2.0.0-next.4", "semver": "^6.3.0", "string.prototype.matchall": "^4.0.8" }, "dependencies": { "doctrine": { "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "requires": { "esutils": "^2.0.2" } }, "minimatch": { "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "requires": { "brace-expansion": "^1.1.7" } }, "resolve": { "version": "2.0.0-next.4", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.4.tgz", + "integrity": "sha512-iMDbmAWtfU+MHpxt/I5iWI7cY6YVEZUQ3MBgPQ++XD1PELuJHIl82xBmObyP2KyQmkNB2dsqF7seoQQiAn5yDQ==", "requires": { "is-core-module": "^2.9.0", "path-parse": "^1.0.7", @@ -72021,10 +72253,6 @@ "eyes": { "version": "0.1.8" }, - "faker": { - "version": "5.5.3", - "dev": true - }, "fast-copy": { "version": "2.1.1" }, @@ -72226,7 +72454,9 @@ "version": "1.1.0" }, "final-form": { - "version": "4.20.7", + "version": "4.20.8", + "resolved": "https://registry.npmjs.org/final-form/-/final-form-4.20.8.tgz", + "integrity": "sha512-knyoRbK42XvZOwfElVSZEfE9licdOmgLLUfPSuxJOl0UhjYT1HiBaHZlfYnwqmvo1H9ucNGyXDHoUP0vI0474g==", "requires": { "@babel/runtime": "^7.10.0" } @@ -72291,12 +72521,6 @@ } } }, - "find-up": { - "version": "2.1.0", - "requires": { - "locate-path": "^2.0.0" - } - }, "flat": { "version": "5.0.2", "dev": true @@ -72350,12 +72574,17 @@ "follow-redirects": { "version": "1.15.0" }, + "for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "requires": { + "is-callable": "^1.1.3" + } + }, "for-in": { "version": "1.0.2" }, - "foreach": { - "version": "2.0.5" - }, "foreground-child": { "version": "2.0.0", "dev": true, @@ -74532,6 +74761,14 @@ } } }, + "gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "requires": { + "get-intrinsic": "^1.1.3" + } + }, "got": { "version": "11.8.5", "requires": { @@ -75696,6 +75933,16 @@ "has-tostringtag": "^1.0.0" } }, + "is-array-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.1.tgz", + "integrity": "sha512-ASfLknmY8Xa2XtB4wmbz13Wu202baeA18cJBCeCy0wXUHZF0IPyVEXqKEcd+t2fNSLLL1vC6k7lxZEojNbISXQ==", + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-typed-array": "^1.1.10" + } + }, "is-arrayish": { "version": "0.2.1" }, @@ -75745,7 +75992,9 @@ } }, "is-core-module": { - "version": "2.9.0", + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", + "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", "requires": { "has": "^1.0.3" } @@ -75852,8 +76101,7 @@ } }, "is-map": { - "version": "2.0.2", - "dev": true + "version": "2.0.2" }, "is-module": { "version": "1.0.0" @@ -75963,8 +76211,7 @@ "version": "2.1.0" }, "is-set": { - "version": "2.0.2", - "dev": true + "version": "2.0.2" }, "is-shared-array-buffer": { "version": "1.0.2", @@ -75997,12 +76244,14 @@ } }, "is-typed-array": { - "version": "1.1.8", + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.10.tgz", + "integrity": "sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==", "requires": { "available-typed-arrays": "^1.0.5", "call-bind": "^1.0.2", - "es-abstract": "^1.18.5", - "foreach": "^2.0.5", + "for-each": "^0.3.3", + "gopd": "^1.0.1", "has-tostringtag": "^1.0.0" } }, @@ -76041,12 +76290,26 @@ "is-invalid-path": "^0.1.0" } }, + "is-weakmap": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.1.tgz", + "integrity": "sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==" + }, "is-weakref": { "version": "1.0.2", "requires": { "call-bind": "^1.0.2" } }, + "is-weakset": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.2.tgz", + "integrity": "sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==", + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + } + }, "is-whitespace-character": { "version": "1.0.4" }, @@ -77617,10 +77880,12 @@ } }, "jsx-ast-utils": { - "version": "3.3.2", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.3.tgz", + "integrity": "sha512-fYQHZTZ8jSfmWZ0iyzfwiU4WDX4HpHbMCZ3gPlWYiCl3BoeOTsqKBqnTVfH2rYT7eP5c3sVbeSPHnnJOaTrWiw==", "requires": { "array-includes": "^3.1.5", - "object.assign": "^4.1.2" + "object.assign": "^4.1.3" } }, "jump.js": { @@ -78324,13 +78589,6 @@ "loaders.css": { "version": "0.1.2" }, - "locate-path": { - "version": "2.0.0", - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, "lock": { "version": "1.1.0" }, @@ -80795,19 +81053,27 @@ "version": "0.9.0" }, "node-fetch": { - "version": "2.6.7", + "version": "2.6.8", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.8.tgz", + "integrity": "sha512-RZ6dBYuj8dRSfxpUSu+NsdF1dpPpluJxwOp+6IoDp/sH2QNDSvurYsAa+F1WxY2RjA1iP93xhcsUoYbF2XBqVg==", "requires": { "whatwg-url": "^5.0.0" }, "dependencies": { "tr46": { - "version": "0.0.3" + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, "webidl-conversions": { - "version": "3.0.1" + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" }, "whatwg-url": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", "requires": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" @@ -81732,23 +81998,6 @@ "yocto-queue": "^0.1.0" } }, - "p-locate": { - "version": "2.0.0", - "requires": { - "p-limit": "^1.1.0" - }, - "dependencies": { - "p-limit": { - "version": "1.3.0", - "requires": { - "p-try": "^1.0.0" - } - }, - "p-try": { - "version": "1.0.0" - } - } - }, "p-map": { "version": "3.0.0", "requires": { @@ -82402,9 +82651,9 @@ "version": "0.1.1" }, "postcss": { - "version": "8.4.20", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.20.tgz", - "integrity": "sha512-6Q04AXR1212bXr5fh03u8aAwbLxAQNGQ/Q1LNa0VfOI06ZAlhPHtQvE4OIdpj4kLThXilalPnmDSOD65DcHt+g==", + "version": "8.4.21", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz", + "integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==", "requires": { "nanoid": "^3.3.4", "picocolors": "^1.0.0", @@ -82934,9 +83183,9 @@ "version": "2.0.0" }, "prettier": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.1.tgz", - "integrity": "sha512-lqGoSJBQNJidqCHE80vqZJHWHRFoNYsSpP9AjFhlhi9ODCJA541svILes/+/1GM3VaL/abZi7cpFzOpdR9UPKg==" + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.3.tgz", + "integrity": "sha512-tJ/oJ4amDihPoufT5sM0Z1SKEuKay8LfVAMlbbhnnkvt6BUserZylqo2PN+p9KeljLr0OHa2rXHU1T8reeoTrw==" }, "pretty-bytes": { "version": "5.6.0" @@ -83593,9 +83842,10 @@ "@babel/runtime": "^7.15.4" } }, - "react-ga": { - "version": "3.3.1", - "requires": {} + "react-gtm-module": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/react-gtm-module/-/react-gtm-module-2.0.11.tgz", + "integrity": "sha512-8gyj4TTxeP7eEyc2QKawEuQoAZdjKvMY4pgWfycGmqGByhs17fR+zEBs0JUDq4US/l+vbTl+6zvUIx27iDo/Vw==" }, "react-helmet": { "version": "6.1.0", @@ -83629,23 +83879,27 @@ } }, "react-instantsearch-core": { - "version": "6.38.1", + "version": "6.38.3", + "resolved": "https://registry.npmjs.org/react-instantsearch-core/-/react-instantsearch-core-6.38.3.tgz", + "integrity": "sha512-m7sL8NR5SlqctZJqoRYyBUFSUplK221EHESC+g6+fZ9Vd1fUX07MNvnbZ9+8Uyn0v+Hi8nL/3qGesJZ/xbJ/dg==", "requires": { "@babel/runtime": "^7.1.2", - "algoliasearch-helper": "^3.11.1", + "algoliasearch-helper": "^3.11.2", "prop-types": "^15.6.2", "react-fast-compare": "^3.0.0" } }, "react-instantsearch-dom": { - "version": "6.38.1", + "version": "6.38.3", + "resolved": "https://registry.npmjs.org/react-instantsearch-dom/-/react-instantsearch-dom-6.38.3.tgz", + "integrity": "sha512-1VQxMq23pAaeJjyBdTuC+U2DHa35ygnKd4fCTWHv0YK/GwneoSOubxKf24QtNLsHfswJ/qjpW21xXv6IVRA90g==", "requires": { "@babel/runtime": "^7.1.2", - "algoliasearch-helper": "^3.11.1", + "algoliasearch-helper": "^3.11.2", "classnames": "^2.2.5", "prop-types": "^15.6.2", "react-fast-compare": "^3.0.0", - "react-instantsearch-core": "6.38.1" + "react-instantsearch-core": "6.38.3" } }, "react-is": { @@ -83735,20 +83989,20 @@ } }, "react-router": { - "version": "6.6.1", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.6.1.tgz", - "integrity": "sha512-YkvlYRusnI/IN0kDtosUCgxqHeulN5je+ew8W+iA1VvFhf86kA+JEI/X/8NqYcr11hCDDp906S+SGMpBheNeYQ==", + "version": "6.6.2", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.6.2.tgz", + "integrity": "sha512-uJPG55Pek3orClbURDvfljhqFvMgJRo59Pktywkk8hUUkTY2aRfza8Yhl/vZQXs+TNQyr6tu+uqz/fLxPICOGQ==", "requires": { "@remix-run/router": "1.2.1" } }, "react-router-dom": { - "version": "6.6.1", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.6.1.tgz", - "integrity": "sha512-u+8BKUtelStKbZD5UcY0NY90WOzktrkJJhyhNg7L0APn9t1qJNLowzrM9CHdpB6+rcPt6qQrlkIXsTvhuXP68g==", + "version": "6.6.2", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.6.2.tgz", + "integrity": "sha512-6SCDXxRQqW5af8ImOqKza7icmQ47/EMbz572uFjzvcArg3lZ+04PxSPp8qGs+p2Y+q+b+S/AjXv8m8dyLndIIA==", "requires": { "@remix-run/router": "1.2.1", - "react-router": "6.6.1" + "react-router": "6.6.2" } }, "react-scripts": { @@ -84777,7 +85031,9 @@ } }, "regenerator-runtime": { - "version": "0.13.9" + "version": "0.13.11", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", + "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==" }, "regenerator-transform": { "version": "0.15.0", @@ -90204,18 +90460,31 @@ "is-symbol": "^1.0.3" } }, + "which-collection": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.1.tgz", + "integrity": "sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==", + "requires": { + "is-map": "^2.0.1", + "is-set": "^2.0.1", + "is-weakmap": "^2.0.1", + "is-weakset": "^2.0.1" + } + }, "which-module": { "version": "2.0.0" }, "which-typed-array": { - "version": "1.1.7", + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.9.tgz", + "integrity": "sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==", "requires": { "available-typed-arrays": "^1.0.5", "call-bind": "^1.0.2", - "es-abstract": "^1.18.5", - "foreach": "^2.0.5", + "for-each": "^0.3.3", + "gopd": "^1.0.1", "has-tostringtag": "^1.0.0", - "is-typed-array": "^1.1.7" + "is-typed-array": "^1.1.10" } }, "wide-align": { diff --git a/package.json b/package.json index 78cb285946a..4efb0ee1c18 100644 --- a/package.json +++ b/package.json @@ -81,8 +81,8 @@ "format:prettier": "prettier --write .", "hooks:install": "node node_modules/husky/husky.js install", "hooks:uninstall": "node node_modules/husky/husky.js uninstall", - "knip": "npx -y knip -c config/knip/knip.json --dir client --include files", - "knip:client": "npx -y knip -c config/knip/knip.json --dir client", + "knip": "npx -y knip@^1.0.0-beta.10 --include files", + "knip:all": "npx -y knip@^1.0.0-beta.10", "prelint": "npm run -w=client predevelop", "lint": "npm-run-all create:* -p lint:*", "lint:challenges": "cd ./curriculum && npm run lint", @@ -130,7 +130,6 @@ "@types/enzyme-adapter-react-16": "1.0.6", "@types/eslint": "7.29.0", "@types/estree": "0.0.52", - "@types/faker": "5.5.9", "@types/inquirer": "8.2.5", "@types/jest": "27.5.2", "@types/jquery": "3.5.16", @@ -154,8 +153,8 @@ "@types/sanitize-html": "2.8.0", "@types/store": "2.0.2", "@types/validator": "13.7.10", - "@typescript-eslint/eslint-plugin": "5.48.0", - "@typescript-eslint/parser": "5.48.0", + "@typescript-eslint/eslint-plugin": "5.48.1", + "@typescript-eslint/parser": "5.48.1", "babel-eslint": "10.1.0", "babel-plugin-transform-imports": "2.0.0", "cross-env": "7.0.3", @@ -165,16 +164,15 @@ "docsify-cli": "4.4.4", "eslint": "7.32.0", "eslint-config-prettier": "8.6.0", - "eslint-plugin-import": "2.26.0", + "eslint-plugin-import": "2.27.4", "eslint-plugin-jest-dom": "3.9.4", - "eslint-plugin-jsx-a11y": "6.6.1", + "eslint-plugin-jsx-a11y": "6.7.1", "eslint-plugin-no-only-tests": "2.6.0", "eslint-plugin-prefer-object-spread": "1.2.1", - "eslint-plugin-react": "7.31.11", + "eslint-plugin-react": "7.32.0", "eslint-plugin-react-hooks": "4.6.0", "eslint-plugin-testing-library": "4.12.4", "execa": "5.1.1", - "faker": "5.5.3", "husky": "8.0.3", "jest": "27.5.1", "js-yaml": "3.14.1", diff --git a/tools/challenge-editor/client/package.json b/tools/challenge-editor/client/package.json index 213065545f3..9c7c5584ae7 100644 --- a/tools/challenge-editor/client/package.json +++ b/tools/challenge-editor/client/package.json @@ -9,7 +9,7 @@ "react": "16.14.0", "react-codemirror2": "7.2.1", "react-dom": "16.14.0", - "react-router-dom": "6.6.1", + "react-router-dom": "6.6.2", "react-scripts": "5.0.1", "typescript": "4.9.4" }, diff --git a/tools/challenge-helper-scripts/package.json b/tools/challenge-helper-scripts/package.json index e50b591ff15..8dad943ef6e 100644 --- a/tools/challenge-helper-scripts/package.json +++ b/tools/challenge-helper-scripts/package.json @@ -28,7 +28,7 @@ "cross-env": "7.0.3", "gray-matter": "4.0.3", "inquirer": "8.2.5", - "prettier": "2.8.1", + "prettier": "2.8.3", "ts-node": "10.9.1", "typescript": "4.9.4" } diff --git a/tools/challenge-parser/parser/__snapshots__/index.acceptance.test.js.snap b/tools/challenge-parser/parser/__snapshots__/index.acceptance.test.js.snap index 505e3aa4ac5..2988fc15d5b 100644 --- a/tools/challenge-parser/parser/__snapshots__/index.acceptance.test.js.snap +++ b/tools/challenge-parser/parser/__snapshots__/index.acceptance.test.js.snap @@ -2,6 +2,7 @@ exports[`challenge parser it should not parse directives we do not use 1`] = ` Object { + "assignments": Array [], "description": "

                                                                                                                                                                                                                                                                                                                                    :root appears, :import appears

                                                                                                                                                                                                                                                                                                                                    the next paragraph should appear

                                                                                                                                                                                                                                                                                                                                    @@ -19,6 +20,7 @@ a container directive exports[`challenge parser it should parse video questions 1`] = ` Object { + "assignments": Array [], "description": "

                                                                                                                                                                                                                                                                                                                                    Paragraph 1

                                                                                                                                                                                                                                                                                                                                    code example
                                                                                                                                                                                                                                                                                                                                    @@ -48,6 +50,7 @@ Object {
                                                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                                     exports[`challenge parser should import md from other files 1`] = `
                                                                                                                                                                                                                                                                                                                                     Object {
                                                                                                                                                                                                                                                                                                                                    +  "assignments": Array [],
                                                                                                                                                                                                                                                                                                                                       "challengeFiles": Array [
                                                                                                                                                                                                                                                                                                                                         Object {
                                                                                                                                                                                                                                                                                                                                           "contents": "
                                                                                                                                                                                                                                                                                                                                    @@ -112,6 +115,7 @@ for (let index = 0; index < array.length; index++) {
                                                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                                     exports[`challenge parser should not mix other YAML with the frontmatter 1`] = `
                                                                                                                                                                                                                                                                                                                                     Object {
                                                                                                                                                                                                                                                                                                                                    +  "assignments": Array [],
                                                                                                                                                                                                                                                                                                                                       "challengeFiles": Array [
                                                                                                                                                                                                                                                                                                                                         Object {
                                                                                                                                                                                                                                                                                                                                           "contents": "
                                                                                                                                                                                                                                                                                                                                    @@ -176,6 +180,7 @@ Object {
                                                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                                     exports[`challenge parser should parse a more realistic md file 1`] = `
                                                                                                                                                                                                                                                                                                                                     Object {
                                                                                                                                                                                                                                                                                                                                    +  "assignments": Array [],
                                                                                                                                                                                                                                                                                                                                       "challengeFiles": Array [
                                                                                                                                                                                                                                                                                                                                         Object {
                                                                                                                                                                                                                                                                                                                                           "contents": "
                                                                                                                                                                                                                                                                                                                                    @@ -365,6 +370,7 @@ assert(
                                                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                                     exports[`challenge parser should parse a simple md file 1`] = `
                                                                                                                                                                                                                                                                                                                                     Object {
                                                                                                                                                                                                                                                                                                                                    +  "assignments": Array [],
                                                                                                                                                                                                                                                                                                                                       "challengeFiles": Array [
                                                                                                                                                                                                                                                                                                                                         Object {
                                                                                                                                                                                                                                                                                                                                           "contents": "
                                                                                                                                                                                                                                                                                                                                    @@ -465,6 +471,7 @@ if(let x of xs) {
                                                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                                     exports[`challenge parser should parse frontmatter 1`] = `
                                                                                                                                                                                                                                                                                                                                     Object {
                                                                                                                                                                                                                                                                                                                                    +  "assignments": Array [],
                                                                                                                                                                                                                                                                                                                                       "challengeFiles": Array [
                                                                                                                                                                                                                                                                                                                                         Object {
                                                                                                                                                                                                                                                                                                                                           "contents": "
                                                                                                                                                                                                                                                                                                                                    @@ -526,6 +533,7 @@ Object {
                                                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                                     exports[`challenge parser should parse gfm strikethrough and frontmatter 1`] = `
                                                                                                                                                                                                                                                                                                                                     Object {
                                                                                                                                                                                                                                                                                                                                    +  "assignments": Array [],
                                                                                                                                                                                                                                                                                                                                       "challengeFiles": Array [
                                                                                                                                                                                                                                                                                                                                         Object {
                                                                                                                                                                                                                                                                                                                                           "contents": "
                                                                                                                                                                                                                                                                                                                                    diff --git a/tools/challenge-parser/parser/index.js b/tools/challenge-parser/parser/index.js
                                                                                                                                                                                                                                                                                                                                    index c2c6fd82447..1645fc253c6 100644
                                                                                                                                                                                                                                                                                                                                    --- a/tools/challenge-parser/parser/index.js
                                                                                                                                                                                                                                                                                                                                    +++ b/tools/challenge-parser/parser/index.js
                                                                                                                                                                                                                                                                                                                                    @@ -9,6 +9,7 @@ const addSolution = require('./plugins/add-solution');
                                                                                                                                                                                                                                                                                                                                     const addTests = require('./plugins/add-tests');
                                                                                                                                                                                                                                                                                                                                     const addText = require('./plugins/add-text');
                                                                                                                                                                                                                                                                                                                                     const addVideoQuestion = require('./plugins/add-video-question');
                                                                                                                                                                                                                                                                                                                                    +const addAssignment = require('./plugins/add-assignment');
                                                                                                                                                                                                                                                                                                                                     const replaceImports = require('./plugins/replace-imports');
                                                                                                                                                                                                                                                                                                                                     const restoreDirectives = require('./plugins/restore-directives');
                                                                                                                                                                                                                                                                                                                                     const tableAndStrikeThrough = require('./plugins/table-and-strikethrough');
                                                                                                                                                                                                                                                                                                                                    @@ -44,6 +45,7 @@ const processor = unified()
                                                                                                                                                                                                                                                                                                                                       // converted back to text before they're added to the challenge object.
                                                                                                                                                                                                                                                                                                                                       .use(restoreDirectives)
                                                                                                                                                                                                                                                                                                                                       .use(addVideoQuestion)
                                                                                                                                                                                                                                                                                                                                    +  .use(addAssignment)
                                                                                                                                                                                                                                                                                                                                       .use(addTests)
                                                                                                                                                                                                                                                                                                                                       .use(addText, ['description', 'instructions', 'notes']);
                                                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                                    diff --git a/tools/challenge-parser/parser/plugins/add-assignment.js b/tools/challenge-parser/parser/plugins/add-assignment.js
                                                                                                                                                                                                                                                                                                                                    new file mode 100644
                                                                                                                                                                                                                                                                                                                                    index 00000000000..1f2ef25ff33
                                                                                                                                                                                                                                                                                                                                    --- /dev/null
                                                                                                                                                                                                                                                                                                                                    +++ b/tools/challenge-parser/parser/plugins/add-assignment.js
                                                                                                                                                                                                                                                                                                                                    @@ -0,0 +1,24 @@
                                                                                                                                                                                                                                                                                                                                    +const getAllBetween = require('./utils/between-headings');
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +const mdastToHtml = require('./utils/mdast-to-html');
                                                                                                                                                                                                                                                                                                                                    +const { splitOnThematicBreak } = require('./utils/split-on-thematic-break');
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +function plugin() {
                                                                                                                                                                                                                                                                                                                                    +  return transformer;
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +  function transformer(tree, file) {
                                                                                                                                                                                                                                                                                                                                    +    const assigmentNodes = getAllBetween(tree, '--assignment--');
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +    const assignment = getAssignments(assigmentNodes).filter(a => a != '');
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +    file.data.assignments = assignment;
                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +  function getAssignments(assignmentNodes) {
                                                                                                                                                                                                                                                                                                                                    +    const assignmentGroups = splitOnThematicBreak(assignmentNodes);
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +    return assignmentGroups.map(assignment => mdastToHtml(assignment));
                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +module.exports = plugin;
                                                                                                                                                                                                                                                                                                                                    diff --git a/tools/challenge-parser/parser/plugins/add-video-question.js b/tools/challenge-parser/parser/plugins/add-video-question.js
                                                                                                                                                                                                                                                                                                                                    index edab5413fe1..0c7247e7d05 100644
                                                                                                                                                                                                                                                                                                                                    --- a/tools/challenge-parser/parser/plugins/add-video-question.js
                                                                                                                                                                                                                                                                                                                                    +++ b/tools/challenge-parser/parser/plugins/add-video-question.js
                                                                                                                                                                                                                                                                                                                                    @@ -6,11 +6,11 @@ const { splitOnThematicBreak } = require('./utils/split-on-thematic-break');
                                                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                                     function plugin() {
                                                                                                                                                                                                                                                                                                                                       return transformer;
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                       function transformer(tree, file) {
                                                                                                                                                                                                                                                                                                                                         const questionNodes = getAllBetween(tree, '--question--');
                                                                                                                                                                                                                                                                                                                                         if (questionNodes.length > 0) {
                                                                                                                                                                                                                                                                                                                                           const questionTree = root(questionNodes);
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                           const textNodes = getAllBetween(questionTree, '--text--');
                                                                                                                                                                                                                                                                                                                                           const answersNodes = getAllBetween(questionTree, '--answers--');
                                                                                                                                                                                                                                                                                                                                           const solutionNodes = getAllBetween(questionTree, '--video-solution--');
                                                                                                                                                                                                                                                                                                                                    @@ -31,7 +31,6 @@ function getQuestion(textNodes, answersNodes, solutionNodes) {
                                                                                                                                                                                                                                                                                                                                       if (!answers) throw Error('answers are missing from question');
                                                                                                                                                                                                                                                                                                                                       if (!solution) throw Error('solution is missing from question');
                                                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                                    -  // console.log({ text, answers, solution });
                                                                                                                                                                                                                                                                                                                                       return { text, answers, solution };
                                                                                                                                                                                                                                                                                                                                     }
                                                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                                    diff --git a/tools/crowdin/package.json b/tools/crowdin/package.json
                                                                                                                                                                                                                                                                                                                                    index cb08fc164d1..9a1dde40252 100644
                                                                                                                                                                                                                                                                                                                                    --- a/tools/crowdin/package.json
                                                                                                                                                                                                                                                                                                                                    +++ b/tools/crowdin/package.json
                                                                                                                                                                                                                                                                                                                                    @@ -27,7 +27,7 @@
                                                                                                                                                                                                                                                                                                                                         "dotenv": "16.0.3",
                                                                                                                                                                                                                                                                                                                                         "fs-extra": "10.0.0",
                                                                                                                                                                                                                                                                                                                                         "gray-matter": "4.0.3",
                                                                                                                                                                                                                                                                                                                                    -    "node-fetch": "2.6.7",
                                                                                                                                                                                                                                                                                                                                    +    "node-fetch": "2.6.8",
                                                                                                                                                                                                                                                                                                                                         "node-opencc": "2.0.1",
                                                                                                                                                                                                                                                                                                                                         "path": "0.12.7",
                                                                                                                                                                                                                                                                                                                                         "readdirp": "3.6.0"
                                                                                                                                                                                                                                                                                                                                    diff --git a/tools/scripts/build/download-trending.ts b/tools/scripts/build/download-trending.ts
                                                                                                                                                                                                                                                                                                                                    index 7621c41f9e1..bafe4423376 100644
                                                                                                                                                                                                                                                                                                                                    --- a/tools/scripts/build/download-trending.ts
                                                                                                                                                                                                                                                                                                                                    +++ b/tools/scripts/build/download-trending.ts
                                                                                                                                                                                                                                                                                                                                    @@ -1,9 +1,9 @@
                                                                                                                                                                                                                                                                                                                                     import { writeFileSync } from 'fs';
                                                                                                                                                                                                                                                                                                                                     import fetch from 'node-fetch';
                                                                                                                                                                                                                                                                                                                                     import yaml from 'js-yaml';
                                                                                                                                                                                                                                                                                                                                    -import { trendingSchemaValidator } from '../../../client/i18n/schema/trendingSchema';
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                     import envData from '../../../config/env.json';
                                                                                                                                                                                                                                                                                                                                    +import { trendingSchemaValidator } from './schema/trending-schema';
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                     const { clientLocale } = envData;
                                                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                                     const createCdnUrl = (lang: string) =>
                                                                                                                                                                                                                                                                                                                                    diff --git a/client/i18n/schema/trendingSchema.js b/tools/scripts/build/schema/trending-schema.ts
                                                                                                                                                                                                                                                                                                                                    similarity index 97%
                                                                                                                                                                                                                                                                                                                                    rename from client/i18n/schema/trendingSchema.js
                                                                                                                                                                                                                                                                                                                                    rename to tools/scripts/build/schema/trending-schema.ts
                                                                                                                                                                                                                                                                                                                                    index e9d06c170f3..935fd918e6f 100644
                                                                                                                                                                                                                                                                                                                                    --- a/client/i18n/schema/trendingSchema.js
                                                                                                                                                                                                                                                                                                                                    +++ b/tools/scripts/build/schema/trending-schema.ts
                                                                                                                                                                                                                                                                                                                                    @@ -63,6 +63,8 @@ const schema = Joi.object().keys({
                                                                                                                                                                                                                                                                                                                                       article29link: Joi.string().uri({ scheme: 'https' }).required()
                                                                                                                                                                                                                                                                                                                                     });
                                                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                                    -export const trendingSchemaValidator = trendingObj => {
                                                                                                                                                                                                                                                                                                                                    +export const trendingSchemaValidator = (
                                                                                                                                                                                                                                                                                                                                    +  trendingObj: Record
                                                                                                                                                                                                                                                                                                                                    +) => {
                                                                                                                                                                                                                                                                                                                                       return schema.validate(trendingObj);
                                                                                                                                                                                                                                                                                                                                     };
                                                                                                                                                                                                                                                                                                                                    diff --git a/tools/ui-components/package.json b/tools/ui-components/package.json
                                                                                                                                                                                                                                                                                                                                    index 63a074d3eb2..cf2599efaae 100644
                                                                                                                                                                                                                                                                                                                                    --- a/tools/ui-components/package.json
                                                                                                                                                                                                                                                                                                                                    +++ b/tools/ui-components/package.json
                                                                                                                                                                                                                                                                                                                                    @@ -25,7 +25,7 @@
                                                                                                                                                                                                                                                                                                                                         "typescript": "4.9.4"
                                                                                                                                                                                                                                                                                                                                       },
                                                                                                                                                                                                                                                                                                                                       "devDependencies": {
                                                                                                                                                                                                                                                                                                                                    -    "@babel/core": "7.20.7",
                                                                                                                                                                                                                                                                                                                                    +    "@babel/core": "7.20.12",
                                                                                                                                                                                                                                                                                                                                         "@babel/preset-env": "7.20.2",
                                                                                                                                                                                                                                                                                                                                         "@rollup/plugin-babel": "5.3.1",
                                                                                                                                                                                                                                                                                                                                         "@rollup/plugin-commonjs": "19.0.2",
                                                                                                                                                                                                                                                                                                                                    @@ -47,7 +47,7 @@
                                                                                                                                                                                                                                                                                                                                         "babel-loader": "8.3.0",
                                                                                                                                                                                                                                                                                                                                         "babel-plugin-transform-react-remove-prop-types": "0.4.24",
                                                                                                                                                                                                                                                                                                                                         "cross-env": "7.0.3",
                                                                                                                                                                                                                                                                                                                                    -    "postcss": "8.4.20",
                                                                                                                                                                                                                                                                                                                                    +    "postcss": "8.4.21",
                                                                                                                                                                                                                                                                                                                                         "postcss-import": "14.1.0",
                                                                                                                                                                                                                                                                                                                                         "rimraf": "3.0.2",
                                                                                                                                                                                                                                                                                                                                         "rollup": "2.79.1",
                                                                                                                                                                                                                                                                                                                                    diff --git a/utils/get-lines.js b/utils/get-lines.js
                                                                                                                                                                                                                                                                                                                                    deleted file mode 100644
                                                                                                                                                                                                                                                                                                                                    index 9e883aec0e9..00000000000
                                                                                                                                                                                                                                                                                                                                    --- a/utils/get-lines.js
                                                                                                                                                                                                                                                                                                                                    +++ /dev/null
                                                                                                                                                                                                                                                                                                                                    @@ -1,15 +0,0 @@
                                                                                                                                                                                                                                                                                                                                    -const { isEmpty } = require('lodash');
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -function getLines(contents, range) {
                                                                                                                                                                                                                                                                                                                                    -  if (isEmpty(range)) {
                                                                                                                                                                                                                                                                                                                                    -    return '';
                                                                                                                                                                                                                                                                                                                                    -  }
                                                                                                                                                                                                                                                                                                                                    -  const lines = contents.split('\n');
                                                                                                                                                                                                                                                                                                                                    -  const editableLines =
                                                                                                                                                                                                                                                                                                                                    -    isEmpty(lines) || range[1] <= range[0]
                                                                                                                                                                                                                                                                                                                                    -      ? []
                                                                                                                                                                                                                                                                                                                                    -      : lines.slice(range[0], range[1] - 1);
                                                                                                                                                                                                                                                                                                                                    -  return editableLines.join('\n');
                                                                                                                                                                                                                                                                                                                                    -}
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -exports.getLines = getLines;
                                                                                                                                                                                                                                                                                                                                    diff --git a/utils/get-lines.test.js b/utils/get-lines.test.ts
                                                                                                                                                                                                                                                                                                                                    similarity index 95%
                                                                                                                                                                                                                                                                                                                                    rename from utils/get-lines.test.js
                                                                                                                                                                                                                                                                                                                                    rename to utils/get-lines.test.ts
                                                                                                                                                                                                                                                                                                                                    index 2de1f1c0575..e3044167dcd 100644
                                                                                                                                                                                                                                                                                                                                    --- a/utils/get-lines.test.js
                                                                                                                                                                                                                                                                                                                                    +++ b/utils/get-lines.test.ts
                                                                                                                                                                                                                                                                                                                                    @@ -1,4 +1,4 @@
                                                                                                                                                                                                                                                                                                                                    -const { getLines } = require('./get-lines');
                                                                                                                                                                                                                                                                                                                                    +import { getLines } from './get-lines';
                                                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                                     const content = 'one\ntwo\nthree';
                                                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                                    diff --git a/utils/get-lines.ts b/utils/get-lines.ts
                                                                                                                                                                                                                                                                                                                                    new file mode 100644
                                                                                                                                                                                                                                                                                                                                    index 00000000000..a13112dfee6
                                                                                                                                                                                                                                                                                                                                    --- /dev/null
                                                                                                                                                                                                                                                                                                                                    +++ b/utils/get-lines.ts
                                                                                                                                                                                                                                                                                                                                    @@ -0,0 +1,10 @@
                                                                                                                                                                                                                                                                                                                                    +export function getLines(contents: string, range?: number[]) {
                                                                                                                                                                                                                                                                                                                                    +  if (!range) {
                                                                                                                                                                                                                                                                                                                                    +    return '';
                                                                                                                                                                                                                                                                                                                                    +  }
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +  const lines = contents.split('\n');
                                                                                                                                                                                                                                                                                                                                    +  const editableLines =
                                                                                                                                                                                                                                                                                                                                    +    range[1] <= range[0] ? [] : lines.slice(range[0], range[1] - 1);
                                                                                                                                                                                                                                                                                                                                    +  return editableLines.join('\n');
                                                                                                                                                                                                                                                                                                                                    +}
                                                                                                                                                                                                                                                                                                                                    diff --git a/utils/validate.js b/utils/validate.js
                                                                                                                                                                                                                                                                                                                                    deleted file mode 100644
                                                                                                                                                                                                                                                                                                                                    index dd888a96885..00000000000
                                                                                                                                                                                                                                                                                                                                    --- a/utils/validate.js
                                                                                                                                                                                                                                                                                                                                    +++ /dev/null
                                                                                                                                                                                                                                                                                                                                    @@ -1,32 +0,0 @@
                                                                                                                                                                                                                                                                                                                                    -const invalidCharError = {
                                                                                                                                                                                                                                                                                                                                    -  valid: false,
                                                                                                                                                                                                                                                                                                                                    -  error: 'contains invalid characters'
                                                                                                                                                                                                                                                                                                                                    -};
                                                                                                                                                                                                                                                                                                                                    -const validationSuccess = { valid: true, error: null };
                                                                                                                                                                                                                                                                                                                                    -const usernameTooShort = { valid: false, error: 'is too short' };
                                                                                                                                                                                                                                                                                                                                    -const usernameIsHttpStatusCode = {
                                                                                                                                                                                                                                                                                                                                    -  valid: false,
                                                                                                                                                                                                                                                                                                                                    -  error: 'is a reserved error code'
                                                                                                                                                                                                                                                                                                                                    -};
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -const isNumeric = num => !isNaN(num);
                                                                                                                                                                                                                                                                                                                                    -const validCharsRE = /^[a-zA-Z0-9\-_+]*$/;
                                                                                                                                                                                                                                                                                                                                    -const isHttpStatusCode = str =>
                                                                                                                                                                                                                                                                                                                                    -  isNumeric(str) && parseInt(str, 10) >= 100 && parseInt(str, 10) <= 599;
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -const isValidUsername = str => {
                                                                                                                                                                                                                                                                                                                                    -  if (!validCharsRE.test(str)) return invalidCharError;
                                                                                                                                                                                                                                                                                                                                    -  if (str.length < 3) return usernameTooShort;
                                                                                                                                                                                                                                                                                                                                    -  if (isHttpStatusCode(str)) return usernameIsHttpStatusCode;
                                                                                                                                                                                                                                                                                                                                    -  return validationSuccess;
                                                                                                                                                                                                                                                                                                                                    -};
                                                                                                                                                                                                                                                                                                                                    -
                                                                                                                                                                                                                                                                                                                                    -module.exports = {
                                                                                                                                                                                                                                                                                                                                    -  isNumeric,
                                                                                                                                                                                                                                                                                                                                    -  isHttpStatusCode,
                                                                                                                                                                                                                                                                                                                                    -  isValidUsername,
                                                                                                                                                                                                                                                                                                                                    -  validationSuccess,
                                                                                                                                                                                                                                                                                                                                    -  usernameTooShort,
                                                                                                                                                                                                                                                                                                                                    -  usernameIsHttpStatusCode,
                                                                                                                                                                                                                                                                                                                                    -  invalidCharError
                                                                                                                                                                                                                                                                                                                                    -};
                                                                                                                                                                                                                                                                                                                                    diff --git a/utils/validate.test.js b/utils/validate.test.ts
                                                                                                                                                                                                                                                                                                                                    similarity index 90%
                                                                                                                                                                                                                                                                                                                                    rename from utils/validate.test.js
                                                                                                                                                                                                                                                                                                                                    rename to utils/validate.test.ts
                                                                                                                                                                                                                                                                                                                                    index 24ce35e766a..9ed026e2ef5 100644
                                                                                                                                                                                                                                                                                                                                    --- a/utils/validate.test.js
                                                                                                                                                                                                                                                                                                                                    +++ b/utils/validate.test.ts
                                                                                                                                                                                                                                                                                                                                    @@ -1,12 +1,12 @@
                                                                                                                                                                                                                                                                                                                                    -const {
                                                                                                                                                                                                                                                                                                                                    +import {
                                                                                                                                                                                                                                                                                                                                       isValidUsername,
                                                                                                                                                                                                                                                                                                                                       usernameTooShort,
                                                                                                                                                                                                                                                                                                                                       validationSuccess,
                                                                                                                                                                                                                                                                                                                                       usernameIsHttpStatusCode,
                                                                                                                                                                                                                                                                                                                                       invalidCharError
                                                                                                                                                                                                                                                                                                                                    -} = require('./validate');
                                                                                                                                                                                                                                                                                                                                    +} from './validate';
                                                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                                    -function inRange(num, range) {
                                                                                                                                                                                                                                                                                                                                    +function inRange(num: number, range: number[]) {
                                                                                                                                                                                                                                                                                                                                       return num >= range[0] && num <= range[1];
                                                                                                                                                                                                                                                                                                                                     }
                                                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                                    @@ -46,8 +46,8 @@ describe('isValidUsername', () => {
                                                                                                                                                                                                                                                                                                                                         const finalCode = 127;
                                                                                                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                                                                         for (let code = 0; code <= finalCode; code++) {
                                                                                                                                                                                                                                                                                                                                    -      let char = String.fromCharCode(code);
                                                                                                                                                                                                                                                                                                                                    -      let expected = invalidCharError;
                                                                                                                                                                                                                                                                                                                                    +      const char = String.fromCharCode(code);
                                                                                                                                                                                                                                                                                                                                    +      let expected: { valid: boolean; error: null | string } = invalidCharError;
                                                                                                                                                                                                                                                                                                                                           if (allowedCharactersList.includes(char)) expected = validationSuccess;
                                                                                                                                                                                                                                                                                                                                           if (inRange(code, numbers)) expected = validationSuccess;
                                                                                                                                                                                                                                                                                                                                           if (inRange(code, upperCase)) expected = validationSuccess;
                                                                                                                                                                                                                                                                                                                                    diff --git a/utils/validate.ts b/utils/validate.ts
                                                                                                                                                                                                                                                                                                                                    new file mode 100644
                                                                                                                                                                                                                                                                                                                                    index 00000000000..9f5ebf3e6af
                                                                                                                                                                                                                                                                                                                                    --- /dev/null
                                                                                                                                                                                                                                                                                                                                    +++ b/utils/validate.ts
                                                                                                                                                                                                                                                                                                                                    @@ -0,0 +1,23 @@
                                                                                                                                                                                                                                                                                                                                    +export const invalidCharError = {
                                                                                                                                                                                                                                                                                                                                    +  valid: false,
                                                                                                                                                                                                                                                                                                                                    +  error: 'contains invalid characters'
                                                                                                                                                                                                                                                                                                                                    +};
                                                                                                                                                                                                                                                                                                                                    +export const validationSuccess = { valid: true, error: null };
                                                                                                                                                                                                                                                                                                                                    +export const usernameTooShort = { valid: false, error: 'is too short' };
                                                                                                                                                                                                                                                                                                                                    +export const usernameIsHttpStatusCode = {
                                                                                                                                                                                                                                                                                                                                    +  valid: false,
                                                                                                                                                                                                                                                                                                                                    +  error: 'is a reserved error code'
                                                                                                                                                                                                                                                                                                                                    +};
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +const validCharsRE = /^[a-zA-Z0-9\-_+]*$/;
                                                                                                                                                                                                                                                                                                                                    +export const isHttpStatusCode = (str: string) => {
                                                                                                                                                                                                                                                                                                                                    +  const output = parseInt(str, 10);
                                                                                                                                                                                                                                                                                                                                    +  return !isNaN(output) && output >= 100 && output <= 599;
                                                                                                                                                                                                                                                                                                                                    +};
                                                                                                                                                                                                                                                                                                                                    +
                                                                                                                                                                                                                                                                                                                                    +export const isValidUsername = (str: string) => {
                                                                                                                                                                                                                                                                                                                                    +  if (!validCharsRE.test(str)) return invalidCharError;
                                                                                                                                                                                                                                                                                                                                    +  if (str.length < 3) return usernameTooShort;
                                                                                                                                                                                                                                                                                                                                    +  if (isHttpStatusCode(str)) return usernameIsHttpStatusCode;
                                                                                                                                                                                                                                                                                                                                    +  return validationSuccess;
                                                                                                                                                                                                                                                                                                                                    +};